airflow.secrets.environment_variables

Objects relating to sourcing connections from environment variables

Module Contents

Classes

EnvironmentVariablesBackend

Retrieves Connection object and Variable from environment variable.

Attributes

CONN_ENV_PREFIX

VAR_ENV_PREFIX

airflow.secrets.environment_variables.CONN_ENV_PREFIX = AIRFLOW_CONN_[source]
airflow.secrets.environment_variables.VAR_ENV_PREFIX = AIRFLOW_VAR_[source]
class airflow.secrets.environment_variables.EnvironmentVariablesBackend(**kwargs)[source]

Bases: airflow.secrets.BaseSecretsBackend

Retrieves Connection object and Variable from environment variable.

get_conn_uri(self, conn_id: str) Optional[str][source]

Get conn_uri from Secrets Backend

Parameters

conn_id (str) – connection id

get_variable(self, key: str) Optional[str][source]

Get Airflow Variable from Environment Variable

Parameters

key (str) – Variable Key

Returns

Variable Value

Was this entry helpful?