A python wrapper for tinyexpr, a mathematical expression parser in C.
>>> import tinex >>> tinex.eval('sqrt(a^2+b^2)', a=3, b=4) 5.0
$ pip install tinex
View the docs here.