panzi-json-logic
Pure Python 3 JsonLogic and CertLogic implementation.
What it is and what it does
panzi-json-logic is a pure Python interpreter for JsonLogic—a JSON-based format for expressing conditional logic that can be shared across languages and stored in databases. It also implements CertLogic, a dialect with different semantics used in certificate validation workflows. The package evaluates rules (expressed as nested JSON objects with operators as keys) against data objects, supporting comparison, logical, and data-access operations.
The implementation aims to closely match the JavaScript reference implementation's operator behavior, including quirks like loose equality. It supports custom operations via an optional dictionary, and includes extras like time parsing and conversion utilities. With no external runtime dependencies, it installs cleanly, but the project has been abandoned since 2021-09-12 and receives no maintenance.
Use it for:
- Store conditional business rules in a database and evaluate them server-side without recompiling or redeploying code.
- Share the same rule logic between a web front-end and Python back-end to keep validation consistent.
- Implement certificate validation workflows using CertLogic rules for EU digital certificates or similar systems.
- Build a rules engine where non-developers can define logic in JSON without writing Python code.
- Evaluate time-based rules using built-in time operators for expiration or validity checks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Evaluates JsonLogic and CertLogic rules—JSON-serializable logic formats designed to share conditional rules between front-end and back-end code—against data objects and returns the computed result.
Yes, if you need to evaluate JsonLogic or CertLogic rules and can tolerate an unmaintained library. The package is stable, has no dependencies, and works well for its stated purpose. However, do not use it if you require active maintenance, security updates, or compatibility assurance with future Python versions. For new projects, consider whether a maintained alternative better fits your risk tolerance.
Install
panzi-json-logic on PyPI
pip
pip install panzi-json-logicuv
uv add panzi-json-logicpoetry
poetry add panzi-json-logicInstalling panzi-json-logic
Before you install
No runtime dependencies and a pure Python wheel make installation straightforward. However, the project is abandoned—last commit was 2021-09-12 and no updates have been released since. Security and compatibility fixes are unlikely.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute the package freely with minimal restrictions.
Quickstart
pip install panzi-json-logic
from panzi_json_logic import jsonLogic
rule = {"==": [1, 1]}
result = jsonLogic(rule)
# True
rule_with_data = {"var": "temp"}
data = {"temp": 100}
result = jsonLogic(rule_with_data, data)
# 100
Requires Python 3.6 or later.
Verify before relying
- How well does the JavaScript operator emulation handle edge cases in production use?
- Are there known incompatibilities with recent Python versions?
- Does the package handle deeply nested rules or large datasets efficiently?
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,797 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 607,401/month — #5,786 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: panzi_json_logic-1.0.1-py3-none-any.whl
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
json-logicParses and executes JsonLogic rules—a…
permissive · top 5,000 on PyPI
json_logic_qubitParses and executes JsonLogic rules—a…
permissive · top 15,000 on PyPI
zen-enginezen-engine is a Python binding for a Rust-based…
unclear · top 15,000 on PyPI
business-rulesA Python DSL for defining business rules as…
permissive · top 15,000 on PyPI
skope-rulesSkope-rules learns interpretable logical rules…
permissive · top 15,000 on PyPI
databricks-labs-dqxDQX provides rule-based data quality checking…
unclear · top 5,000 on PyPI
plyaraParses YARA rule files into Python dictionary…
permissive · top 15,000 on PyPI
rulesrules provides object-level permission checking…
permissive · top 15,000 on PyPI
openfeature-flagd-coreEvaluates feature flags using JSON logic and…
permissive · top 15,000 on PyPI
cualleeCuallee provides a dataframe-agnostic API to…
permissive · top 15,000 on PyPI