Skip to main content

One line expression evaluator

Reason this release was yanked:

bug

Project description

Corek

An expression parser and evaluator for simple comparison expressions in Python. Only supports numeric comparisons.

Example

from rules_engine 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


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.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

corek-0.0.1-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page