RestrictedPython is a tool that helps to define a subset of the Python language which allows to provide a program input into a trusted environment.