airflow.providers.apprise.hooks.apprise

Module Contents

Classes

AppriseHook

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.

conn_name_attr = 'apprise_conn_id'[source]
default_conn_name = 'apprise_default'[source]
conn_type = 'apprise'[source]
hook_name = 'Apprise'[source]
get_config_from_conn()[source]
set_config_from_conn(apprise_obj)[source]

Set config from connection to apprise object.

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 (str | Iterable[str] | 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

abstract get_conn()[source]

Return connection for the hook.

classmethod get_connection_form_widgets()[source]

Return connection widgets to add to connection form.

classmethod get_ui_field_behaviour()[source]

Was this entry helpful?