skillfed

zen-engine

Open-Source Business Rules Engine

zen-engine v0.53.0 371.1K downloads/30d#7,171 on PyPI1,907
License unclear Active released

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

uv

uv add zen-engine

poetry

poetry add zen-engine

Installing 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

Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Rust

Tags

business rules engine pythondecision table evaluationjson decision model executorrule engine bredecision logic evaluationrules-based decision makingjdm engine python
decision-enginerules-enginerust-binding

More Software Development packages