dag-factory
Dynamically build Apache Airflow DAGs from YAML files
What it is and what it does
dag-factory is a library that lets you define Apache Airflow DAGs using YAML configuration files instead of writing Python code. It reads YAML files and generates fully functional Airflow DAGs, making it possible to construct workflows without needing to understand Airflow's Python API or object model. The library supports scheduling, dynamically mapped tasks, custom operators, callbacks, and KubernetesPodOperator, covering most common workflow patterns.
It's designed for teams that want to avoid repetitive DAG boilerplate, enable non-Python developers to define workflows, or maintain DAG definitions in a more declarative, version-control-friendly format. The package depends on Apache Airflow, packaging, pathspec, pyyaml, and typer, and is actively maintained with support for modern Python versions (3.10–3.14) and Airflow 2.9+ including Airflow 3.
Use it for:
- Define and version-control multiple similar Airflow workflows using YAML templates without duplicating Python code.
- Enable data engineers or domain experts without Python expertise to create and modify Airflow DAGs.
- Rapidly prototype and iterate on workflow definitions by editing YAML files instead of redeploying Python modules.
- Manage large numbers of DAGs with consistent structure and defaults across an organization.
- Reduce maintenance burden by centralizing DAG logic in configuration rather than scattered Python files.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
dag-factory builds Apache Airflow DAGs declaratively from YAML configuration files, eliminating the need to write Python code for DAG construction.
Yes. dag-factory is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It solves a real problem—reducing boilerplate and enabling declarative DAG definition—for Airflow users. Install it if you manage multiple similar Airflow workflows or want to let non-Python developers define DAGs; skip it only if your DAGs are highly custom or require complex Python logic that YAML cannot express.
Install
dag-factory on PyPI
pip
pip install dag-factoryuv
uv add dag-factorypoetry
poetry add dag-factoryInstalling dag-factory
Before you install
Low install friction with a pure Python wheel. Actively maintained as of 2026-08-14 with 1452 repository stars. Requires Apache Airflow 2.9+ and Python 3.10+, both of which are current versions.
License in practice
Licensed under Apache License 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions—suitable for most production and proprietary projects.
Quickstart
pip install dag-factory
from dag_factory.dag_factory import load_yml_dags
dags = load_yml_dags(dag_folder='dags', safe_mode=True)
Requires Apache Airflow 2.9+ and Python 3.10+ to be installed and configured; Airflow environment must be set up before dag-factory can load DAGs.
Verify before relying
- Specific performance characteristics when handling large numbers of DAGs or complex task dependencies.
- Extent of custom operator support and any limitations on operator types that can be declared via YAML.
- Whether all Airflow 3 features are fully supported or if certain advanced features still require Python code.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — apache-airflow, packaging, pathspec, pyyaml, typer |
| Maintenance | actively maintained — 99 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 679,361/month — #5,370 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dag_factory-1.1.0-py3-none-any.whl
Keywords: airflow, apache-airflow, astronomer, dag, provider
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
apache-airflowApache Airflow is a platform for…
permissive · top 1,000 on PyPI
mwaa-drGenerates backup, restore, and cleanup DAGs for…
unclear · top 15,000 on PyPI
apache-airflow-coreApache Airflow's core runtime that schedules,…
permissive · top 5,000 on PyPI
apache-airflow-task-sdkProvides Python interfaces and task execution…
permissive · top 5,000 on PyPI
apache-airflow-providers-gitIntegrates Git version control operations into…
permissive · top 15,000 on PyPI
apache-airflow-providers-neo4jIntegrates Neo4j graph database operations into…
permissive · top 15,000 on PyPI
apache-airflow-providers-apache-beamIntegrates Apache Beam data processing…
permissive · top 15,000 on PyPI
apache-airflow-providers-discordIntegrates Discord messaging into Apache…
permissive · top 15,000 on PyPI
apache-airflow-providers-openaiIntegrates OpenAI APIs into Apache Airflow…
permissive · top 15,000 on PyPI
apache-hamiltonApache Hamilton is a Python library for…
permissive · top 15,000 on PyPI