#!/usr/bin/env python import time import requests import config from plugins import plugins def emit(event, data): json = { "event": event, "data": data } return requests.post(config.OSD_URL, json=json) def main(): data = requests.get(config.CAR_API_URL) for plugin in plugins: plugin.check(data, emit) if __name__ == "__main__": while True: main() time.sleep(config.DELAY)