rule-engine icon indicating copy to clipboard operation
rule-engine copied to clipboard

A lightweight, optionally typed expression language with a custom grammar for matching arbitrary Python objects.

Results 10 rule-engine issues
Sort by recently updated
recently updated
newest added

This package could benefit from type annotations, so that it can be type-checked when used in other software.

feature request

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...

feature request

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" ```

feature request

Would you be willing to add support for python-style comments inside rules? If it's not a too complex change :1st_place_medal:

feature request

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$"' )...

question

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...

feature request

**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...

feature request

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...

feature request

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...