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 |  -------->  | Airflow api-server        |
|   against local SQLite)|  manifest   | +-----------------------+ |
| syncer (push)          |             | | dagsyncer plugin      | |
|   extracts serialized  |             | |  auth + validation    | |
|   dags, POSTs manifest |             | |  dag parsing update   | |
+------------------------+             | |  -> 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 is an Airflow plugin mounted into the api-server (edge3 provider pattern), so it inherits the api-server's TLS and deployment. Ingestion goes through Airflow's own dag parsing 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. Push client and listener plugin work end-to-end; full scheduler/edge-worker loop validation is in progress.

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

Control plane - install the listener next to the api-server and configure the shared secret; the plugin is discovered automatically:

pip install "apache-airflow-dagsyncer[listen]"
export AIRFLOW__DAGSYNCER__API_SECRET_KEY="..."
airflow api-server

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://airflow.example.com \
  --token "$DAGSYNCER_TOKEN"

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.1rc3.tar.gz (13.6 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.1rc3-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for apache_airflow_dagsyncer-0.0.1rc3.tar.gz
Algorithm Hash digest
SHA256 b9b1abfcc31c0c9328223805e5902c0a9ce9414421a248c939c30a909654e298
MD5 9174a84063ba60d0a73930dde5bb983f
BLAKE2b-256 555b774ca08204408473e6998e69c4b8d66c839dbeca9f6b4db0cf6d326aed69

See more details on using hashes here.

Provenance

The following attestation bundles were made for apache_airflow_dagsyncer-0.0.1rc3.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.1rc3-py3-none-any.whl.

File metadata

File hashes

Hashes for apache_airflow_dagsyncer-0.0.1rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 74e0cafd3bed1b5ca9922b48aebb9271e49fbc4580dec1ccc3becc8cadc08ed7
MD5 ceab584a934f4f4b0f096ce228aa4c52
BLAKE2b-256 2580bcd1a6522e1702ec98bf48730ca74f04908934201874f348d7388ed81ad8

See more details on using hashes here.

Provenance

The following attestation bundles were made for apache_airflow_dagsyncer-0.0.1rc3-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