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
```
##### 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)
Built Distribution
Close
Hashes for rulengine-0.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9cafcedbd80878f53c425659a9f479e02a8a106e768600e4784e110ab77f70c |
|
MD5 | dbdfa931d7ce798f29baa8252114c4af |
|
BLAKE2b-256 | c23e95fff30cbd9ff2a08d83d4a792a26db304faea71173226bf0dedb4eaff6e |