fluxer-admin-alerts/notifiers/base.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

23 lines
466 B
Python

from __future__ import annotations
from abc import ABC, abstractmethod
from collections.abc import Sequence
from dataclasses import dataclass
@dataclass(frozen=True)
class Message:
title: str
body: str
link: str | None
urgent: bool
class NotifierError(Exception):
pass
class Notifier(ABC):
@abstractmethod
def send(self, messages: Sequence[Message]) -> None:
"""Deliver messages. Raise NotifierError if delivery failed."""