pipeloom-airflow
The Apache Airflow renderer for pipeloom. It turns a compiled plan into the tasks of an Airflow DAG: one task per execution unit, plus a finalize task that closes the run.
$ pip install "pipeloom-airflow[airflow]"
Airflow is not a hard dependency. The extra pulls apache-airflow>=3.2,<4. Everything in this
release of the package is pure Python: configuration, loading a plan from a manifest or by
compiling the project, the task graph, the command lines a task runs and how Airflow task states
map to unit states. Importing the package never imports airflow.
- Load a plan from a stable manifest (
pipeloom compile --stable), or compile the project on the DAG parse path with a small on-disk cache keyed by the project files, the installed pipeloom versions, the target and the variables. - Every task runs
python -m pipeloom run --select unit:<id>with a run id derived from the DAG id and the Airflow run id, so a retried task and the finalize task agree on the run. - The artifact root of the target must be one directory that every task and the finalize task can see (a shared volume). A task that succeeded without a visible result file fails the run with PLA004.
- Diagnostics: PLA001 (unsupported execution mode), PLA002 (invalid configuration), PLA003 (the selection renders no unit), PLA004 (a task ended without a unit result), PLA005 (unsupported Airflow version), PLA006 (the compile cache cannot be used), PLA007 (the target boundary is not task).
PipeloomDag(aDAGsubclass) andPipeloomTaskGroup(aTaskGroupsubclass) build the tasks at parse time. Both add nothing else to the DAG;PipeloomDagadds the paramfull_refresh(default false) unless you define it.- Execution modes
local(the worker's own interpreter) andvirtualenv(ExecutionConfig.virtualenv_dir, created on every worker with pipeloom installed). Each task runs the core in a child process group; killing the task sends SIGTERM, then SIGKILL after the cancel grace (the core default of 30 seconds; the manifest does not carry the target'scancel_grace, and the same value sets a pod's termination grace). Exit 2, and exit 1 with a permanent error underretry_on: transient, fail the task without a retry. - The finalize task (
pipeloom_finalize, trigger ruleall_done, one retry) reads the states of the unit tasks and runspipeloom finalize --unit-states; it fails when the run failed, so the DAG run fails too.
from datetime import datetime
from pipeloom_airflow.config import ProjectConfig
from pipeloom_airflow.dag import PipeloomDag
dag = PipeloomDag(
dag_id="shop",
schedule=None,
start_date=datetime(2026, 1, 1),
project_config=ProjectConfig("/srv/shop", manifest_path="/srv/shop/target/manifest.json"),
target="prod",
)
Kubernetes mode
$ pip install "pipeloom-airflow[kubernetes]"
ExecutionMode.KUBERNETES runs every unit, and the finalize step, as a pod built by
KubernetesPodOperator (cncf-kubernetes provider >=10.25,<11). Set
ExecutionConfig.kubernetes=KubernetesConfig(image=..., namespace=..., python=..., pod_kwargs=...);
project_dir and manifest_path of the execution config are paths inside the pod. pod_kwargs
passes volumes, mounts, resources and a service account straight through, and
ExecutionConfig.env becomes pod environment variables. The artifact root must be shared storage
mounted at the same path in every pod (a ReadWriteMany claim or an object-store CSI mount, given
through volumes and volume_mounts). Pods are never deferrable and push no XCom, the arguments
are set when the task runs, and retry_on is not enforced because Airflow sees only the pod's
result. The finalize pod gets the unit states inline (--unit-states-json); above 120 KiB (one Linux exec argument is capped at 128 KiB) it
fails with PLA002, so split the project with render_config.select.
Databricks mode
$ pip install "pipeloom-airflow[databricks]"
ExecutionMode.DATABRICKS runs the project as the Databricks job that pipeloom-databricks
renders, without the Databricks Airflow provider. The DAG gets a pipeloom_launch task, one
sensor per Databricks task key (with the plan's edges) and a pipeloom_finalize sensor on the
job's finalize task (trigger rule all_done) that fails when the pipeloom run failed.
- The launch compiles the project at
project_diron the worker, checks its plan hash against the DAG's (PLX103), and starts the job run named after the DAG run. A missing job is PLD007 and a job deployed from other settings is PLD008, unlessdatabricks_ensure_job=Truedeploys it. A retried or cleared launch attaches to the same run, or repairs it when a task failed; Databricks owns the task retries. Launch retries default to 2. - The Airflow connection
databricks_conn_id(defaultdatabricks_default) holds the host and a token in its password (orextra.token); withextra.service_principal_oauthtrue, the OAuth client id is the login and its secret the password. No profile,~/.databrickscfgorDATABRICKS_*variable is read; a connection that cannot be used is PLD010. databricks_poll="per_task"(the default) mirrors the run live: the launch returns right after run-now or repair, and each sensor makes oneget_runcall. Without a verdict yet it defers on its own trigger, which polls everydatabricks_poll_intervalseconds (30 by default), rides out up to 5 transient API errors in a row (429, 5xx, no answer) with doubling sleeps, and fails the sensor on any other API error or when the retries run out. A sensor gives up afterdatabricks_timeoutseconds (24 hours by default). Cost: one API call per waiting sensor per interval.databricks_poll="shared": the launch defers on one trigger that polls the whole run, keeps the final snapshot in its XCom, and the sensors read it without calling the API. One call per interval in total, but a task's result shows only when the whole run is over.- The triggerer needs
pipeloom-airflow[databricks]installed in both modes. Insharedmode the launch's wait also ends afterdatabricks_timeoutseconds; the launch then retries and attaches to the same run.
Airflow does not run on Windows, so neither do the DAG classes.
License: Apache-2.0.
Metadata
Release files for pipeloom-airflow 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pipeloom_airflow-1.0.0.tar.gz | 87.5 kB | With provenance | Details for pipeloom_airflow-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pipeloom_airflow-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pipeloom_airflow-1.0.0-py3-none-any.whl |
Total release size: 150.3 kB
Release files / pipeloom_airflow-1.0.0.tar.gz
| Download URL | pipeloom_airflow-1.0.0.tar.gz |
|---|---|
| Size | 87.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f09a4aadb269d1447cfff594933251acbb6860d2aeb8ad5a148058e1e7400308
|
|
BLAKE2b-256 checksum How to use checksums |
b1cf9f35cf17fa2b3cc765d54b665376db46c818fb386edadea42723e58deaeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / pipeloom_airflow-1.0.0-py3-none-any.whl
| Download URL | pipeloom_airflow-1.0.0-py3-none-any.whl |
|---|---|
| Size | 62.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9b45bb4fce349167d83574eb5cdd1e45076dbb706640b38961b3f6bdf254f9e
|
|
BLAKE2b-256 checksum How to use checksums |
19d8dd5a1555d5851603da7514cc28ce4a453e11f9d914d55ff7777f95921ed8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for pipeloom-airflow 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pipeloom_airflow-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.