Commit graph

10 commits

Author SHA1 Message Date
adam
7b3e9c6a88 py-simpleeval: updated to 0.9.10
0.9.10:
Unknown changes
2020-01-03 12:17:37 +00:00
adam
ded252c570 py-simpleeval: updated to 0.9.8
0.9.8:
Unknown changes
2018-11-14 10:26:59 +00:00
adam
cf53a96431 py-simpleeval: updated to 0.9.6
0.9.6:
Unknown changes.
2018-08-14 07:33:33 +00:00
adam
2fd505e180 py-simpleeval: update to 0.9.5
0.9.5:
Python 3 compatibility.
Bug fixes.
2017-10-11 07:10:47 +00:00
wiz
5d86518619 Switch github HOMEPAGEs to https. 2017-07-30 22:32:10 +00:00
wiz
7f84153239 Add python-3.6 to incompatible versions. 2017-01-01 14:43:22 +00:00
wiz
ad0031c15e Remove python33: adapt all packages that refer to it. 2016-07-09 13:03:30 +00:00
wiz
57199de455 Switch to MASTER_SITES_PYPI. 2016-06-08 17:43:20 +00:00
adam
7f3b4730ad Extend PYTHON_VERSIONS_INCOMPATIBLE to 35 2015-12-05 21:25:27 +00:00
richard
992efc35cf Add py-simpleeval
A quick single-file MIT-Licenced library for easily adding evaluatable
expressions into python projects. Say you want to allow a user to set an alarm
volume, which could depend on the time of day, alarm level, how many previous
alarms had gone off, and if there is music playing at the time.

Or if you want to allow simple formulae in a web application, but don't want
to give full eval() access, or don't want to run in javascript on the client side.

It's deliberately very simple, just a single file you can dump into a project,
or import from pypi (pip or easy_install).

Internally, it's using the amazing python ast module to parse the expression,
which allows very fine control of what is and isn't allowed. It should be
completely safe in terms of what operations can be performed by the expression.

The only issue I know to be aware of is that you can create an expression which
takes a long time to evaluate, or which evaluating requires an awful lot of
memory, which leaves the potential for DOS attacks. There is basic protection
against this, and you can lock it down further if you desire.

You should be aware of this when deploying in a public setting.

The defaults are pretty locked down and basic, and it's very easy to add whatever
extra specific functionality you need (your own functions, variable/name lookup, etc).
2015-08-25 05:05:39 +00:00