airflow.providers.apprise.notifications.apprise

属性

send_apprise_notification

AppriseNotifier

Apprise 基础通知器。

模块内容

class airflow.providers.apprise.notifications.apprise.AppriseNotifier(*, body, title=None, notify_type=NotifyType.INFO, body_format=NotifyFormat.TEXT, tag='all', attach=None, interpret_escapes=None, config=None, apprise_conn_id=AppriseHook.default_conn_name)[source]

基类: airflow.providers.common.compat.notifier.BaseNotifier

Apprise 基础通知器。

参数:
  • body (str) – 指定消息正文

  • title (str | None) – 指定消息标题。此字段完全可选

  • notify_type (apprise.NotifyType) – 指定消息类型(默认为 info)。可能的值为 “info”, “success”, “failure”, 和 “warning”

  • body_format (apprise.NotifyFormat) – 指定输入消息格式(默认为 text)。可能的值为 “text”, “html”, 和 “markdown”。

  • tag (str | collections.abc.Iterable[str]) – 指定一个或多个标签以过滤通知服务

  • attach (str | None) – 指定一个或多个文件附件位置

  • interpret_escapes (bool | None) – 启用反斜杠转义符的解释。例如,这将把诸如 n 和 r 的序列转换为其对应的 ascii 换行符和回车符

  • config (apprise.AppriseConfig | None) – 指定一个或多个配置

  • apprise_conn_id (str) – 设置了 Apprise 配置的连接 ID

template_fields = ('body', 'title', 'tag', 'attach')[source]
apprise_conn_id = 'apprise_default'[source]
body[source]
title = None[source]
notify_type = 'info'[source]
body_format = 'text'[source]
tag = 'all'[source]
attach = None[source]
interpret_escapes = None[source]
config = None[source]
property hook: airflow.providers.apprise.hooks.apprise.AppriseHook[source]

Apprise Hook。

notify(context)[source]

向 Apprise 配置的服务发送警报。

airflow.providers.apprise.notifications.apprise.send_apprise_notification[source]

此条目有帮助吗?