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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file airflow-diagrams-1.0.0rc1.tar.gz.

File metadata

  • Download URL: airflow-diagrams-1.0.0rc1.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.9 Linux/5.11.0-1025-azure

File hashes

Hashes for airflow-diagrams-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 f32a48861efcadd6de4ad26c748015ddda58aa026ee67d49117fc8a31acaf606
MD5 2abc472ade6aa745990e39f212799e89
BLAKE2b-256 0031cb1e86eed3be2c19303d2e905216719a1cae7c130c981744b3441b0d5744

See more details on using hashes here.

File details

Details for the file airflow_diagrams-1.0.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for airflow_diagrams-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 19470152c1b69aa8409e650cce01d06ff9cc4dc3d38df4abe092e68ce4fc7abb
MD5 13cbe6f77966d7a14eee24edc6c323aa
BLAKE2b-256 acca7c18ece9ee7277834d2f45ec73825758342c2026e51fe07096c3c4ef9c2a

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