Dead Easy POSIX Daemons for Python!
#!/usr/bin/python
import undead
@undead
def my_daemon_process():
""" This function will be daemonized. """
from time import sleep
while True:
sleep(10)
Installation
pip install undead
Settings
- undead.name
Name of the logger and process.
Default: __name__ of decorated callable
- undead.pidfile
Path to pidfile.
Default: ~/.{undead.name}/{undead.name}.pid
- undead.log_level
Log level.
Default: "WARNING"
- undead.process_name
The name of the process (that shows up in ps etc.)
Default: None (No manipulation of process name)
Example
import undead
undead.name = "my-first-daemon"
undead.process_name = "leDeamon"
@undead
def my_daemon_process():
""" This function will be daemonized. """
# ...
Logging within the decorated handler
Just add log to your decorated signature, and the logger will be passed down. Log away captain!
import undead
@undead
def i_am_undead(log):
log.warning("I'm warning you!")
log.info("Soap, 2 for $1.99")
The logfile will be created in ~/.i_am_undead
License
MIT
Metadata
Release files for undead 0.2.2
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 | |
|---|---|---|---|---|
| undead-0.2.2.tar.gz | 3.3 kB | Without provenance | Details |
Release files / undead-0.2.2.tar.gz
| Download URL | undead-0.2.2.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ec8d5e2d933dcd2e3fcf9896f6b10412d1f8bf7a915fb4bbd8ecc24ce80339e
|
|
BLAKE2b-256 checksum How to use checksums |
dca109d7ed3f9ccb711dc11e0201753f3a4452b422790fa6f7da51e0af140388
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for undead 0.2.2
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.