Google has open sourced CEL-expr-python, a Python implementation of the Common Expression Language (CEL), a non-Turing complete embedded policy and expression language designed for simplicity, speed, ...
Python is a language that seems easy to do, especially for prototyping, but make sure not to make these common mistakes when coding.