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.4.tar.gz (26.3 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.4-cp313-cp313-manylinux_2_34_x86_64.whl (325.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

File details

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

File metadata

  • Download URL: bubbleproc-1.0.4.tar.gz
  • Upload date:
  • Size: 26.3 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.4.tar.gz
Algorithm Hash digest
SHA256 5d3a054923f848ae08da6ab48b9f92afc8b5ef85f001b057c0004f9fbd6b570f
MD5 0283e814f866d67f8c4b5fffd84723ed
BLAKE2b-256 42c20b9b8cd9e6633be78dfaad73d21cb076f27a8ca8ebf88c2c2aa0f64c5cf1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bubbleproc-1.0.4-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 96e8cebe99ec51e40fdd7f9ab0e1ca6bdd30cae625461c68ab8c87dccefa4107
MD5 2ad04f29f4c4ac0d7efd4c4207b5488c
BLAKE2b-256 7fbfff51bbff7e2e589216e0bb1898f2b2c901bea0b422451f4428c6abd84a35

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