Skip to main content

k3daemonize

Action-CI Documentation Status Package

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

Metadata

Release files for k3daemonize 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for k3daemonize 0.1.6
File Size Uploaded
k3daemonize-0.1.6.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for k3daemonize 0.1.6
File Interpreter ABI Platform
k3daemonize-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / k3daemonize-0.1.6.tar.gz

Download URL k3daemonize-0.1.6.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
314935471b0fa485cac40485a2a5ed1210506f722630920d6d1edc2d5e5dcebe
BLAKE2b-256 checksum
How to use checksums
c06eda3985b00c9512a0ea3b17cce9fa42180ee6b713af825d1564a9e710f693
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / k3daemonize-0.1.6-py3-none-any.whl

Download URL k3daemonize-0.1.6-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6618a8410f162e824e04de34deb18c1b37755704d7627ca51bc14a1c7ee145cc
BLAKE2b-256 checksum
How to use checksums
7eae45843c6f48397de32a9fbea2c9a2e20f9cad8ef74114b95b51438cfe4de3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

0.1.7

2 release files

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page