vermin
asteval
Our great sponsors
vermin | asteval | |
---|---|---|
3 | 3 | |
420 | 0 | |
- | - | |
7.6 | 7.0 | |
about 2 months ago | about 2 months ago | |
Python | Python | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
vermin
asteval
-
evalidate - Safe evaluation of untrusted user-supplied python expression
There is asteval project. It makes more poweful (ans slower) virtual python interpreter which you can use to run many commands in shared context. My benchmark (100 000 runs of simple python expressions):
-
evalidate: secure eval() for python
If compare to asteval (which is actually has much more features), evalidate is much faster in my benchmarks (benchmark code in repo): 0.017s vs 1.232s
-
A simple, kind-of "safe" eval ?
But, literals are not good enough very often, and one may want to do "len(foo)+bar[i]" , so I went searching trying to find a good implementation. I dug and found asteval, but this issue I raised breaks it for me, apart from the fact that I try not to rely on too many modules beyond the standard library + it has a bunch of peculiarities that make it not a real drop-in replacement to eval().
What are some alternatives?
emerge - Emerge is a browser-based interactive codebase and dependency visualization tool for many different programming languages. It supports some basic code quality and graph metrics and provides a simple and intuitive way to explore and analyze a codebase by using graph structures.
piston - A high performance general purpose code execution engine.
astroid - A common base representation of python source code for pylint and other projects
snekbox - Easy, safe evaluation of arbitrary Python code
vscode-blockman - VSCode extension to highlight nested code blocks
klara - Automatic test case generation for python and static analysis library
Python-NSE-Option-Chain-Analyzer - The NSE has a website which displays the option chain in near real-time. This program retrieves this data from the NSE site and then generates useful analysis of the Option Chain for the specified Index or Stock. It also continuously refreshes the Option Chain and visually displays the trend in various indicators useful for Technical Analysis.
vectorboard - Open Source Embeddings Optimisation and Eval Framework for RAG/LLM Applications. Documentations at https://docs.vectorboard.ai/introduction
uwsgi-nginx-flask-docker - Docker image with uWSGI and Nginx for Flask applications in Python running in a single container.
evalidate - Safe and fast evaluation of untrusted user-supplied python expressions
mnqueues - Monitored Multiprocessing Queues
TheAlgorithms - All Algorithms implemented in Python