One line expression evaluator
Project description
Corek
An expression parser and evaluator for simple comparison expressions in Python. Only supports numeric comparisons.
Example
from corek import RulesEngine
engine = RulesEngine()
input_data = {
'a': 10,
'b': 2,
'c':3
}
print(engine.evaluate_rule('a == 10', input_data)) # True
print(engine.evaluate_rule('a > 10', input_data)) # False
print(engine.evaluate_rule('(a + b) > 10', input_data)) # True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
corek-0.0.2.tar.gz
(3.8 kB
view hashes)
Built Distribution
corek-0.0.2-py3-none-any.whl
(4.2 kB
view hashes)