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 / AIP-92 workaround. Push client and listener plugin work end-to-end; full scheduler/edge-worker loop validation is in progress. This package exists because AIP-92 - upstream's planned DAG-processor isolation - is still a draft and not yet implemented end-to-end. When AIP-92 lands natively, dagsyncer should become unnecessary and can be deprecated.

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.1rc4.tar.gz (13.8 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.1rc4-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for apache_airflow_dagsyncer-0.0.1rc4.tar.gz
Algorithm Hash digest
SHA256 c7a2fba9eed1d6b50eb94d9406cc61272818e8fc2c6b3cc9be63ba622aec23f3
MD5 ef888f485498657e290526a9a58409bc
BLAKE2b-256 102ee8870cc29632f03666ec910723232186a3bbd4f6fffe9ea1fd1649579e82

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for apache_airflow_dagsyncer-0.0.1rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 bf136f97355a01e3805b316de8d4b32a7e20c85e2f92a299f33b4aa0d0a2fe85
MD5 b9e3e090a2d1f74498137dd55d96d50e
BLAKE2b-256 d0189e0bb00cc1123a33bfadacf3e824561daac7cbf08794dfddcf3bb27a9f37

See more details on using hashes here.

Provenance

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