Skip to main content

CLI tool that converts Python airflow Dags to YAML Dags for use with dagfactory

Project description

Python to Yaml Dag Converter for MWAA Serverless

License

Python to Yaml Dag Converter for MWAA Serverless is a command-line tool for converting Apache Airflow® Dags written in Python to dag-factory compatible Dags written in YAML.

Prerequisites

  • Python 3.11+

Benefits

  • Onboard existing Python Dags to declarative YAML
  • Ensures compatibility with DagFactory 1.0
  • Convert Python Dags to MWAA Serverless compatible YAML
  • Upload converted YAML to S3

⚡ Quick Start

Step 1: Install

pip install python-to-yaml-dag-converter-mwaa-serverless

Step 2: Use

dag-converter convert <python-dag-file>

Call with the --help flag for more options

Step 3: Review

Review the converted Dags in the output_yaml folder in the current directory

Options

  • --help Show help message and exit
  • --output: PATH Path to output converted YAML Dag(s) to [default: output_yaml]
  • --bucket: TEXT S3 bucket to upload converted Dags to. Uses local AWS credentials
  • --validate/--no-validate: Validate the output YAML using DagFactory
  • --debug/--no-debug Enable logging DagBag objects to .initial_task_attributes before and after conversion

Limitations

  • Only AWS operators and AWS provider packages are supported
  • Behavior that is not supported in dag-factory will not be converted
  • Dynamic task mapping conversion is not supported

Examples

dag-converter convert airflow_s3.py

Contributing and Bug Reporting

See CONTRIBUTING for more information.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

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

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file python_to_yaml_dag_converter_mwaa_serverless-0.0.1rc1.tar.gz.

File metadata

File hashes

Hashes for python_to_yaml_dag_converter_mwaa_serverless-0.0.1rc1.tar.gz
Algorithm Hash digest
SHA256 c9f493284b4c836b17acb37a6e092f18019e0991da74e8d68b8cdac682b615f2
MD5 54e37b9658ef449969544d2ffcc4a31e
BLAKE2b-256 dd040b75a8068df85b59bb00df4c135e9ff6f44e9ca076fbf8ead852ba482f6e

See more details on using hashes here.

File details

Details for the file python_to_yaml_dag_converter_mwaa_serverless-0.0.1rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_to_yaml_dag_converter_mwaa_serverless-0.0.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 124593a622e0e82a4fb7d6e151bebb8f384df280dc25d314b368203bd11c3a88
MD5 8899b1905ac33b1ed42fcad2072a4e49
BLAKE2b-256 1d7a8b81882d6ab53632c58ff22d22ce1e17ce439d688dea8b719dd9999db9a8

See more details on using hashes here.

Supported by

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