airflow.secrets.local_filesystem
¶
Objects relating to retrieving connections and variables from local file
Module Contents¶
Classes¶
Retrieves Connection objects and Variables from local files |
Functions¶
Returns |
|
|
Load variables from a text file. |
|
This function is deprecated. Please use airflow.secrets.local_filesystem.load_connections_dict.", |
|
Load connection from text file. |
Attributes¶
- airflow.secrets.local_filesystem.get_connection_parameter_names()[source]¶
Returns
airflow.models.connection.Connection
constructor parameters.
- airflow.secrets.local_filesystem.load_variables(file_path)[source]¶
Load variables from a text file.
JSON
, YAML and.env
files are supported.
- airflow.secrets.local_filesystem.load_connections(file_path)[source]¶
This function is deprecated. Please use airflow.secrets.local_filesystem.load_connections_dict.",
- airflow.secrets.local_filesystem.load_connections_dict(file_path)[source]¶
Load connection from text file.
JSON
, YAML and.env
files are supported.- Returns
A dictionary where the key contains a connection ID and the value contains the connection.
- Return type
- class airflow.secrets.local_filesystem.LocalFilesystemBackend(variables_file_path=None, connections_file_path=None)[source]¶
Bases:
airflow.secrets.base_secrets.BaseSecretsBackend
,airflow.utils.log.logging_mixin.LoggingMixin
Retrieves Connection objects and Variables from local files
JSON
, YAML and.env
files are supported.- Parameters
- get_connection(self, conn_id)[source]¶
Return connection object with a given
conn_id
.Tries
get_conn_value
first and if not implemented, triesget_conn_uri
- Parameters
conn_id (str) -- connection id