Registry / devops / products-pythonscripts

products-pythonscripts

JSON →
library5.2pypypi✓ verified 86d ago

Provides support for restricted execution of Python scripts in Zope. Current version 5.2, released in 2023. Maintenance mode; occasional releases for bug fixes or compatibility updates.

pip install Products.PythonScripts
INSTALL
IMPORT
SIG · PRODUCTS-PYTHONSCR
P
products-pythonscripts
devopspythonv5.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PythonScript
from Products.PythonScripts.PythonScript import PythonScript
from Products.PythonScripts import PythonScript
PythonScript class is in a submodule, not top-level.

Basic import verification. Full usage requires a Zope application server.

from Products.PythonScripts.PythonScript import PythonScript # Create a PythonScript instance (requires Zope context) # This is typically done via Zope management interface, not standalone. print('PythonScript imported successfully')
Debug
Known issues
breakingPythonScripts 5.x removed support for Python 2 and Python 3.9 and earlier. Requires Python >=3.10.
fix
Upgrade Python to 3.10+ and ensure all dependencies are compatible.
affects: >=5.0
gotchaPythonScripts are not standalone; they require a running Zope instance. Attempting to use them outside Zope will cause runtime errors.
fix
Only import and use within a Zope application context (e.g., inside PythonScript objects in Zope management interface).
affects: all
gotchaPythonScripts use a restricted execution environment (restrictedPython). Not all Python built-ins or modules are available inside a script.
fix
Test scripts within Zope to confirm allowed operations. Common restrictions: no file I/O, no subprocess, limited imports.
affects: all
Errors
Common errors & fixes
ImportError: No module named Products.PythonScripts
The package is not installed or not in Python path.
fix
Install with: pip install Products.PythonScripts
ModuleNotFoundError: No module named 'restrictedPython'
Missing dependency restrictedPython (used for restricted execution).
fix
Install with: pip install Products.PythonScripts[restricted] or manually install restrictedPython.
Upgrade
Version history
5.2latest on PyPI · released Nov 20, 2025
Audit
Dependencies
ZoperequiredRuntime dependency; PythonScripts only works within a Zope application context.
Agent activity
4 hits · last 30 days
node
4
Resources
products-pythonscripts — pip install products-pythonscripts · libregistry