airflow-connection-plugin-1.0.0rc5
توضیحات
Templating for Airflow connections
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | airflow-connection-plugin-1.0.0rc5 |
| نام | airflow-connection-plugin |
| نسخه کتابخانه | 1.0.0rc5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | bakdata |
| ایمیل نویسنده | opensource@bakdata.com |
| آدرس صفحه اصلی | https://github.com/bakdata/connection_plugin |
| آدرس اینترنتی | https://pypi.org/project/airflow-connection-plugin/ |
| مجوز | MIT |
# Templating for Airflow connections
[](https://badge.fury.io/py/airflow-connection-plugin)
The connection plugin contains an [Airflow](https://airflow.apache.org/) macro for [templating](https://airflow.apache.org/concepts.html#id1) 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](https://airflow.apache.org/_api/airflow/models/connection/index.html#airflow.models.connection.Connection)
that you can interact with as 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](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.
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.* | Python |
نحوه نصب
نصب پکیج whl airflow-connection-plugin-1.0.0rc5:
pip install airflow-connection-plugin-1.0.0rc5.whl
نصب پکیج tar.gz airflow-connection-plugin-1.0.0rc5:
pip install airflow-connection-plugin-1.0.0rc5.tar.gz