Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

corek-0.0.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file corek-0.0.2.tar.gz.

File metadata

  • Download URL: corek-0.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for corek-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d6ac4b2a76034eec265169762bf9cef71e76063a2d5c408e71cd6e92bc1b48b2
MD5 d6a0d8de631edc007b669020b01e278a
BLAKE2b-256 ae67982a6e2686192e2e5d454ad0e589a49491c868c5649f81592dfc16a44897

See more details on using hashes here.

File details

Details for the file corek-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: corek-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for corek-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c154fa98cb0c3bc8151eb7eb4f4d534d2e9f13d366fc133dfda330fdc49f987f
MD5 864cf10407a3483254fba0dd0328ae70
BLAKE2b-256 2fdce266a51b41efeea7ec6e5ef45d9386a7ec191196fa22661e69d95395d0fb

See more details on using hashes here.

Supported by

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