airflow.providers.slack.notifications.slack_notifier

Module Contents

Classes

SlackNotifier

Slack BaseNotifier

Attributes

ICON_URL

send_slack_notification

airflow.providers.slack.notifications.slack_notifier.ICON_URL: str = 'https://raw.githubusercontent.com/apache/airflow/2.5.0/airflow/www/static/pin_100.png'[source]
class airflow.providers.slack.notifications.slack_notifier.SlackNotifier(*, slack_conn_id='slack_api_default', text='This is a default message', channel='#general', username='Airflow', icon_url=ICON_URL, attachments=(), blocks=())[source]

Bases: airflow.notifications.basenotifier.BaseNotifier

Slack BaseNotifier

Parameters
  • slack_conn_id (str) – Slack API token (https://api.slack.com/web).

  • text (str) – The content of the message

  • channel (str) – The channel to send the message to. Optional

  • username (str) – The username to send the message as. Optional

  • icon_url (str) – The icon to use for the message. Optional

  • attachments (Sequence) – A list of attachments to send with the message. Optional

  • blocks (Sequence) – A list of blocks to send with the message. Optional

template_fields = ('text', 'channel', 'username', 'attachments', 'blocks')[source]
hook()[source]

Slack Hook.

notify(context)[source]

Send a message to a Slack Channel

airflow.providers.slack.notifications.slack_notifier.send_slack_notification[source]

Was this entry helpful?