Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

RestrictedPython

Safe Python subset for sandboxed code execution in trusted environments.

Prompts, structured output and evalsPYPI

GitHub

1. License

License from PyPI license expression.

github.com/zopefoundation/RestrictedPython

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What RestrictedPython does

Safe Python subset for sandboxed code execution in trusted environments.

RestrictedPython popularity

41 / 100
Gid Score, #3046 overall
2.2M
downloads a week, pypi
749
GitHub stars
1
agent projects use it
RestrictedPython: downloads per weekPyPI, restrictedpython 2,216,001
RestrictedPython: GitHub starszopefoundation/RestrictedPython 749

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How RestrictedPython is used

  • RestrictedPython joined the catalog on its public numbers (2,196,415 downloads a week on PyPI and 749 GitHub stars), not on our project count: it is a dependency in 11 public GitHub projects of our scan, 1 of them set up for AI coding agents.
  • Projects that use it most often also use Pydantic (90.9%), aiohttp (81.8%), pandas (81.8%).

Often used with

In 90.9% of its projects
In 81.8% of its projects
In 81.8% of its projects
In 81.8% of its projects
In 72.7% of its projects
In 72.7% of its projects
In 72.7% of its projects
In 72.7% of its projects

More about RestrictedPython

More in Prompts, structured output and evals

Alternatives

RestrictedPython This page

ZPL-2.1Gid 412.2M/wk

Compare RestrictedPython with another tool

Get started

Install it.

pip install restrictedpython

No step-by-step start for RestrictedPython yet: we have not written its hand-checked card.