systemd-pydantic

Typed, YAML-friendly models and lifecycle tools for systemd services and timers.

Build Status codecov License PyPI

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

Published documentation is available at airflow-laminar.github.io/systemd-pydantic.

Ecosystem

Note

This library was generated using copier from the Base Python Project Template repository.