Prebuilt nsjail executables for Linux
Project description
python-nsjail
Prebuilt nsjail executables packaged as Python wheels
Overview
python-nsjail distributes the nsjail binary as a Python package for easy installation via pip.
Note: This is not a Python library — it only provides the nsjail binary executable.
Installation
pip install python-nsjail
This creates an nsjail command in your environment's bin/ directory (e.g., ~/.local/bin/nsjail or /some/where/.venv/bin/nsjail).
How it works: The nsjail command is a small Python wrapper that executes the actual nsjail binary bundled inside the package. The wrapper uses os.execl() to replace itself with the real binary, preserving the process ID.
Virtual Environment (Recommended)
Using a virtual environment keeps nsjail isolated:
# Create venv
python -m venv .venv
source .venv/bin/activate
# Install python-nsjail
pip install python-nsjail
# Verify
nsjail-status
Usage
Command line
nsjail --help
Check nsjail path
nsjail-find
Output:
nsjail status:
System PATH: /root/workspaces/python-nsjail/.venv/bin/nsjail
Bundled: /root/workspaces/python-nsjail/src/nsjail/nsjail
Package version: 0.1.0b3.dev1+g71c0da62d.d20260323
Bundled nsjail: 3.6
Building from Source
For development or building from source, see CONTRIBUTING.md.
System Requirements
- OS: Linux only
- Kernel: Linux 5.10+ (some nsjail features require newer kernel syscalls)
- Permissions: Using nsjail requires CAP_SYS_ADMIN or root
- Python: Python 3.9+
Platform Compatibility
| Platform | libc | Compatible With | CPU Requirement |
|---|---|---|---|
| manylinux_2_34_x86_64 | glibc 2.34 | Ubuntu 22.04+, Debian 12+, RHEL 9+ | x86-64-v2* (SSE4.2, POPCNT) |
| manylinux_2_34_aarch64 | glibc 2.34 | ARM64 systems | ARM64 (v8+) |
| musllinux_1_2_x86_64 | musl 1.2 | Alpine Linux, other musl-based | x86-64-v2* (SSE4.2, POPCNT) |
| musllinux_1_2_aarch64 | musl 1.2 | Alpine Linux ARM64 | ARM64 (v8+) |
⚠️
x86-64-v2Note:
The x86_64 wheels are built withmanylinux_2_34containers which usex86-64-v2by default. This requires a CPU from ~2010 or later (supports SSE4.2 and POPCNT instructions). Most modern systems support this. If you need to run on older x86-64 hardware (pre-2010), please use the source distribution or build from source.
License
- nsjail: Apache-2.0 (see google/nsjail)
- python-nsjail packaging: Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file python_nsjail-0.1.0rc1.tar.gz.
File metadata
- Download URL: python_nsjail-0.1.0rc1.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c60012082a9ba62dcaed3e3d60360930e58f83707d11cc955565703c712ea1a
|
|
| MD5 |
5b9a5dce9092cccfe494b69e882b45fc
|
|
| BLAKE2b-256 |
ffa69057a96ebf68e66c739b6e7a50f94df5eb52871f75cdf11d757c83a4f4f0
|