pyseccomp
An interface to libseccomp using ctypes. API compatible with libseccomp's Python bindings.
What it is and what it does
pyseccomp is a pure-Python ctypes wrapper around libseccomp, the Linux system call filtering library. It allows you to programmatically define seccomp policies—rules that restrict which system calls a process may invoke. The package is designed as an alternative when native bindings are unavailable, and is API compatible with libseccomp's own Python bindings.
The package has been abandoned since early 2021 and receives no maintenance. It targets Python 3.6, 3.7, and 3.8, and depends only on the system libseccomp library, making installation frictionless. However, its age means compatibility with modern Python versions and current libseccomp APIs is unverified.
Use it for:
- Sandboxing untrusted code by restricting system calls available to a subprocess.
- Building container or isolation tools that need seccomp policy configuration.
- Providing an alternative seccomp interface when other options are unavailable.
- Testing or prototyping seccomp policies in pure-Python environments.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pyseccomp provides a pure-Python interface to libseccomp via ctypes, allowing you to define and enforce system call filtering policies.
No, unless you have a specific reason to need this package. The package is abandoned, untested on modern Python versions, and offers no advantage over maintained alternatives. Use it only as a last-resort fallback when other options cannot be installed.
Install
pyseccomp on PyPI
pip
pip install pyseccompuv
uv add pyseccomppoetry
poetry add pyseccompInstalling pyseccomp
Before you install
Low install friction—pure Python, no compiled dependencies. However, the package is abandoned; the last commit was 2021-06-12 and no releases since 2021-01-02.
License in practice
MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pyseccomp
import pyseccomp
Requires libseccomp library to be installed on the system; pyseccomp is a ctypes wrapper and does not bundle it.
Verify before relying
- Whether pyseccomp remains compatible with current libseccomp library versions and modern Linux kernels.
- Whether the ctypes-based implementation has performance or correctness gaps compared to alternatives.
- Whether Python 3.9+ is supported despite classifiers only listing 3.6–3.8.
- Whether libseccomp must be pre-installed on the system for pyseccomp to function.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,050 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,928,285/month — #3,425 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyseccomp-0.1.2-py3-none-any.whl
Keywords: seccomp, libseccomp
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
jaraco.windowsProvides a pure-Python interface to Windows…
permissive · top 15,000 on PyPI
pyprctlProvides a pure-Python interface to Linux's…
permissive · top 15,000 on PyPI
comtypescomtypes is a pure Python library for defining,…
permissive · top 5,000 on PyPI
pypyodbcpypyodbc provides a pure Python ODBC interface…
permissive · top 15,000 on PyPI
pywin32-ctypesA pure-Python reimplementation of pywin32 that…
permissive · top 5,000 on PyPI
cwrapcwrap is a Python wrapper around C code that…
copyleft · top 15,000 on PyPI
pyclibraryParses C header files and automates…
permissive · top 15,000 on PyPI
python-pamPython wrapper for Linux PAM (Pluggable…
permissive · top 5,000 on PyPI
requests-hardenedWraps the requests library to enforce security…
permissive · top 15,000 on PyPI
ctypesgenctypesgen parses C header files and…
permissive · top 15,000 on PyPI