airflow.providers.slack.utils

Package Contents

Classes

ConnectionExtraConfig

Helper class for rom Connection Extra.

Functions

parse_filename(filename, supported_file_formats[, ...])

Parse filetype and compression from given filename.

class airflow.providers.slack.utils.ConnectionExtraConfig(conn_type, conn_id=None, extra=None)[source]

Helper class for rom Connection Extra.

Parameters
  • conn_type (str) – Hook connection type.

  • conn_id (str | None) – Connection ID uses for appropriate error messages.

  • extra (dict[str, Any] | None) – Connection extra dictionary.

get(field, default=NOTSET)[source]

Get specified field from Connection Extra.

Parameters
  • field – Connection extra field name.

  • default (Any) – If specified then use as default value if field not present in Connection Extra.

getint(field, default=NOTSET)[source]

Get specified field from Connection Extra and evaluate as integer.

Parameters
  • field – Connection extra field name.

  • default (Any) – If specified then use as default value if field not present in Connection Extra.

airflow.providers.slack.utils.parse_filename(filename, supported_file_formats, fallback=None)[source]

Parse filetype and compression from given filename.

Parameters
  • filename (str) – filename to parse.

  • supported_file_formats (Sequence[str]) – list of supported file extensions.

  • fallback (str | None) – fallback to given file format.

Returns

filetype and compression (if specified)

Return type

tuple[str, str | None]

Was this entry helpful?