Compare commits

...

3 Commits

Author SHA1 Message Date
Ceda EI 156ef04b61 Add requirements.txt 2020-12-21 12:50:14 +05:30
Ceda EI b10918569c Update sample config 2020-12-21 12:49:56 +05:30
Ceda EI c99dd127e0 Add daemon.py and plugins 2020-12-21 12:49:07 +05:30
4 changed files with 21 additions and 0 deletions

18
daemon.py Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env python
import time
import requests
import config
from plugins import plugins
def main():
data = requests.get(config.CAR_API_URL)
for plugin in plugins:
plugin.check(data)
if __name__ == "__main__":
while True:
main()
time.sleep(config.DELAY)

1
plugins/__init__.py Normal file
View File

@ -0,0 +1 @@
plugins = []

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
requests>=2.0

View File

@ -1,2 +1,3 @@
OSD_URL = "http://localhost:5050/send/"
CAR_API_URL = "http://localhost:5000/all/"
DELAY = 0