Skip to main content

Templating for Airflow connections

Project description

Templating for Airflow connections

PyPI version

The connection plugin contains an Airflow macro for templating connections in tasks. You can use it like this:

# prints 'mysql'
{{ macros.connection_plugin.get_conn('airflow_db').host }}

connection_plugin.get_conn returns the Connection object that you can interact with as described in the documentation.


pip install airflow-connection-plugin


To start the docker container simply run the following command in the root directory:

cd example && docker-compose up

After that you can reach the airflow frontend via http://localhost:8080. You will find an example DAG that demonstrates how to retrieve different connection information.

Attention: Be especially careful when using passwords in templates.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for airflow-connection-plugin, version 1.0.0
Назва файлу, розмір File type Версія Python Дата завантаження Hashes
Назва файлу, розмір airflow-connection-plugin-1.0.0.tar.gz (2.1 kB) File type Source Версія Python Нема Дата завантаження Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page