pyprctl
An interface to Linux's prctl() syscall written in pure Python using ctypes.
What it is and what it does
pyprctl wraps Linux's prctl() system call in pure Python, letting you read and modify process attributes and capabilities directly from your code. It uses ctypes to call the underlying C function without requiring compiled extensions, making it portable across Python versions that support ctypes.
The package targets system-level operations—process scheduling hints, capability management, security attributes—that are typically needed in containerization, privilege management, or low-level process control. Because it is abandoned and has not been updated since 2021-10-26, it may not reflect changes to the prctl() API or Linux capabilities in newer kernels, and no security patches are forthcoming.
Use it for:
- Drop or restrict Linux capabilities in a containerized application to reduce attack surface.
- Set process dumpability or other security attributes before executing untrusted code.
- Query or modify process scheduling hints and resource control attributes at runtime.
- Implement privilege-dropping logic in a Python daemon without calling external commands.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a pure-Python interface to Linux's prctl() system call and Linux capabilities using ctypes, allowing direct manipulation of process attributes from Python code.
No. The project is abandoned with last commit on 2021-10-26 and no active maintenance or security patches. While it has low install friction and a permissive MIT license, the lack of updates means it may not work correctly with modern Linux kernels, and any bugs or security issues will not be fixed. Use only if you are certain your target environment is compatible and you can maintain a fork yourself.
Install
pyprctl on PyPI
pip
pip install pyprctluv
uv add pyprctlpoetry
poetry add pyprctlInstalling pyprctl
Before you install
Low install friction with a pure-Python wheel, but the project is abandoned—last commit was 2021-10-26. No active maintenance or security updates should be expected.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pyprctl
import pyprctl
# Example: query process capabilities
caps = pyprctl.cap_get_proc()
print(caps)
Requires Linux; will not work on Windows, macOS, or other non-Linux systems. Also requires Python 3.6 or later.
Verify before relying
- Whether the package works correctly on modern Linux kernels and distributions released after 2021-10-26.
- Whether all prctl() operations and Linux capabilities are fully supported or only a subset.
- Whether there are known incompatibilities with Python versions beyond 3.10.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — dataclasses |
| Maintenance | abandoned — 1,753 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 194,527/month — #9,832 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyprctl-0.1.3-py3-none-any.whl
Keywords: prctl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
pyseccomppyseccomp provides a pure-Python interface to…
permissive · top 5,000 on PyPI
jaraco.windowsProvides a pure-Python interface to Windows…
permissive · top 15,000 on PyPI
PyRICPyRIC provides programmatic control over Linux…
copyleft · top 15,000 on PyPI
pywin32-ctypesA pure-Python reimplementation of pywin32 that…
permissive · top 5,000 on PyPI
ghostscriptProvides a Python interface to the Ghostscript…
copyleft · top 15,000 on PyPI
pyftdiPyFtdi provides a pure-Python user-space driver…
permissive · top 15,000 on PyPI
cwrapcwrap is a Python wrapper around C code that…
copyleft · top 15,000 on PyPI
python-xmp-toolkitRead and write XMP metadata in image and…
permissive · top 15,000 on PyPI
comtypescomtypes is a pure Python library for defining,…
permissive · top 5,000 on PyPI
libpciProvides Python bindings to libpci, allowing…
copyleft · top 15,000 on PyPI