kiwi-simple-metrics/kiwi_simple_metrics/metrics/external.py

19 lines
343 B
Python
Raw Normal View History

from typing import Iterator
from ..settings import SETTINGS
from ._report import Report, ReportData
def _hwdata() -> Iterator[ReportData]:
yield ReportData(
name="Foo",
value=69.42,
)
def external() -> Report | None:
return Report.aggregate(
settings=SETTINGS.external,
get_data=_hwdata,
)