python-daemon3.1.0
python-daemon3.1.0
Published
Library to implement a well-behaved Unix daemon process.
pip install python-daemon
Package Downloads
Authors
Project URLs
Requires Python
>=3.7
Dependencies
- setuptools
>=62.4.0
- lockfile
>=0.10
- python-daemon
[doc]; extra == "build"
- wheel
; extra == "build"
- build
; extra == "build"
- docutils
; extra == "build"
- changelog-chug
; extra == "build"
- python-daemon
[dist,test]; extra == "devel"
- python-daemon
[build]; extra == "dist"
- twine
; extra == "dist"
- Sphinx
~=4.4; extra == "doc"
- pip-check
; extra == "static-analysis"
- pycodestyle
~=2.12; extra == "static-analysis"
- pydocstyle
~=6.3; extra == "static-analysis"
- pyupgrade
~=3.17; extra == "static-analysis"
- isort
~=5.13; extra == "static-analysis"
- python-daemon
[build,static-analysis]; extra == "test"
- testtools
; extra == "test"
- testscenarios
>=0.4; extra == "test"
- coverage
; extra == "test"
This library implements the well-behaved daemon specification of :pep:`3143`, “Standard daemon process library”. A well-behaved Unix daemon process is tricky to get right, but the required steps are much the same for every daemon program. A `DaemonContext` instance holds the behaviour and configured process environment for the program; use the instance as a context manager to enter a daemon state. Simple example of usage:: import daemon from spam import do_main_program with daemon.DaemonContext(): do_main_program() Customisation of the steps to become a daemon is available by setting options on the `DaemonContext` instance; see the documentation for that class for each option.