python-daemon
Library to implement a well-behaved Unix daemon process.
Decision gist · record as of 2026-08-14
Yes, if you are building a Unix daemon in Python and want to follow PEP 3143 correctly without reimplementing the forking and setup logic yourself. The dormant maintenance status is not a blocker—the package is feature-complete and stable—but verify that it meets your Python version and OS requirements. Not suitable for Windows.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Unix/POSIX systems only; not supported on Windows.
- Low install friction with a single lightweight dependency (lockfile).
- Maintenance is dormant—last release was 619 days ago—but the package is marked Production/Stable and has been actively maintained since 2009, suggesting it is feature-complete and unlikely to require frequent updates.
License · maintenance · safety
permissive license (permissive) — Dual-licensed under Apache License 2.0 (daemon library) and GNU General Public License version 3+ (packaging and tests). Permissive treatment means you can use, modify, and distribute freely, but be aware of the GPL v3 component if you redistribute the package itself.
last release 2024-12-03 (619 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 21,136,028 downloads/mo, #1,011 on PyPI
Alternatives
Verify before relying
pip install python-daemon
import daemon
with daemon.DaemonContext():
# Your background process code here
pass- Whether dormant maintenance status (last release 619 days ago) poses a risk for future Python or OS compatibility.
- Specific behavior differences or limitations when used with modern async frameworks or process managers.
What it is and what it does
python-daemon is a library that implements the PEP 3143 standard for well-behaved Unix daemon processes. Creating a daemon—a process that runs in the background detached from the terminal—requires several tricky steps: forking, closing file descriptors, handling signals, and setting up the process environment correctly. This library encapsulates all of that complexity into a simple context manager interface, so you can wrap your main program logic and let DaemonContext handle the daemon setup automatically.
You configure the daemon by setting options on a DaemonContext instance (signal handlers, working directory, file descriptors to preserve, etc.) and then use it as a context manager. The library depends only on lockfile for file-based locking during the daemonization process. It requires Python 3.7 or later and runs only on POSIX systems.
Use it for
- Long-running background services (log aggregators, monitoring agents, scheduled job runners) that need to detach from the terminal.
- System utilities that must fork and run as true Unix daemons with proper signal handling and file descriptor management.
- Applications that need to customize daemon behavior (e.g., preserve specific file descriptors, set working directory, manage pidfiles).
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building a Unix daemon in Python and want to follow PEP 3143 correctly without reimplementing the forking and setup logic yourself.
The dormant maintenance status is not a blocker—the package is feature-complete and stable—but verify that it meets your Python version and OS requirements. Not suitable for Windows.
Install
python-daemon on PyPI
Before you install
Low install friction with a single lightweight dependency (lockfile). Maintenance is dormant—last release was 619 days ago—but the package is marked Production/Stable and has been actively maintained since 2009, suggesting it is feature-complete and unlikely to require frequent updates.
Unix/POSIX systems only; not supported on Windows.
License in practice
Dual-licensed under Apache License 2.0 (daemon library) and GNU General Public License version 3+ (packaging and tests). Permissive treatment means you can use, modify, and distribute freely, but be aware of the GPL v3 component if you redistribute the package itself.
Quickstart
pip install python-daemon
import daemon
with daemon.DaemonContext():
# Your background process code here
pass
Verify before relying
- Whether dormant maintenance status (last release 619 days ago) poses a risk for future Python or OS compatibility.
- Specific behavior differences or limitations when used with modern async frameworks or process managers.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagelockfile |
| Maintenance | Dormant 619 days since the last release |
| First released | |
| Downloads | 21,136,028 / month, #1,011 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: POSIXProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules |
Evidence: python_daemon-3.1.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “PEP 3143 daemon”
- python-daemonImplements PEP 3143 well-behaved Unix daemon processes, handling the…
- mypyMypy is a static type checker for Python that validates type hints at…
- jeedomdaemonProvides a base class and framework for building async daemon…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also daemonize · pid · supervisor · circus · kantoku · cotyledon · jeedomdaemon · hupper · pigpio · logging