{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/12"}],"enrichment":{"capability":"Rule Engine provides a lightweight, custom expression language for evaluating rules against Python objects, with optional type hinting and support for regex matching, datetime handling, and compound data types.","skillfed_tags":["dsl","rule-matching","expression-evaluation"],"use_cases":["Filter records in a database or API response based on user-defined rule expressions without writing custom Python code","Implement a rules engine for workflow automation where business logic is expressed as strings and evaluated at runtime","Validate incoming data against typed rule sets to ensure only objects matching specific criteria proceed","Build a query language for applications where end users need to define matching criteria without Python knowledge","Match log entries or events against rule expressions for alerting or log aggregation systems"],"what_it_does":"Rule Engine is a domain-specific language (DSL) for writing matching rules as strings in Python code. You define rules using a custom grammar similar to Python syntax, then apply them to dictionaries or objects to test whether they match. The language supports optional type annotations to catch errors early, regular expression matching on strings, datetime values, and compound types like lists, dicts, and sets.\n\nTypical usage involves creating a Rule object with an expression string, optionally providing a typed Context to validate symbol names and operations, then calling the rule's matching method on data objects. It's designed for scenarios where you need to express filtering or matching logic in a declarative, user-friendly way rather than writing Python conditionals directly. The package includes a debug REPL for experimentation.","worth_installing":"Yes. Rule Engine is actively maintained, has no known vulnerabilities, low install friction, and solves a clear problem: declarative rule evaluation without writing Python code. The permissive BSD-3-Clause license poses no restrictions. Install if you need to evaluate user-defined or data-driven matching logic; skip if you're writing simple hardcoded conditionals."},"id":"rule-engine","links":{"html":"https://skillfed.io/packages/rule-engine","md":"https://skillfed.io/packages/rule-engine.md","pypi":"https://pypi.org/project/rule-engine/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-08","license_spdx":"BSD-3-Clause","license_treatment":"permissive","name":"rule-engine","python_support":"supports_current","summary":"A lightweight, optionally typed expression language with a custom grammar for matching arbitrary Python objects."},"popularity":{"monthly_downloads":448253,"position":6604,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"5.0.2"}
