json-logic
Build complex rules, serialize them as JSON, and execute them in Python
Decision gist · record as of 2026-08-14
Yes, if you need a lightweight, language-agnostic rules engine and can accept dormant maintenance. The package has no dependencies, installs easily, and works for straightforward JsonLogic evaluation. However, verify compatibility with your Python version (classifiers list only up to 3.4) and be aware that no active maintenance means no bug fixes or feature updates—suitable for stable, self-contained use cases but risky if you depend on ongoing support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is straightforward with no runtime dependencies.
- The package is dormant (last release 2015-12-04, last commit 2023-12-19), so expect no active maintenance, though the repository remains unarchived.
License · maintenance · safety
MIT (permissive) — Licensed under MIT (permissive), so you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2015-12-04 (3906 days) · last repo commit 2023-12-19 · 226 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,515,893 downloads/mo, #3,029 on PyPI
Alternatives
Verify before relying
pip install json-logic
from json_logic import jsonLogic
rules = {"==": [1, 1]}
result = jsonLogic(rules)
# True
rules = {"var": "name"}
data = {"name": "Alice"}
result = jsonLogic(rules, data)
# "Alice"- Whether the package works reliably with modern Python versions beyond those listed in classifiers (3.4 and earlier)
- Whether the dormant status and lack of recent releases pose compatibility risks with current ecosystems
What it is and what it does
json-logic is a Python implementation of the JsonLogic format, a language-agnostic way to express conditional logic as JSON. It lets you write rules once and execute them identically in Python, JavaScript, PHP, and other supported languages, making it useful for sharing validation or decision logic between client and server code or storing rules in a database alongside data.
The package provides a single main function, jsonLogic, which takes a rule object (and optionally a data object) and returns the result of evaluating that rule. Rules use a prefix notation where the operator is the key and operands are the value—for example, {"==": [1, 1]} evaluates to True. It supports comparison operators, logical operators (and, or, not), variable references (var), and nested rule composition. No external dependencies are required.
Use it for
- Store validation or authorization rules in a database and execute them server-side without code deployment
- Share conditional business logic between a JavaScript front-end and Python back-end using the same JSON rule format
- Build a rules engine for A/B testing, feature flags, or dynamic pricing without writing conditional code
- Serialize complex decision trees as JSON for configuration files or API responses that clients can also interpret
- Implement user-defined filters or queries in a web application by accepting JsonLogic rules from the client
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need a lightweight, language-agnostic rules engine and can accept dormant maintenance.
The package has no dependencies, installs easily, and works for straightforward JsonLogic evaluation. However, verify compatibility with your Python version (classifiers list only up to 3.4) and be aware that no active maintenance means no bug fixes or feature updates—suitable for stable, self-contained use cases but risky if you depend on ongoing support.
Install
json-logic on PyPI
Before you install
Installation is straightforward with no runtime dependencies. The package is dormant (last release 2015-12-04, last commit 2023-12-19), so expect no active maintenance, though the repository remains unarchived.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install json-logic
from json_logic import jsonLogic
rules = {"==": [1, 1]}
result = jsonLogic(rules)
# True
rules = {"var": "name"}
data = {"name": "Alice"}
result = jsonLogic(rules, data)
# "Alice"
Verify before relying
- Whether the package works reliably with modern Python versions beyond those listed in classifiers (3.4 and earlier)
- Whether the dormant status and lack of recent releases pose compatibility risks with current ecosystems
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 3,906 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,515,893 / month, #3,029 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Topic :: Software Development :: Libraries :: Python Modules |
Evidence: json_logic-0.6.3-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “json logic rules execution”
- json-logicParses and executes JsonLogic rules—a JSON-serializable format for…
- panzi-json-logicEvaluates JsonLogic and CertLogic rules—JSON-serializable logic…
- json_logic_qubitParses and executes JsonLogic rules—a language-agnostic JSON format…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also business-rules · json_logic_qubit · panzi-json-logic · zen-engine · robotframework-jsonlibrary · jsonable · logical-unification · rules · plyara · skope-rules