airflow.providers.apprise.hooks.apprise
¶
Module Contents¶
Classes¶
Use Apprise(https://github.com/caronc/apprise) to interact with notification services. |
- class airflow.providers.apprise.hooks.apprise.AppriseHook(apprise_conn_id=default_conn_name)[source]¶
Bases:
airflow.hooks.base.BaseHook
Use Apprise(https://github.com/caronc/apprise) to interact with notification services.
The complete list of notification services supported by Apprise can be found at: https://github.com/caronc/apprise/wiki#notification-services.
- Parameters
apprise_conn_id (str) – Apprise connection id that has services configured in the config field.
- notify(body, title=None, notify_type=NotifyType.INFO, body_format=NotifyFormat.TEXT, tag=None, attach=None, interpret_escapes=None, config=None)[source]¶
Send message to plugged-in services.
- Parameters
body (str) – Specify the message body
title (str | None) – Specify the message title. (optional)
notify_type (apprise.NotifyType) – Specify the message type (default=info). Possible values are “info”, “success”, “failure”, and “warning”
body_format (apprise.NotifyFormat) – Specify the input message format (default=text). Possible values are “text”, “html”, and “markdown”.
tag (str | Iterable[str] | None) – Specify one or more tags to filter which services to notify
attach (apprise.AppriseAttachment | None) – Specify one or more file attachment locations
interpret_escapes (bool | None) – Enable interpretation of backslash escapes. For example, this would convert sequences such as n and r to their respective ascii new-line and carriage return characters
config (apprise.AppriseConfig | None) – Specify one or more configuration