skillfed

jsonata-python

Pure Python implementation of JSONata

jsonata-python v0.7.0 1.7M downloads/30d#3,664 on PyPI104
Permissive 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) Active released

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

uv

uv add jsonata-python

poetry

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

Development Status :: 4 - BetaLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python

Tags

json query languagejsonata expression evaluatorjson transformationjson data extractionjsonata python portjson filtering and mappingjson path queries
json-querydata-transformation

More Text Processing packages