dmf.alerts.backend.AlertBackend#
- class dmf.alerts.backend.AlertBackend(fail_silently: bool = True)[source]#
Bases:
objectBase class for alert backends.
Methods
__init__([fail_silently])get_alert_text([text, level, params, separator])Format the notification text with the given arguments.
send_alert([text, attachment, params, level])Send a notification with a template message.
send_message([text, attachment, scheduled_time])Placeholder method to be implemented by subclasses.
- get_alert_text(text: str | None = None, level: Literal['success', 'info', 'warning', 'error'] = 'info', params: dict | None = None, separator: str = '\n • ') str[source]#
Format the notification text with the given arguments.