--- id: cysystemd version: "2.0.5" license: Apache 2.0 license_treatment: permissive maintenance: active --- # cysystemd — systemd wrapper in Cython License: permissive · Maintenance: active · Downloads: 77.8K/mo ## What it is and what it does cysystemd is a Cython wrapper around systemd's libsystemd C library, providing Python bindings for journald (the systemd journal) and systemd daemon features. It allows Python applications to write structured log entries to the system journal, read journal records with filtering and seeking, and send service notifications (READY, STOPPING, STATUS) to systemd. The package includes a logging handler for Python's standard logging module, making it easy to integrate journald into existing logging pipelines. Version 2.0.5 is actively maintained and supports Python 3.8 through 3.14. It uses precompiled wheels for Linux x86_64 and aarch64 architectures, though source installation is recommended if you encounter compatibility issues. The package requires libsystemd development headers at build time and has no runtime Python dependencies, making it lightweight once installed. Use it for: - Integrate Python application logs directly into systemd journal for centralized system logging and journalctl querying - Send daemon readiness and status notifications to systemd for proper service lifecycle management and watchdog integration - Query and filter systemd journal entries programmatically to build monitoring, alerting, or log aggregation tools - Implement async journal polling to stream new log entries as they arrive for real-time log processing - Write structured metadata alongside log messages for better searchability and filtering in systemd journal ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Cython-based wrapper for systemd's libsystemd library, enabling Python applications to read and write to the systemd journal, send daemon notifications, and interact with systemd services. Yes, if you are building Python services on Linux and want native systemd integration. The package is production-stable, actively maintained, and has no security vulnerabilities. Install friction is moderate (requires system headers), but wheels are available for common configurations. Not suitable for non-Linux platforms or applications that do not need systemd interaction. ## Install pip install cysystemd uv add cysystemd poetry add cysystemd ## Installing cysystemd Before you install: Medium install friction due to compiled C extension requiring libsystemd development headers. Wheels are provided for multiple Python versions (3.8–3.14) and architectures (x86_64, aarch64) using manylinux_2_34 format, but source installation requires system dependencies. Package is actively maintained with recent commits. License in practice: Licensed under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions. No copyleft obligations. Quickstart: # Install pip install cysystemd # Write to journal from cysystemd import journal journal.write("Hello Lennart") journal.send(message="Structured entry", priority=journal.Priority.INFO) # Read from journal from cysystemd.reader import JournalReader, JournalOpenMode reader = JournalReader() reader.open(JournalOpenMode.SYSTEM) reader.seek_head() for record in reader: print(record.data['MESSAGE']) Requires libsystemd development headers installed on the system (libsystemd-dev on Debian/Ubuntu, systemd-devel on CentOS/RHEL). Source installation will fail without these headers. Verify before relying: - Actual compatibility across different systemd versions and Linux distributions beyond manylinux_2_34 baseline - Performance characteristics when reading large journal volumes or under high write load - Whether AsyncJournalReader v2.0.0 breaking changes affect existing production deployments ## Package facts - License: Apache 2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 77.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags systemd journal logging python, journald reader writer, systemd daemon notification, libsystemd python wrapper, systemd integration python, journald async reader, sd_notify python, systemd-integration, journald-logging, linux-only [View on SkillFed](https://skillfed.io/packages/cysystemd) · [View on PyPI](https://pypi.org/project/cysystemd/)