Project: asteval

Safe, minimalistic evaluator of python expression using ast module

Project Details

Latest version
0.9.31
Home Page
https://github.com/newville/asteval
PyPI Page
https://pypi.org/project/asteval/

Project Popularity

PageRank
0.0023988596056752545
Number of downloads
226564

ASTEVAL provides a numpy-aware, safe(ish) 'eval' function Emphasis is on mathematical expressions, and so numpy ufuncs are used if available. Symbols are held in the Interpreter symbol table 'symtable': a simple dictionary supporting a simple, flat namespace. Expressions can be compiled into ast node for later evaluation, using the values in the symbol table current at evaluation time.