Registry / devops / pyprctl

pyprctl

JSON →
library0.1.3pypypi✓ verified 82d ago

A pure-Python interface to Linux's prctl() syscall and related functionality (e.g., capabilities, process names, securebits) using ctypes. Version 0.1.3, released 2023-06-18. Low release cadence.

pip install pyprctl
INSTALL
IMPORT
SIG · PYPRCTL
P
pyprctl
devopspythonv0.1.3
Install
1.8s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Cap
from pyprctl import Cap
from pyprctl import prctl
CapState
from pyprctl import CapState
FileCaps
from pyprctl import FileCaps

Demonstrates basic usage: querying capability sets and checking support.

from pyprctl import prctl from pyprctl.caps import Cap # Get current capability sets permitted = prctl.cap_get_pc() effective = prctl.cap_get_ec() print(permitted, effective) # Check if a capability is supported if Cap.CAP_NET_RAW.is_supported(): print("CAP_NET_RAW is supported")
Debug
Known issues
gotchaOn Python <3.8, os.fsencode() may behave differently for process names; always pass str to prctl_set_name()
fix
Ensure argument is a str, not bytes.
affects: >=0.1.3
breakingv0.1.2 removed follow_symlinks parameter from FileCaps methods; code using it will break.
fix
Remove follow_symlinks argument from FileCaps.get() / FileCaps.set() calls.
affects: >=0.1.2
Upgrade
Version history
0.1.3latest on PyPI · released Oct 26, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
6
Resources
pyprctl — pip install pyprctl · libregistry