Getting Started
Description
Simple rules engine inspired by Martin Fowler's blog post in 2009 and funnel-rules-engine.
Full source code on github.
Requirements
python >= 3.6
How to install
pip install rules-engine
or
poetry add rules-engine
How to use
from rules_engine import Rule, RulesEngine, when, then
name = "fyndiq"
RulesEngine(Rule(when(name == "fyndiq"),then(True), 'it is fyndiq')).run(name)
>>> Result(value=True, message='it is fyndiq')