Skip to main content

Simple sd_notify client library for Python 3

Project description


Simple sd_notify(3) client functionality implemented in Python 3.


import sd_notify

notify = sd_notify.Notifier()
if not notify.enabled():
    # Then it's probably not running is systemd with watchdog enabled
    raise Exception("Watchdog not enabled")

# Report a status message
notify.status("Initialising my service...")

# Report that the program init is complete
notify.status("Waiting for web requests...")

# Report an error to the service manager
notify.notify_error("An irrecoverable error occured!")
# The service manager will probably kill the program here

Author: Dec 2019


<class 'sd_notify.Notifier'>


Send string msg as bytes on the notification socket


Return a boolean stating whether watchdog is enabled


Report a healthy service state


Report a watchdog error. This program will likely be killed by the service manager.

If msg is not None, it will be reported as an error message to the service manager.


Report ready service state, i.e. completed initialisation


Set a service status message

Project details

Download files

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

Files for sd-notify, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size sd_notify-0.1.0-py3-none-any.whl (3.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sd-notify-0.1.0.tar.gz (2.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page