Skip to main content

Auto-generated Diagrams from Airflow DAGs.

Project description

airflow-diagrams

pre-commit.ci status PyPI version License PyPI - Python Version

Auto-generated Diagrams from Airflow DAGs.

This project aims to easily visualise your Airflow DAGs on service level from providers like AWS, GCP, Azure, etc. via diagrams.

🚀 Get started

Installation

To install it from PyPI run:

pip install airflow-diagrams

Usage

To use this auto-generator just run the following command:

airflow_diagrams generate

Note: The default command is trying to authenticate to http://localhost:8080/api/v1 via username admin and password admin. You can change those values via flags i.e. -h, -u or -p. Check out the help i.e. --help for more information.

This will create a file like <dag-id>_diagrams.py which contains the definition to create a diagram. Run this file and you will get a rendered diagram.

Examples of generated diagrams can be found in the examples directory.

🤔 How it Works

ℹ️ At first it connects, by using the official Apache Airflow Python Client, to your Airflow installation to retrieve all DAGs (in case you don't specify any dag_id) and all Tasks for the DAG(s).

🔮 Then it tries to find a diagram node for every DAGs task, by using Fuzzy String Matching, that matches the most. If you are unhappy about the match you can also provide a mapping.yml file to statically map from Airflow task to diagram node.

🪄 Lastly it renders the results into a python file which can then be executed to retrieve the rendered diagram. 🎉

❤️ Contributing

Contributions are very welcome. Please go ahead and raise an issue if you have one or open a PR. Thank you.

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-diagrams-1.0.0rc1.tar.gz (11.7 kB view hashes)

Uploaded Source

Built Distribution

airflow_diagrams-1.0.0rc1-py3-none-any.whl (12.8 kB view hashes)

Uploaded Python 3

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