How to use the discover.discovered function in discover

To help you get started, we’ve selected a few discover examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github karlcswanson / micboard / py / tornado_server.py View on Github external
def micboard_json(network_devices):
    data = []
    for net_device in network_devices:
        data.append(net_device.net_json())

    gifs = file_list('.gif')
    jpgs = file_list('.jpg')
    mp4s = file_list('.mp4')

    url = localURL()
    discovered = discover.discovered

    return json.dumps({
        'receivers': data, 'url': url, 'gif': gifs, 'jpg': jpgs, 'mp4': mp4s,
        'config': config.config_tree, 'discovered': discovered
    }, sort_keys=True, indent=4)