What AI says about RestrictedPython

RestrictedPython is a Python library that defines a restricted subset of the Python language to allow running untrusted code in a controlled, trusted environment (not a full sandbox). It exposes APIs like compile_restricted and safe_globals to compile and execute code with restricted builtins and a safe execution context. It runs on CPython (not supporting PyPy) and is maintained by the Zope Foundation under the Zope Public License (ZPL-2.1).

AI named RestrictedPython from December 2025 to June 2026.