CLI tool that converts Python airflow Dags to YAML Dags for use with dagfactory
Project description
Python to Yaml Dag Converter for MWAA Serverless
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
--helpShow 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-debugEnable 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-factorywill not be converted - Dynamic task mapping conversion is not supported
Examples
- See supported examples
- Try one out
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
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_to_yaml_dag_converter_mwaa_serverless-0.1.3.tar.gz.
File metadata
- Download URL: python_to_yaml_dag_converter_mwaa_serverless-0.1.3.tar.gz
- Upload date:
- Size: 42.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2d341e5489eb1d35847130c08f532a718492ecb42d6b0b8764f7b244c682956
|
|
| MD5 |
3075464dd3e78b2287571e5fb50e535b
|
|
| BLAKE2b-256 |
9210e8eebda4d362d87e711cffd6531ba322132c53032e5ac7136a0312f606da
|
File details
Details for the file python_to_yaml_dag_converter_mwaa_serverless-0.1.3-py3-none-any.whl.
File metadata
- Download URL: python_to_yaml_dag_converter_mwaa_serverless-0.1.3-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8809688536d7a368765ad098d7212e1266668c97eb067a9354d22567a6f78a7
|
|
| MD5 |
26f291c78accc7658c221c163dedfd8a
|
|
| BLAKE2b-256 |
c25ac1173ff3bf1f958c2d3328ecf60967f0a3599f12340f78c5fbb2535fbd1f
|