22 lines
534 B
Python
22 lines
534 B
Python
"""
|
|
adapters/base/notify.py
|
|
Abstract base class for all notification adapters.
|
|
"""
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
class NotifyAdapter(ABC):
|
|
"""Contract that every notification provider adapter must fulfil."""
|
|
|
|
@abstractmethod
|
|
def send(self, message: str, context: dict) -> None:
|
|
"""
|
|
Dispatch a notification.
|
|
|
|
Parameters
|
|
----------
|
|
message : Human-readable message text.
|
|
context : Arbitrary metadata (e.g. channel, severity, run_id, brief_id).
|
|
"""
|
|
...
|