Skip to main content

Simple Rule Engine

Project description

# rulengine
##### Simple Rule Engine for Python
##### Rule engine gives an approach to you: "it would valid, if one of the rules can provide necessarry condition"
##### You can use in your any project, but remember; you need to make your own data context and generate rules on your side

# Installation
```bash
pip install rulengine
```

# Usage
```bash
In [1]: from rulengine.core import DataType, LogicalOperator, BitwiseOperator, Rule, Condition
In [2]: from rulengine import execute

In [3]: condition = Condition(value=1, bitwise_operator=BitwiseOperator.EQUAL, comparison_value=2, data_type=DataType.Integer)
In [4]: rule = Rule(logical_operator=LogicalOperator.AND, conditions=[condition])
In [5]: execute([rule])
Out[5]: False
```


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

rulengine-0.0.5.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

rulengine-0.0.5-py2.py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 2 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