It supplies a command line interface API to start/stop/restart a daemon.
Project description
k3daemonize
It supplies a command line interface API to start/stop/restart a daemon.
k3daemonize is a component of pykit3 project: a python3 toolkit set.
Help to create daemon process. It supplies a command line interface API to start/stop/restart a daemon.
daemonize
identifies a daemon by the pid
file.
Thus two processes those are set up with the same pid
file
can not run at the same time.
Install
pip install k3daemonize
Synopsis
import time
import k3daemonize
def run():
for i in range(100):
print(i)
time.sleep(1)
# python foo.py start
# python foo.py stop
# python foo.py restart
if __name__ == '__main__':
# there is at most only one of several processes with the same pid path
# that can run.
k3daemonize.daemonize_cli(run, '/var/run/pid')
Author
Zhang Yanpo (张炎泼) drdr.xp@gmail.com
Copyright and License
The MIT License (MIT)
Copyright (c) 2015 Zhang Yanpo (张炎泼) drdr.xp@gmail.com
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
Built Distribution
File details
Details for the file k3daemonize-0.1.0.tar.gz
.
File metadata
- Download URL: k3daemonize-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cb40813e77466fc1f0906f5ee62d897f0a8c6b8e8c2a2ef2cc0f15c036f8ad9 |
|
MD5 | d965958ce59c76f689ea033cf337b183 |
|
BLAKE2b-256 | e00cefc87e583f51cd04c00d60b22bf04e94a002315334e6ec48c519e36ffc45 |
File details
Details for the file k3daemonize-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: k3daemonize-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54b569ce037c7f16a405da58545c0c319d4a7baf4598db4dfb7de9cb8d6261f6 |
|
MD5 | 03fd8d2b8c39ac71d08b637f3ce170cf |
|
BLAKE2b-256 | d5bf5e7b75f9c66e6dd028feebba965ffda9cf961542766e581e6b9fb3fe0b02 |