Deiman is a Python utility class for daemonizing a process. It provides start and stop methods, as well as a method for retrieving running status information. Linux/Unix-only.
Project description
Deiman is a Python utility class for daemonizing a process. It has start and stop methods, as well as a method for retrieving running status information.
Linux/Unix-only.
Uses the Unix double fork method to fork your process to the background.
Installation
From PyPI
pip install deiman
Or
easy_install deiman
From GitHub
pip install -e git+git://github.com/kura/deiman.git#egg=deiman
From source
Download the latest tarball from PyPI or GitHub. Unpack and run:
python setup.py install
Usage
To use Deiman, you simply need to import the main Deiman class, passing a path to where you want the pid to be stored and call the start and stop methods as required:
from deiman import Deiman d = Deiman("/tmp/a.pid") d.start() while True: print "This print will be hidden because I am daemonized"
Examples
See the examples directory for usage examples on GitHub.
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
File details
Details for the file deiman-0.1.5.tar.gz
.
File metadata
- Download URL: deiman-0.1.5.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6d347bbff39348d7d7a73023a52d0df95bb7109de78e2d836845d28793a8dba |
|
MD5 | f736403475c2661be8583b3ca2b237a1 |
|
BLAKE2b-256 | d09f374bf303935387ecfb3404c28822950d8860af1addd827b48159c7efff8a |