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.
airflow-supervisor and supervisor-pydantic manage supervisord jobs.
airflow-systemd and systemd-pydantic manage systemd services.
airflow-cron and cron-pydantic convert crontabs into DAG models.
airflow-balancer selects hosts, ports, pools, and queues.
airflow-common provides reusable operators and orchestration helpers.
Note
This library was generated using copier from the Base Python Project Template repository.