dmf.alerts.get_backend#
- dmf.alerts.get_backend(alert_token: str | None = None, store: bool = True) AlertBackend | None[source]#
Get or create an AlertBackend instance. If the global backend is None or store is False, initialize it with resolved credentials.
- Parameters:
alert_token – Optional; Slack token to override the environment variable.
store – If True, store the backend instance in the global variable.
- Returns:
An initialized AlertBackend instance.