Skip to main content

Enforce Best Practices for all your Airflow DAGs. ⭐

Project description

airflint

pre-commit.ci status test workflow codeql-analysis workflow codecov PyPI version License PyPI - Python Version PyPI version

Enforce Best Practices for all your Airflow DAGs. ⭐

🧑‍🏫 Rules

  • use datetime instead of days_ago in DAG start_date
  • task decorator instead of PythonOperator and PythonVenvOperator
  • dag decorator instead of DAG
  • jinja string instead of Variable.get

⚠️ airflint does not remove imports. For removing unused imports please use autoflake additionally.

Please check the known issues first, in case you find any bugs. If you cannot find them there, please open an Issue.

💡 Future Ideas

  • fix Official Airflow DeprecationWarnings

🚀 Get started

To install it from PyPI run:

pip install airflint

Then just call it like this:

usage

pre-commit

Alternatively you can add the following repo to your pre-commit-config.yaml:

  - repo: https://github.com/feluelle/airflint
    rev: v0.1.1-alpha
    hooks:
      - id: airflint
        args: ["-a"]  # Use -a for replacing inplace

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

airflint-0.1.2a0.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

airflint-0.1.2a0-py3-none-any.whl (12.2 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