airflow.secrets.base_secrets

Module Contents

class airflow.secrets.base_secrets.BaseSecretsBackend(**kwargs)[source]

Abstract base class to retrieve secrets given a conn_id and construct a Connection object

__metaclass__[source]
static build_path(path_prefix, secret_id, sep='/')[source]

Given conn_id, build path for Secrets Backend

Parameters
  • path_prefix (str) – Prefix of the path to get secret

  • secret_id (str) – Secret id

  • sep (str) – separator used to concatenate connections_prefix and conn_id. Default: “/”

get_conn_uri(self, conn_id)[source]

Get conn_uri from Secrets Backend

Parameters

conn_id (str) – connection id

get_connections(self, conn_id)[source]

Get connections with a specific ID

Parameters

conn_id (str) – connection id

get_variable(self, key)[source]

Return value for Airflow Connection

Parameters

key – Variable Key

Returns

Variable Value

get_config(self, key)[source]

Return value for Airflow Config Key

Parameters

key – Config Key

Returns

Config Value

Was this entry helpful?