{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/5"}],"enrichment":{"capability":"Parses and executes JsonLogic rules\u2014a JSON-serializable format for expressing conditional logic\u2014allowing you to share the same rules across front-end and back-end code regardless of language.","skillfed_tags":["rules-engine","cross-language","json-serializable"],"use_cases":["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"],"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.\n\nThe 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\u2014for 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.","worth_installing":"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\u2014suitable for stable, self-contained use cases but risky if you depend on ongoing support."},"id":"json-logic","links":{"html":"https://skillfed.io/packages/json-logic","md":"https://skillfed.io/packages/json-logic.md","pypi":"https://pypi.org/project/json-logic/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2015-12-04","license_spdx":null,"license_treatment":"permissive","name":"json-logic","python_support":"unspecified","summary":"Build complex rules, serialize them as JSON, and execute them in Python"},"popularity":{"monthly_downloads":2515893,"position":3029,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.6.3"}
