gotelem/py/pytelem/backend.py

20 lines
401 B
Python
Raw Normal View History

2023-06-20 02:21:47 +00:00
import aiohttp
import orjson
import threading
2023-07-04 05:50:34 +00:00
# connect to websocket - create thread that handles JSON events
class TelemetryServer(QObject):
"""Connection to upstream database"""
conn_url: str
"Something like http://<some_ip>:8082"
callbacks: Dict[str, Signal]
def __init__(self, url: str, parent=None):
super().__init__(parent)
self.conn_url = url