Metadata-Version: 2.4
Name: airflow-systemd
Version: 0.1.0
Summary: Systemd operators and configuration for long-running tasks
Project-URL: Repository, https://github.com/airflow-laminar/airflow-systemd
Project-URL: Homepage, https://github.com/airflow-laminar/airflow-systemd
Author-email: the airflow-systemd authors <t.paine154@gmail.com>
License: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.11
Requires-Dist: airflow-ha<1.7,>=1.4.1
Requires-Dist: airflow-pydantic<1.6,>=1.5.5
Requires-Dist: systemd-pydantic<0.2,>=0.1
Provides-Extra: airflow
Requires-Dist: apache-airflow-providers-ssh; extra == 'airflow'
Requires-Dist: apache-airflow-providers-standard; extra == 'airflow'
Requires-Dist: apache-airflow<3,>=2.8; extra == 'airflow'
Provides-Extra: airflow3
Requires-Dist: apache-airflow-providers-ssh; extra == 'airflow3'
Requires-Dist: apache-airflow-providers-standard; extra == 'airflow3'
Requires-Dist: apache-airflow<3.2,>=3; extra == 'airflow3'
Provides-Extra: develop
Requires-Dist: airflow-config>=0.1.2; extra == 'develop'
Requires-Dist: airflow-pydantic; extra == 'develop'
Requires-Dist: build; extra == 'develop'
Requires-Dist: bump-my-version; extra == 'develop'
Requires-Dist: check-dist; extra == 'develop'
Requires-Dist: codespell; extra == 'develop'
Requires-Dist: hatchling; extra == 'develop'
Requires-Dist: mdformat; extra == 'develop'
Requires-Dist: mdformat-tables>=1; extra == 'develop'
Requires-Dist: pytest; extra == 'develop'
Requires-Dist: pytest-cov; extra == 'develop'
Requires-Dist: ruff; extra == 'develop'
Requires-Dist: systemd-pydantic<0.2,>=0.1; extra == 'develop'
Requires-Dist: twine; extra == 'develop'
Requires-Dist: ty; extra == 'develop'
Requires-Dist: uv; extra == 'develop'
Requires-Dist: wheel; extra == 'develop'
Description-Content-Type: text/markdown

# airflow-systemd

Systemd operators and configuration for long-running tasks

[![Build Status](https://github.com/airflow-laminar/airflow-systemd/actions/workflows/build.yaml/badge.svg?branch=main&event=push)](https://github.com/airflow-laminar/airflow-systemd/actions/workflows/build.yaml)
[![codecov](https://codecov.io/gh/airflow-laminar/airflow-systemd/branch/main/graph/badge.svg)](https://codecov.io/gh/airflow-laminar/airflow-systemd)
[![License](https://img.shields.io/github/license/airflow-laminar/airflow-systemd)](https://github.com/airflow-laminar/airflow-systemd)
[![PyPI](https://img.shields.io/pypi/v/airflow-systemd.svg)](https://pypi.python.org/pypi/airflow-systemd)

## Overview

`airflow-systemd` mirrors `airflow-supervisor` for hosts managed by systemd. It turns a
`SystemdAirflowConfiguration` into an Airflow task lifecycle:

```text
configure-systemd -> start-services -> check-services
                                      |             |
                                      v             v
                               restart-services  stop-services -> unconfigure-systemd
```

Airflow owns scheduling, so this integration runs service units directly rather than
starting systemd timer units. Timer models remain available through `systemd-pydantic`
for non-Airflow consumers.

```python
from airflow import DAG
from airflow_systemd import ServiceConfiguration, ServiceUnitConfiguration, Systemd, SystemdAirflowConfiguration

dag = DAG(dag_id="long-running-job", schedule="@daily")
config = SystemdAirflowConfiguration(
    service={
        "long-running-job": ServiceUnitConfiguration(
            service=ServiceConfiguration(type="exec", exec_start="/opt/jobs/run"),
        )
    },
    scope="user",
)
Systemd(dag=dag, cfg=config)
```

The local integration supports the same Airflow-specific controls as
`airflow-supervisor`: status interval and timeout, runtime/end-time limits, retrigger
limits, pools, optional restart behavior, stop-on-exit, and cleanup.

> [!NOTE]
> This library was generated using [copier](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).
