Skip to main content

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


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)

Uploaded Source

Built Distribution

servd-1.0.0-py2.py3-none-any.whl (11.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page