Skip to content
github-actions[bot] edited this page Oct 16, 2026 · 11 revisions

PySandboxes documentation

PySandboxes runs a Python program under a deny-by-default policy kept in a readable .py-sandboxes file, with an optional Linux kernel boundary around it. This index is organized around reader tasks. Pick a reading path first.

Reading paths

5 minutes: what is it, does it fit?

  1. README: the demo, the quick start, the limits at a glance.
  2. Use cases: which scenario, which protection level.

30 minutes: try it and decide

  1. Run the quick demo: learn a policy, then see it refuse an attack.
  2. Usage: complete mode or partial mode.
  3. Configuration files: read and lock a .py-sandboxes.
  4. Provider comparison: choose the OS layer.
  5. Alternatives: how it compares with containers, microVMs and hosted services.

Security review: what exactly does it hold?

  1. Security model: the layers and the filters.
  2. Weaknesses: known limits and residual risks.
  3. Python-layer assessment and eval-* assessment: attack by attack.
  4. Test coverage map: what is exercised, and what is not.
  5. SECURITY.md: what counts as a vulnerability, and how to report one.

Get started and configure

  • README: run an application in complete mode, with the limits at a glance.
  • Usage: complete mode, partial mode, @sandbox, init_fn, learning.
  • Configuration files: locate .py-sandboxes, compose files with include, and configure a module.
  • FAQ: answers to common usage and troubleshooting questions.
  • Samples: framework integrations and instructions for running the sample projects.
  • Integrating with the MCP SDK: configure a sandbox for an MCP server.
  • Database: use the database-backed data table.

Understand the security model

Choose and operate an OS provider

Compare and evaluate

  • Alternative sandboxes: comparison with other sandboxes, frameworks, and hosted services.
  • Use cases: threat scenarios and suitable isolation levels.
  • Test coverage map: test suites, provider matrix, skipped scenarios, and approximate counts.
  • Learning from tests: use full or partial test runs to discover and review sandbox permissions.

Maintain and explore the project

Clone this wiki locally