Comparison
asteval vs leval vs py-expression-eval
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Safe, minimalistic evaluator of python expression using ast module
Maintained. Last release 3 months ago, commits in 11 of the last 26 weeks. Weaker on contributor spread.
$
pip install astevalLimited evaluator
Maintained. Last release 4 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
$
pip install levalPython Mathematical Expression Evaluator
Archived. The repository is read-only: no more fixes or releases will come.
$
pip install py-expression-evalIn short
- py-expression-eval is archived: avoid it for new projects.
- asteval is the most used: 7.6M downloads a month, 18× more than py-expression-eval.
- asteval also has the best Pythie’s Index (70).
- Safe default for a new project: asteval.
Side by side
| Metric | asteval | leval | py-expression-eval |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 70 | 43 |