inou/health-poller/poller/sink.py

17 lines
486 B
Python

import logging
from poller.sources.base import Reading
log = logging.getLogger(__name__)
class Sink:
"""Push readings to Inou. Stub until the API endpoint exists."""
def __init__(self, api_url: str, api_key: str):
self.api_url = api_url
self.api_key = api_key
def push(self, dossier_id: str, readings: list[Reading]):
for r in readings:
log.info(f" WOULD PUSH → dossier={dossier_id} {r.metric}={r.value}{r.unit} @ {r.timestamp}")