daemonize
daemonize is a library for writing system daemons in Python. It is distributed under MIT license. Latest version can be downloaded from PyPI. Full documentation can be found at ReadTheDocs.
Dependencies
It is tested under following Python versions:
2.6
2.7
3.3
3.4
3.5
Installation
You can install it from Python Package Index (PyPI):
$ pip install daemonize
Usage
from time import sleep
from daemonize import Daemonize
pid = "/tmp/test.pid"
def main():
while True:
sleep(5)
daemon = Daemonize(app="test_app", pid=pid, action=main)
daemon.start()
File descriptors
Daemonize object’s constructor understands the optional argument keep_fds which contains a list of FDs which should not be closed. For example:
import logging
from daemonize import Daemonize
pid = "/tmp/test.pid"
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.propagate = False
fh = logging.FileHandler("/tmp/test.log", "w")
fh.setLevel(logging.DEBUG)
logger.addHandler(fh)
keep_fds = [fh.stream.fileno()]
def main():
logger.debug("Test")
daemon = Daemonize(app="test_app", pid=pid, action=main, keep_fds=keep_fds)
daemon.start()
Metadata
Release files for daemonize 2.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| daemonize-2.4.4.tar.gz | 8.7 kB | Without provenance | Details for daemonize-2.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| daemonize-2.4.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for daemonize-2.4.4-py2.py3-none-any.whl |
Total release size: 13.9 kB
Release files / daemonize-2.4.4.tar.gz
| Download URL | daemonize-2.4.4.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49b9901b3658105ffa94d33f10a9dd42fda61334b65c6d4902f69b866609e41c
|
|
BLAKE2b-256 checksum How to use checksums |
e965012fd9e381038e7e640efd3d1c31b87dffee7073034794e2e61a17016952
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / daemonize-2.4.4-py2.py3-none-any.whl
| Download URL | daemonize-2.4.4-py2.py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
26d1c15db618eef277f3dfd1a5487ab151eae3e89b20dce7dea127337edacdd6
|
|
BLAKE2b-256 checksum How to use checksums |
e6579cfb4b5da2e8e3ef3f2b19e72883c6c589dd1a753594ab77e3fb3105920b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for daemonize 2.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.