Skip to content

rairaman/corek

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple boolean expression parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published