prootbox
Lightweight proot-based Linux sandboxes (Debian/Alpine) with no root required.
- No root / no setuid: pure proot, unprivileged.
- Persistent machines you can create, attach to, and delete.
- Ephemeral sandboxes that vanish on exit.
- Detached sessions that keep a machine alive in the background.
- Per-sandbox hostname (via unprivileged UTS namespace when available).
- Zero runtime dependencies — pure stdlib, Python 3.6+.
All state lives in the current working directory at the time each call runs
(proot-<arch>, base-<distro>/, machines/, sessions/), so different
project folders stay isolated.
Install
pip install prootbox
CLI
prootbox # show help
prootbox run # ephemeral debian
prootbox run --distro alpine
prootbox create mybox --distro alpine # create persistent
prootbox attach mybox # open shell
prootbox list
prootbox delete mybox
prootbox session start sess1 mybox # detached session on mybox
prootbox session attach sess1
prootbox session list
prootbox session stop sess1
python3 -m prootbox run # works as a module too
Python API
import prootbox as pb
# Ergonomic builder form
pb.create(pb.alpine("my-box"))
pb.create(pb.debian("dev"))
pb.attach("dev")
pb.delete(pb.alpine("my-box"))
pb.run(pb.ephemeral("alpine"))
pb.run() # ephemeral debian
# Or direct form
pb.create("my-box", distro="alpine")
pb.run_ephemeral(distro="debian")
for m in pb.list_machines():
print(m["name"], m["distro"])
# Sessions
pb.session_start("sess1", machine="dev")
pb.session_attach("sess1")
pb.session_stop("sess1")
Requirements
- Linux (x86_64 or arm64)
unshareandcpin$PATH(standard on any distro)- Internet access on first run (downloads proot + rootfs tarballs)
How it works
On first use in a working directory, prootbox downloads a static proot
binary and the requested distro's rootfs tarball, extracts it to
base-<distro>/, and patches it (DNS, sudo, apt sandboxing). Machines are
created with cp -alT (hardlinks) so they take almost no extra disk until
written to.
License
MIT
Metadata
Release files for prootbox 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| prootbox-0.1.0.tar.gz | 11.0 kB | Without provenance | Details for prootbox-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prootbox-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for prootbox-0.1.0-py3-none-any.whl |
Total release size: 21.8 kB
Release files / prootbox-0.1.0.tar.gz
| Download URL | prootbox-0.1.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ca01752f7665e16612bbbaf11ebfb2003e370650eed56beb02e85dcf2a2a63f
|
|
BLAKE2b-256 checksum How to use checksums |
bbfd5a0361a6fb6891761dc22252fb7cea8dca175f6a0ef2cd94ebdc39c3b32d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / prootbox-0.1.0-py3-none-any.whl
| Download URL | prootbox-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
175c8294679837135f71ee2376a628d441b0dde32cedb76cece32c70bf19e771
|
|
BLAKE2b-256 checksum How to use checksums |
b462b3684aef876645441a49f2f19763b26aaca5bf10ca15ffdffde4539add0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for prootbox 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.