skillfed

pyseccomp

An interface to libseccomp using ctypes. API compatible with libseccomp's Python bindings.

pyseccomp v0.1.2 1.9M downloads/30d#3,425 on PyPI14
Permissive license MIT Abandoned released

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 pyseccomp

uv

uv add pyseccomp

poetry

poetry add pyseccomp

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

seccomp system call filteringlibseccomp python interfacesandboxing and process isolationrestrict system callsctypes seccomp wrapper
sandboxingsystem-callsabandoned

More Security packages