Skip to main content

CLI utility to sync DAG files into an Apache Airflow dags folder

Project description

Apache Airflow DagSyncer

Category Badges
License License
PyPI PyPI version PyPI - Python Version

apache-airflow-dagsyncer ships serialized dags from a data plane to an Apache Airflow control plane over HTTP/S - edge-executor style. The control plane never parses dag files and never dials into the data plane.

  Data plane (remote)                        Control plane
+------------------------+    HTTP/S      +------------------------+
| DagProcessor (run-once |  ---------->   | listener               |
|   against local SQLite)|   manifest     |   auth + validation    |
| syncer (push)          |                |   SerializedDagModel   |
|   extracts serialized  |                |     .write_dag()       |
|   dags, POSTs manifest |                |   -> control-plane DB  |
+------------------------+                +------------------------+

On each deployment the syncer runs the DagProcessor once against a local SQLite database, extracts the serialized dag JSON, and pushes a full bundle manifest to the listener. The listener ingests it through Airflow's own update path, so versioning, hashing, and consistency stay Airflow's responsibility. Dags absent from the manifest are deactivated.

See PROTOCOL.md for the wire protocol.

Status: early development. The push and listen commands are not implemented yet; the wire protocol (v1) is defined.

Table of contents

Requirements

Component Version
Python 3.12+

The syncer side has no runtime dependencies. The listener side requires Apache Airflow, installed via the [listen] extra:

pip install "apache-airflow-dagsyncer[listen]"

Installing from PyPI

pip install apache-airflow-dagsyncer

Or with uv:

uv pip install apache-airflow-dagsyncer

Usage

Data plane - parse a bundle and push it to the control plane:

apache-airflow-dagsyncer push \
  --bundle-path /opt/dags \
  --bundle-name my-dags \
  --listener-url https://cp.example.com:8793 \
  --token "$DAGSYNCER_TOKEN"

Control plane - run the listener:

apache-airflow-dagsyncer listen --host 0.0.0.0 --port 8793

Contributing

Want to help build this project? Set up a development environment with uv:

git clone https://github.com/abhishekbhakat/apache-airflow-dagsyncer.git
cd apache-airflow-dagsyncer
uv sync
uv run apache-airflow-dagsyncer --help

License

Apache License, Version 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apache_airflow_dagsyncer-0.0.1rc2.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apache_airflow_dagsyncer-0.0.1rc2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file apache_airflow_dagsyncer-0.0.1rc2.tar.gz.

File metadata

File hashes

Hashes for apache_airflow_dagsyncer-0.0.1rc2.tar.gz
Algorithm Hash digest
SHA256 c4a0cacc486f2a8f44de5bfb966a49eef20aec701c5d6699fdab19d85cf48be1
MD5 c52ad957b37ee90d94c70b1a7d8483f8
BLAKE2b-256 23950126c5f098b175f329700d3b5f984f2f52da4b7962f5b69ae2f08e89b9bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for apache_airflow_dagsyncer-0.0.1rc2.tar.gz:

Publisher: release.yml on abhishekbhakat/apache-airflow-dagsyncer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file apache_airflow_dagsyncer-0.0.1rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for apache_airflow_dagsyncer-0.0.1rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 c20e3ec689fb6633a5dc8d6aa7049f9a05d047f4ee1c696bc7f8f8b792c507d8
MD5 813af500e1072efe895796bbd9bfd388
BLAKE2b-256 943245ab24d1e29156bd7aff1986c7859bce3b3e91de9957334ac5ea510e60e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for apache_airflow_dagsyncer-0.0.1rc2-py3-none-any.whl:

Publisher: release.yml on abhishekbhakat/apache-airflow-dagsyncer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page