Python daemonizer for Unix, Linux and OS X.
Project description
Python daemonizer for Unix, Linux and OS X.
This library is a fork of python-daemon developed originally by serverdensity.
Install
pip install servd
Usage
It has a very simple usage and only requires a pid file to keep track of the daemon. The run() method should be overrided.
from servd import Daemon
class Service(Daemon):
def __init__(self, pidfile) -> None:
super().__init__(pidfile)
def run(self) -> None:
"""Service code."""
service = Service("service.pid")
# Start service daemon
service.start()
# Restart service daemon
service.restart()
# Stop service daemon
service.stop()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
servd-1.0.0.tar.gz
(11.3 kB
view hashes)
Built Distribution
servd-1.0.0-py2.py3-none-any.whl
(11.5 kB
view hashes)
Close
Hashes for servd-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee658b70df8c3a015216b023ddd1ebe276c73424dc978758a39946dd997e4a9c |
|
MD5 | d58004450f35ea5ca8c6f1ee61929777 |
|
BLAKE2b-256 | cde2b3b0376f17731a9f78f04ccdbf77701e47f07701f7dbcfc8e3e0be4cb706 |