skillfed

dag-factory

Dynamically build Apache Airflow DAGs from YAML files

dag-factory v1.1.0 679.4K downloads/30d#5,370 on PyPI1,452
Permissive license Apache-2.0 Active released

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-factory

uv

uv add dag-factory

poetry

poetry add dag-factory

Installing 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

Development Status :: 5 - Production/StableFramework :: Apache AirflowIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Database

Tags

airflow dag from yamldeclarative airflow dag builderairflow dag factory configurationyaml to airflow dagairflow dag generationairflow workflow as code yamlairflow dag templating
airflow-pluginworkflow-orchestrationinfrastructure-as-code

More Database packages

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

redis

Python client library for connecting to and…

permissive · top 1,000 on PyPI

ydb

YDB Python SDK is the official client library…

permissive · top 1,000 on PyPI

snowflake-connector-python

Connects Python applications to Snowflake data…

permissive · top 1,000 on PyPI

sqlparse

sqlparse tokenizes SQL text into a tree of…

permissive · top 1,000 on PyPI

dbt-adapters

Provides base adapter protocols and shared…

permissive · top 1,000 on PyPI

apache-airflow

Apache Airflow is a platform for…

permissive · top 1,000 on PyPI

mwaa-dr

Generates backup, restore, and cleanup DAGs for…

unclear · top 15,000 on PyPI

apache-airflow-core

Apache Airflow's core runtime that schedules,…

permissive · top 5,000 on PyPI

apache-airflow-task-sdk

Provides Python interfaces and task execution…

permissive · top 5,000 on PyPI

apache-airflow-providers-git

Integrates Git version control operations into…

permissive · top 15,000 on PyPI

apache-airflow-providers-neo4j

Integrates Neo4j graph database operations into…

permissive · top 15,000 on PyPI

apache-airflow-providers-apache-beam

Integrates Apache Beam data processing…

permissive · top 15,000 on PyPI

apache-airflow-providers-discord

Integrates Discord messaging into Apache…

permissive · top 15,000 on PyPI

apache-airflow-providers-openai

Integrates OpenAI APIs into Apache Airflow…

permissive · top 15,000 on PyPI

apache-hamilton

Apache Hamilton is a Python library for…

permissive · top 15,000 on PyPI