This is a Python class that will daemonize your Python script so it can continue running in the background
Project description
NAME
DaemonLite is a library for writing system daemons in Python. It is distributed under MIT license.
SYNOPSIS
from DaemonLite import DaemonLite
class Staff(DaemonLite) :
def run(self) :
# Do something
staff = Staff('/var/staff/staff.pid')
staff.start()
Actions
start() - starts the daemon (creates PID and daemonizes). stop() - stops the daemon (stops the child process and removes the PID). restart() - does stop() then start().
Foreground
This is useful for debugging because you can start the code without making it a daemon. The running script then depends on the open shell like any normal Python script.
To do this, just call the run() method directly.
staff.run()
DESCRIPTION
This is a Python class that will daemonize your Python script so it can continue running in the background. It works on Unix, Linux and OS X, creates a PID file and has standard commands (start, stop, restart) + a foreground mode.
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
File details
Details for the file DaemonLite-0.0.2.tar.gz.
File metadata
- Download URL: DaemonLite-0.0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de1fbdf8837acbe1009106aae051d4f3add978ae055f35313952a63ccac31088
|
|
| MD5 |
161a4ee9b3ba4a9197b31afe32d59b3a
|
|
| BLAKE2b-256 |
b7288cae8f6f1772f8d979dad148f64e3db2d2669751b11f2fa7bd9c63ff0f7e
|