Pydantic models for Apache Airflow
Actively maintained. Last release 3 weeks ago, commits in 23 of the last 26 weeks. A safe choice.
$
pip install airflow-pydanticREADME as published on PyPI with version 1.7.5.
airflow-pydantic
Typed, serializable models for Apache Airflow DAGs, tasks, sensors, schedules, and runtime resources.
from airflow_pydantic import BashTask, Dag
dag = Dag(
dag_id="daily-report",
schedule="0 6 * * *",
start_date="2025-01-01",
catchup=False,
tasks={
"report": BashTask(bash_command="python /opt/jobs/report.py"),
},
)
print(dag.render())
Models validate configuration before Airflow parses it, support Python and
YAML workflows, render standalone DAG source, and instantiate native Airflow
objects. airflow-config is the recommended YAML entry point.
Documentation
Published documentation is available at airflow-laminar.github.io/airflow-pydantic.
Ecosystem
- airflow-config loads Hydra/YAML configuration and materializes these models.