airflow.hooks.slack_hook

Hook for Slack

Module Contents

class airflow.hooks.slack_hook.SlackHook(token:str=None, slack_conn_id:str=None)[source]

Bases: airflow.hooks.base_hook.BaseHook

Takes both Slack API token directly and connection that has Slack API token.

If both supplied, Slack API token will be used.

Parameters
  • token – Slack API token

  • slack_conn_id – connection that has Slack API token in the password field

__get_token(self, token, slack_conn_id)[source]
call(self, method:str, api_params:dict)[source]

Calls the clack client.

Parameters
  • method – method

  • api_params – parameters of the API