Skip to main content

Bubblewrap sandboxing for Python

Project description

bubbleproc

Bubblewrap sandboxing for Python - protect against accidental damage from AI coding tools.

It also supports monkey patching subprocess, to bubblewrap Popen, run, check_output, etc.

Installation

pip install bubbleproc

Requires bubblewrap to be installed:

# Ubuntu/Debian
sudo apt install bubblewrap

# Fedora  
sudo dnf install bubblewrap

# Arch
sudo pacman -S bubblewrap

Quick Start

from bubbleproc import run, Sandbox

# Run a command with read-write access to your project
result = run("python script.py", rw=["~/myproject"])

# Run with network access (for API calls)
result = run("npm install", rw=["~/myproject"], network=True)

# Reusable sandbox configuration
sb = Sandbox(rw=["~/project"], network=True)
sb.run("make build")
sb.run("make test")

Features

  • 🔒 Secrets blocked by default (SSH keys, AWS credentials, etc.)
  • 🛡️ System paths are read-only
  • 🌐 Network disabled by default
  • 🔌 Drop-in subprocess.run() replacement
  • 🐍 Pure Python fallback when Rust extension unavailable

See the main repository README for full documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bubbleproc-1.0.3.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bubbleproc-1.0.3-cp313-cp313-manylinux_2_34_x86_64.whl (322.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

File details

Details for the file bubbleproc-1.0.3.tar.gz.

File metadata

  • Download URL: bubbleproc-1.0.3.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for bubbleproc-1.0.3.tar.gz
Algorithm Hash digest
SHA256 048e8593cfcbe1a1ccf009c1f77a8ad91da212ecc7ecd0ff77f7b55857ca9721
MD5 4646ee14de6aca91573c835989cca53a
BLAKE2b-256 a8db4cad9b8c4287647165ee3cf5feb6e56cc2bdd7a4ae4f019b33cc07f542b6

See more details on using hashes here.

File details

Details for the file bubbleproc-1.0.3-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for bubbleproc-1.0.3-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 34429bd8cdb5126e55c15e2889d50a45a315e30b0fe3dbe7710afb4c884982a0
MD5 405366c6867c1a22ac7abad19aad87a1
BLAKE2b-256 8e79a48f70f40d0ebfdc3ce2bcb2ae3194a68e6139f51fab7acde9a2459e5e53

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page