fluxer-admin-alerts/notifiers/__init__.py
Clarth dc831b430b Restructure project to flat layout and update run instructions
Move modules from fluxer_admin_alerts/ to the repository root, switch to absolute imports, fix PROJECT_ROOT resolution, and update README commands and notifier paths.
2026-11-13 20:26:05 -05:00

17 lines
597 B
Python

from __future__ import annotations
from config import Settings
from .base import Message, Notifier, NotifierError
from .fluxer import FluxerWebhookNotifier
__all__ = ["Message", "Notifier", "NotifierError", "build_notifiers"]
def build_notifiers(settings: Settings) -> list[Notifier]:
notifiers: list[Notifier] = []
for name in settings.notifiers:
if name == "fluxer":
notifiers.append(FluxerWebhookNotifier(settings.fluxer_webhook_url or "", settings.request_timeout))
else:
raise ValueError(f"no notifier named {name!r}")
return notifiers