sdnotify
A pure Python implementation of systemd's service notification protocol (sd_notify)
What it is and what it does
sdnotify is a pure Python implementation of systemd's sd_notify protocol, allowing Python services to communicate their state to systemd. It lets you signal when your service has finished startup, send periodic status updates, and report watchdog events—all of which systemd can monitor and act upon. The package is designed to be silent by default on non-systemd systems, so it won't break applications running elsewhere.
The library provides a single main class, SystemdNotifier, with a notify() method that sends protocol messages to systemd's notification socket. It has no runtime dependencies and works by directly writing to the socket that systemd creates for each service. However, the project is no longer maintained: the last release was in 2017, and there have been no commits since early 2022.
Use it for:
- Inform systemd when a Python daemon has completed its startup sequence, allowing systemd to mark the service as ready.
- Send periodic status messages to systemd that appear in systemctl status output for operational visibility.
- Implement watchdog heartbeat notifications to tell systemd the service is still alive and responsive.
- Build Python-based system services that integrate cleanly with systemd's service lifecycle and monitoring.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sends systemd service notifications (startup completion, status updates, watchdog events) from Python applications to inform systemd about service state changes.
Yes, if you are writing a Python systemd service on a modern Linux system and need basic sd_notify support. The code is simple and stable for its narrow purpose. However, be aware that the package is abandoned—no updates since 2017—so if systemd's protocol or your Python version diverges significantly, you may need to fork or patch it yourself. For new projects, verify that it still works with your target Python and systemd versions before committing to it.
Install
sdnotify on PyPI
pip
pip install sdnotifyuv
uv add sdnotifypoetry
poetry add sdnotifyInstalling sdnotify
Before you install
High install friction due to source distribution. Maintenance is abandoned—last release was 2017-08-02, with no commits since 2022-02-28. The package is stable for its narrow use case but receives no active support or updates.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute freely without significant legal restrictions.
Quickstart
pip install sdnotify
import sdnotify
n = sdnotify.SystemdNotifier()
n.notify("READY=1")
n.notify("STATUS=Running")
Requires a systemd-based Linux system with the systemd notification socket available; will silently fail on non-systemd systems unless debug=True is set.
Verify before relying
- Whether the package works reliably with modern Python 3 versions (last tested/released in 2017).
- Current compatibility with recent systemd versions and their sd_notify protocol changes.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,299 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 191,134/month — #9,888 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sdnotify-0.3.2.tar.gz
Keywords: systemd
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
cysystemdCython-based wrapper for systemd's libsystemd…
permissive · top 15,000 on PyPI
notify_pySends cross-platform desktop notifications from…
permissive · top 15,000 on PyPI
sdbusPython library for D-Bus communication with…
copyleft · top 15,000 on PyPI
systemd-pythonProvides Python bindings to systemd's native C…
copyleft · top 5,000 on PyPI
watchdogWatchdog monitors file system events across…
permissive · top 1,000 on PyPI
notifications-python-clientA Python client library for sending emails,…
permissive · top 15,000 on PyPI
aws-cdk.aws-codestarnotificationsDefines AWS CodeStarNotifications rules in…
permissive · top 15,000 on PyPI
notifiersNotifiers provides a unified interface to send…
permissive · top 15,000 on PyPI
appriseApprise sends notifications to dozens of…
permissive · top 5,000 on PyPI
desktop-notifierSends cross-platform desktop notifications from…
permissive · top 15,000 on PyPI