Registry / devops / cysystemd

cysystemd

JSON →
library2.0.5pypypiunverified

A Python library providing Cython-based bindings for systemd journal and socket activation. Current version 2.0.5, supporting Python 3.8–3.12. Released under MIT license.

pip install cysystemd
INSTALL
IMPORT
SIG · CYSYSTEMD
C
cysystemd
devopspythonv2.0.5
Install
1.6s avg
Import
Disk
22MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 24MB
22MB installed
● package 22MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Journal
from cysystemd import Journal
from cysystemd.journal import Journal

Send and read systemd journal messages.

import os from cysystemd.journal import Journal, journal_send # Send a message to systemd journal journal_send("Hello from cysystemd", PRIORITY=6, SYSLOG_IDENTIFIER="myapp") # Read from journal with Journal() as journal: journal.seek_tail() journal.previous() entry = journal.get_next() print(entry.get('MESSAGE', 'No message'))
Debug
Known issues
gotchaJournal.get_next() returns None when no more entries. Code must handle this.
fix
Always check if entry is not None before accessing.
affects: all
breakingIn version 2.0.0, the module structure changed. Old imports from 'systemd.journal' no longer work.
fix
Use from cysystemd.journal import ... instead of from systemd.journal import ...
affects: >=2.0.0
gotchaThe library requires systemd runtime (e.g., /run/systemd/journal/socket). Importing on non-Linux or without systemd raises ImportError.
fix
Wrap imports in try/except ImportError or run only on systemd-based systems.
affects: all
deprecatedsd_journal_sendv() is deprecated in favor of journal_send().
fix
Use journal_send() instead.
affects: >=1.5.0
Upgrade
Version history
2.0.5latest on PyPI · released Mar 4, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
cysystemd — pip install cysystemd · libregistry