zen-engine
Open-Source Business Rules Engine
What it is and what it does
zen-engine is a Python wrapper around a Rust-based business rules engine designed to execute decision models expressed as JSON. It parses JSON Decision Model (JDM) files—which represent decision logic as interconnected graphs of nodes (decision tables, switches, functions, expressions)—and evaluates them against input data to produce structured results. The engine is embeddable and designed for applications that need to externalize decision logic into declarative, editable models rather than hard-coded conditionals.
Typical usage involves creating a ZenEngine instance, loading a JDM from JSON (either directly or via a custom loader function), and calling evaluate() with input data. The loader pattern allows you to fetch JDM definitions from files, databases, APIs, or other sources at runtime. No runtime dependencies are required beyond the compiled zen-engine wheel itself.
Use it for:
- Implement tiered pricing or fee logic that changes frequently without code redeployment
- Build eligibility or approval workflows where rules are managed by business analysts
- Evaluate complex conditional logic in lending, insurance, or compliance workflows
- Load decision models from a remote service or database and execute them in-process
- Prototype decision logic visually using the JDM editor, then execute it in production
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
zen-engine is a Python binding for a Rust-based business rules engine that loads and executes JSON Decision Models (JDM) to evaluate complex decision logic.
Yes, if you need to externalize and version decision logic separately from code. The package is actively maintained, has no known vulnerabilities, and offers broad platform coverage. The main caveat is that the license is undeclared in package metadata—verify the actual license in the repository before adopting it in proprietary work. Install friction is moderate due to compiled wheels, but prebuilt binaries are available for common platforms.
Install
zen-engine on PyPI
pip
pip install zen-engineuv
uv add zen-enginepoetry
poetry add zen-engineInstalling zen-engine
Before you install
Medium install friction due to compiled wheels; the package provides prebuilt binaries for Python 3.10–3.14 across Linux (aarch64, x86_64), macOS (Intel and ARM), and Windows. Maintenance is active with recent releases and a healthy repository (1907 stars, last commit 2026-08-07).
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before using in proprietary or restricted contexts.
Quickstart
pip install zen-engine
import zen
with open("./decision_model.json", "r") as f:
content = f.read()
engine = zen.ZenEngine()
decision = engine.create_decision(content)
result = decision.evaluate({"input": 15})
Requires Python 3.7 or later; prebuilt wheels are available for Python 3.10–3.14 on Linux, macOS, and Windows.
Verify before relying
- Actual license terms and restrictions (not declared in package metadata)
- Performance characteristics and scalability limits for large decision graphs
- Whether the loader pattern supports concurrent or async evaluation
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 152 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 371,126/month — #7,171 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: zen_engine-0.53.0-cp310-cp310-manylinux_2_28_aarch64.whl; zen_engine-0.53.0-cp310-cp310-manylinux_2_28_x86_64.whl; zen_engine-0.53.0-cp310-cp310-win_amd64.whl; zen_engine-0.53.0-cp311-cp311-macosx_10_12_x86_64.whl; zen_engine-0.53.0-cp311-cp311-macosx_11_0_arm64.whl; zen_engine-0.53.0-cp311-cp311-manylinux_2_28_aarch64.whl; zen_engine-0.53.0-cp311-cp311-manylinux_2_28_x86_64.whl; zen_engine-0.53.0-cp311-cp311-win_amd64.whl; zen_engine-0.53.0-cp312-cp312-macosx_10_12_x86_64.whl; zen_engine-0.53.0-cp312-cp312-macosx_11_0_arm64.whl; zen_engine-0.53.0-cp312-cp312-manylinux_2_28_aarch64.whl; zen_engine-0.53.0-cp312-cp312-manylinux_2_28_x86_64.whl; zen_engine-0.53.0-cp312-cp312-win_amd64.whl; zen_engine-0.53.0-cp313-cp313-macosx_10_12_x86_64.whl; zen_engine-0.53.0-cp313-cp313-macosx_11_0_arm64.whl; zen_engine-0.53.0-cp313-cp313-manylinux_2_28_aarch64.whl; zen_engine-0.53.0-cp313-cp313-manylinux_2_28_x86_64.whl; zen_engine-0.53.0-cp313-cp313t-manylinux_2_28_aarch64.whl; zen_engine-0.53.0-cp313-cp313-win_amd64.whl; zen_engine-0.53.0-cp314-cp314-macosx_10_12_x86_64.whl
Keywords: gorules, zen-engine, business rules engine, rules engine, rule engine, bre, rule, rules, engine, decision, decision table, rust, pyo3
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
common-expression-languageEvaluates Google's Common Expression Language…
permissive · top 15,000 on PyPI
json_logic_qubitParses and executes JsonLogic rules—a…
permissive · top 15,000 on PyPI
json-logicParses and executes JsonLogic rules—a…
permissive · top 5,000 on PyPI
panzi-json-logicEvaluates JsonLogic and CertLogic…
permissive · top 15,000 on PyPI
rule-engineRule Engine provides a lightweight, custom…
permissive · top 15,000 on PyPI
business-rulesA Python DSL for defining business rules as…
permissive · top 15,000 on PyPI
sumologic-sdkPython interface to the Sumo Logic REST API,…
permissive · top 15,000 on PyPI
stockfishWraps the Stockfish chess engine to let Python…
permissive · top 5,000 on PyPI
skope-rulesSkope-rules learns interpretable logical rules…
permissive · top 15,000 on PyPI
flagsmith-flag-engineEvaluates feature flags and remote…
permissive · top 5,000 on PyPI