blob: c76495cb31323ccefb0383c3207066fadb1e5620 [file] [log] [blame]
:py:mod:`airflow.secrets.environment_variables`
===============================================
.. py:module:: airflow.secrets.environment_variables
.. autoapi-nested-parse::
Objects relating to sourcing connections from environment variables
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.secrets.environment_variables.EnvironmentVariablesBackend
Attributes
~~~~~~~~~~
.. autoapisummary::
airflow.secrets.environment_variables.CONN_ENV_PREFIX
airflow.secrets.environment_variables.VAR_ENV_PREFIX
.. py:data:: CONN_ENV_PREFIX
:annotation: = AIRFLOW_CONN_
.. py:data:: VAR_ENV_PREFIX
:annotation: = AIRFLOW_VAR_
.. py:class:: EnvironmentVariablesBackend
Bases: :py:obj:`airflow.secrets.BaseSecretsBackend`
Retrieves Connection object and Variable from environment variable.
.. py:method:: get_conn_uri(conn_id)
Return URI representation of Connection conn_id
:param conn_id: the connection id
:return: deserialized Connection
.. py:method:: get_conn_value(conn_id)
Retrieve from Secrets Backend a string value representing the Connection object.
If the client your secrets backend uses already returns a python dict, you should override
``get_connection`` instead.
:param conn_id: connection id
.. py:method:: get_variable(key)
Get Airflow Variable from Environment Variable
:param key: Variable Key
:return: Variable Value