airflow-supervisor
Run and monitor supervisord-managed jobs from Apache Airflow.
Manage a dedicated supervisord instance on an Airflow worker or an SSH host.
Define its programs directly in a Python DAG or in airflow-config YAML.
from datetime import datetime, timezone
from airflow import DAG
from airflow_supervisor import ProgramConfiguration, Supervisor, SupervisorAirflowConfiguration
with DAG(
dag_id="nightly-supervisor",
schedule="@daily",
start_date=datetime(2025, 1, 1, tzinfo=timezone.utc),
catchup=False,
) as dag:
supervisor = Supervisor(
dag=dag,
cfg=SupervisorAirflowConfiguration(
working_dir="/var/tmp/nightly-supervisor",
port="127.0.0.1:9001",
program={"nightly": ProgramConfiguration(command="/bin/sleep 5")},
),
)
The lifecycle writes configuration, starts supervisord and its programs, monitors
program state with airflow-ha, and stops and removes the instance on successful
completion. SupervisorSSH runs configuration and daemon commands over SSH;
program control and checks use the remote XML-RPC endpoint.
Documentation
Start with the tutorial to run a self-contained local job and check its cleanup. For an existing deployment, choose a how-to guide:
| Execution | Inline Python | airflow-config YAML |
|---|---|---|
| Local worker | Run a local job | Configure a local job |
| SSH host | Run a job over SSH | Configure an SSH job |
The API reference describes configuration fields, defaults, and DAG constraints. Why Airflow delegates process ownership explains worker placement, SSH and XML-RPC, and the Python/YAML configuration choices.
Published documentation is available at airflow-laminar.github.io/airflow-supervisor.
Ecosystem
- supervisor-pydantic supplies supervisord models and lifecycle tools.
- systemd-pydantic and cron-pydantic model alternative runtimes.
- airflow-systemd provides the analogous systemd lifecycle.
- airflow-cron converts cron jobs into ordinary Airflow tasks.
- airflow-pydantic supplies declarative task, host, and connection models.
- airflow-config produces YAML-driven DAGs.
Metadata
Release files for airflow-supervisor 1.10.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| airflow_supervisor-1.10.5.tar.gz | 21.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| airflow_supervisor-1.10.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.6 kB
Release files / airflow_supervisor-1.10.5.tar.gz
| Download URL | airflow_supervisor-1.10.5.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3799d51b4651c86997e5958d6fc07060ce99b29264c48bc9e40ed68b44b084f
|
|
BLAKE2b-256 checksum How to use checksums |
c59b3ed03ff3808ed24f933089a51483113529032c3fb26a01235056dd9b9785
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / airflow_supervisor-1.10.5-py3-none-any.whl
| Download URL | airflow_supervisor-1.10.5-py3-none-any.whl |
|---|---|
| Size | 32.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ca47645844c64b41a7c8335120f4d31620bab01c76b9c425148ac8d5727a2af
|
|
BLAKE2b-256 checksum How to use checksums |
569b2f2dc5442547386acc124fb5fb91dea371c49bdaad7972a00a1152be3140
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|