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:

{{ macros.connection_plugin.get_conn('airflow_db').host }}

connection_plugin.get_conn returns the Connection object that you can interact with like it is described in the documentation.

Installation

pip install airflow-connection-plugin

Demo

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.

Source Distribution

airflow-connection-plugin-1.0.0rc3.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file airflow-connection-plugin-1.0.0rc3.tar.gz.

File metadata

  • Download URL: airflow-connection-plugin-1.0.0rc3.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for airflow-connection-plugin-1.0.0rc3.tar.gz
Algorithm Hash digest
SHA256 5ba861b0958e4284469836c136ae5338f8f1997e8f9de3a641c9f7d90fa542ed
MD5 b42392a4472c6f5d165af3505be5b3fc
BLAKE2b-256 81b4d60b52558f691bca29dd112aad831f4bca0fa5dd5172996413ef60d05bf2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page