Skip to main content

High-level Python client for systemd user services: unit management, journal reading, sync + async

Project description

systemd-client — High-Level Python Client for systemd User Services

Module Version Python License systemd

Unified async + sync Python API for systemd unit management and journal reading

API unificada async + sync en Python para gestion de unidades systemd y lectura del journal


Choose Your Language / Elige tu idioma

English Documentation     Spanish Documentation


Architecture Overview

graph TD
    subgraph APP["🐍 Your Application"]
        SYNC["SystemdClient<br/>Synchronous API"]
        ASYNC["AsyncSystemdClient<br/>Async API"]
    end

    subgraph BACKENDS["⚙️ Backends"]
        SUB["🖥️ SubprocessBackend<br/>systemctl --user"]
        DBUS["🔌 DBusBackend<br/>dasbus (optional)"]
    end

    subgraph JOURNAL["📋 Journal Reader"]
        JR["AsyncJournalReader<br/>journalctl --user --output=json"]
    end

    subgraph SYSTEMD["🐧 systemd (user session)"]
        UNITS[("🔧 User Units<br/>services, timers, sockets")]
        JRNL[("📜 Journal<br/>log entries")]
    end

    SYNC --> ASYNC
    ASYNC --> SUB
    ASYNC --> DBUS
    ASYNC --> JR
    SUB --> UNITS
    DBUS --> UNITS
    JR --> JRNL

    style APP fill:#d0ebff,stroke:#1971c2,stroke-width:2px
    style BACKENDS fill:#b2f2bb,stroke:#2f9e44,stroke-width:2px
    style JOURNAL fill:#f3d9fa,stroke:#9c36b5,stroke-width:2px
    style SYSTEMD fill:#fff3bf,stroke:#f08c00,stroke-width:2px
    style SYNC fill:#d0ebff,stroke:#1971c2,stroke-width:2px
    style ASYNC fill:#d0ebff,stroke:#1971c2,stroke-width:2px
    style SUB fill:#b2f2bb,stroke:#2f9e44,stroke-width:2px
    style DBUS fill:#b2f2bb,stroke:#2f9e44,stroke-width:2px
    style JR fill:#f3d9fa,stroke:#9c36b5,stroke-width:2px
    style UNITS fill:#fff3bf,stroke:#f08c00
    style JRNL fill:#fff3bf,stroke:#f08c00

Quick Start

# Install
pip install systemd-client

# Install with DBus backend support
pip install systemd-client[dbus]

# Install with Pydantic models
pip install systemd-client[all]
from systemd_client import SystemdClient

client = SystemdClient()
for unit in client.list_units(unit_type="service"):
    print(f"{unit.name}: {unit.active_state}")

systemd-client · github.com/kalexnolasco/systemd-client

© 2026 kalexnolasco

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

systemd_client-0.1.0.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

systemd_client-0.1.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file systemd_client-0.1.0.tar.gz.

File metadata

  • Download URL: systemd_client-0.1.0.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for systemd_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f8d61e45ba36268141c6693490eecc065a4e83794f750a60b9a9daebc0ddc5b9
MD5 8da4db8d43da8ba654833452427e89dd
BLAKE2b-256 b98643921a9585bf74082834cc0ef2275ff4dcf142cd8dd95dd57a426f4a0a43

See more details on using hashes here.

Provenance

The following attestation bundles were made for systemd_client-0.1.0.tar.gz:

Publisher: publish.yml on kalexnolasco/systemd-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file systemd_client-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: systemd_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for systemd_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 533817be8702612bc36af766f2c6b02cf9a93c284aa3af078ccced354fef92c9
MD5 7ef8dfc8b5468d02d026767bf17d1f6d
BLAKE2b-256 86b2c59335fd0563b110db830442fc56c9a0e5c839c68a0fd8bf99340e0fb042

See more details on using hashes here.

Provenance

The following attestation bundles were made for systemd_client-0.1.0-py3-none-any.whl:

Publisher: publish.yml on kalexnolasco/systemd-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page