rule-engine
rule-engine copied to clipboard
A lightweight, optionally typed expression language with a custom grammar for matching arbitrary Python objects.
This package could benefit from type annotations, so that it can be type-checked when used in other software.
Came about this great library while searching for python rule engines, this project would fit my needs completly if I could traverse arrays with the dot-syntax (like issue #30 but...
Was wondering if it's possible to implement custom functions to the rule engine, something of the sort of: ``` get_hostname("https://example.com/path") == "github.com" ```
Would you be willing to add support for python-style comments inside rules? If it's not a too complex change :1st_place_medal:
example ```python import rule_engine # match a literal first name and applying a regex to the email rule = rule_engine.Rule( 'in.a==1 and first_name == "Luke" and email =~ ".*@rebels.org$"' )...
Expand the return type for matches to be a tuple `[bool, str | None]` where the 2nd element contains an explaination of the failure when `bool = False` It would...
**rule_engine is a great feature to use, but I'm running into some issues. The following code will get stuck, no error will be reported, and there will be no return...
Hola! Working with some rules now that I'm loading from markdown front-matter. To parse / validate the front-matter I'm using Pydantic (v2). During parsing, I wanted to natively transform a...
I was wondering if the project could benefit from an automatic type resolver extraction feature. I have an example implementation that I created for my own use-case, but I found...
Hello, I've updated my environment to Python 3.12, from Python 3.11 and now see issues when escaping a regex string and pass it when instantiating a Rule object. It seems...