Customizable Python AST evaluation framework
A small Python library/framework for customising how the Python AST is walked and evaluated. It is intended to be used to configure a safe-ish sandboxed way of evaluating user-submitted expressions and code, and unlike existing alternatives it does not bake unwanted behavior into library internals.
What it addresses
Existing libraries for sandboxed AST evaluation bake in internals the author didn't want, so a more customizable alternative is needed.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
Customizable Python AST evaluation framework
A small Python library/framework for customising how the Python AST is walked and evaluated. It is intended to be used to configure a safe-ish sandboxed way of evaluating user-submitted expressions and code, and unlike existing alternatives it does not bake unwanted behavior into library internals.
Problem: Existing libraries for sandboxed AST evaluation bake in internals the author didn't want, so a more customizable alternative is needed.
Audience: developers
Posted by @swarles · Original source ↗
Source text · @swarles · · Source ↗
A small Python library/framework for customising how the AST is walked and evaluated. I plan to use it in another project to configure a safe-ish sandboxed way of evaluating user submitted expressions and code.