skillfed

panzi-json-logic

Pure Python 3 JsonLogic and CertLogic implementation.

panzi-json-logic v1.0.1 607.4K downloads/30d#5,786 on PyPI26
Permissive license Abandoned released

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

uv

uv add panzi-json-logic

poetry

poetry add panzi-json-logic

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

json logic evaluationcertlogic rules enginecross-language rule evaluationjson conditional logicrule engine pythonlogic rules from jsonshared business rules
rules-enginejson-logiccross-language

More Software Development packages