jsonata-python
Pure Python implementation of JSONata
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 on this page — 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
jsonata-python on PyPI
pip
pip install jsonata-pythonuv
uv add jsonata-pythonpoetry
poetry add jsonata-pythonInstalling 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 the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 40 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,674,665/month — #3,664 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: jsonata_python-0.7.0-py3-none-any.whl
Keywords: json, jsonata
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
py-expression-evalParses and evaluates mathematical expressions…
permissive · top 15,000 on PyPI
cel-pythonParses and evaluates Google Common Expression…
unclear · top 5,000 on PyPI
jsonpath-pythonExtracts, filters, sorts, and updates values in…
permissive · top 1,000 on PyPI
json-specImplements JSON Schema, JSON Pointer, and JSON…
permissive · top 15,000 on PyPI
cql2Parses, validates, and converts Common Query…
permissive · top 15,000 on PyPI
promql-parserParses Prometheus query language (PromQL)…
unclear · top 15,000 on PyPI
simpleevalEvaluates mathematical and logical expressions…
permissive · top 5,000 on PyPI
jsonpath-rfc9535Queries JSON data using RFC 9535 JSONPath…
permissive · top 15,000 on PyPI
cel-expr-pythonA Python wrapper for the CEL C++ implementation…
permissive · top 15,000 on PyPI
ijsonijson is an iterative JSON parser that reads…
permissive · top 1,000 on PyPI