systemd-pydantic
July 18, 2026 ยท View on GitHub
Typed, YAML-friendly models and lifecycle tools for systemd services and timers.
from systemd_pydantic import ServiceConfiguration, ServiceUnitConfiguration
unit = ServiceUnitConfiguration(
unit={"description": "Example worker"},
service=ServiceConfiguration(
type="exec",
exec_start="/opt/jobs/worker",
restart="on-failure",
),
)
print(unit.to_unit_file())
The package models unit-file sections, named service/timer collections,
filesystem persistence, systemctl operations, and a convenience CLI used by
external orchestrators.
Documentation
- Tutorial: render a service and timer
- How-to guides
- Why services and timers share one model
- API reference
Published documentation is available at airflow-laminar.github.io/systemd-pydantic.
Ecosystem
- supervisor-pydantic provides the analogous supervisord models.
- cron-pydantic models traditional crontabs.
- airflow-systemd orchestrates these services from Airflow.
- airflow-supervisor and airflow-cron provide alternative Airflow integrations.
- airflow-pydantic supplies declarative Airflow models.
- airflow-config loads YAML-based Airflow configurations.
Note
This library was generated using copier from the Base Python Project Template repository.