from abc import ABC, abstractmethod from dataclasses import dataclass @dataclass(frozen=True) class ImageAttachment: filename: str content_type: str data: bytes class Notifier(ABC): name = "base" @abstractmethod async def send(self, title: str, text: str, images: list[ImageAttachment] | None = None) -> None: """Deliver one notification or raise so the caller can retry."""