--- id: jsonata-python version: "0.7.0" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: active --- # jsonata-python — Pure Python implementation of JSONata License: permissive · Maintenance: active · Downloads: 1.7M/mo ## What it is and what it does jsonata-python is a pure Python port of the JSONata reference implementation, a query and transformation language for JSON. It lets you write compact expressions to extract, filter, and reshape JSON data—similar to XPath for XML or jq for command-line JSON work. The package supports the full JSONata language specification with no external dependencies, making it straightforward to embed in Python applications or use as a CLI tool. The package includes guardrails to protect against untrusted expressions: you can set execution timeouts, stack depth limits, and swap in alternative regex engines to prevent ReDoS attacks. It requires Python 3.10 or later, and date/time functions using ISO 8601 formats require Python 3.11+. Use it for: - Extract and transform JSON API responses in data pipelines without writing custom parsing code. - Build a CLI tool that accepts JSONata expressions to query JSON files or stdin. - Safely evaluate user-provided JSONata expressions in a web service with configurable timeout and stack limits. - Filter and aggregate nested JSON structures in ETL workflows or reporting systems. - Implement interactive REPL environments for JSON exploration and ad-hoc data analysis. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Evaluates JSONata expressions against JSON data, supporting the full JSONata language with no external runtime dependencies. Yes. jsonata-python is actively maintained, has zero known vulnerabilities, installs with no friction, and is permissively licensed. Install it if you need to evaluate JSONata expressions in Python or want a command-line tool for JSON querying. The only caveat is the Python 3.10+ requirement and the ISO 8601 date/time limitation on Python versions below 3.11. ## Install pip install jsonata-python uv add jsonata-python poetry add jsonata-python ## Installing jsonata-python Before you install: Low friction install with no runtime dependencies. Actively maintained; last release 40 days ago with 104 repository stars. License in practice: Apache License 2.0 (permissive): you can use, modify, and distribute freely in commercial and private projects, provided you include a copy of the license and note any changes. Quickstart: pip install jsonata-python import jsonata data = {"example": [{"value": 4}, {"value": 7}, {"value": 13}]} expr = jsonata.Jsonata("$sum(example.value)") result = expr.evaluate(data) print(result) # 24 Requires Python 3.10 or later; ISO 8601 date/time functions require Python 3.11+ Verify before relying: - Performance characteristics when evaluating complex expressions against large datasets - Behavior of date/time functions on Python 3.10 when ISO 8601 formats are used ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags json query language, jsonata expression evaluator, json transformation, json data extraction, jsonata python port, json filtering and mapping, json path queries, json-query, data-transformation [View on SkillFed](https://skillfed.io/packages/jsonata-python) · [View on PyPI](https://pypi.org/project/jsonata-python/)