python-jsonpath
JSONPath, JSON Pointer and JSON Patch for Python.
What it is and what it does
Python JSONPath is a query engine that extracts data from JSON structures using JSONPath expressions. It implements the RFC 9535 standard and is tested against the JSONPath Compliance Test Suite, making it suitable for applications that need standards-compliant path-based JSON navigation. The package also bundles RFC 6901 JSON Pointer (for direct reference resolution) and RFC 6902 JSON Patch (for applying structured modifications to JSON objects).
The library has no external runtime dependencies and supports Python 3.8 through 3.14 on both CPython and PyPy. It is designed as a general-purpose tool for developers who need to query, reference, or patch JSON data programmatically—typical use cases include API response filtering, configuration file manipulation, and data transformation pipelines.
Use it for:
- Extract matching records from a JSON API response using filter expressions like $.users[?@.status == 'active']
- Navigate deeply nested JSON structures with JSON Pointer to retrieve or validate specific field values
- Apply a series of add, remove, copy, or test operations to JSON objects using JSON Patch
- Build data transformation pipelines that select and modify JSON documents in bulk
- Validate JSON structure compliance by combining JSONPath queries with test assertions
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements RFC 9535-compliant JSONPath query evaluation, plus RFC 6901 JSON Pointer and RFC 6902 JSON Patch operations for Python.
Yes. The package is actively maintained, has zero known vulnerabilities, carries a permissive MIT license, installs with no dependencies, and implements a standards-based API (RFC 9535) that is well-documented. It is suitable for production use in any Python project that needs to query or manipulate JSON data.
Install
python-jsonpath on PyPI
pip
pip install python-jsonpathuv
uv add python-jsonpathpoetry
poetry add python-jsonpathInstalling python-jsonpath
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained with a recent release; last commit 2026-07-28.
License in practice
MIT license (permissive); you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install python-jsonpath
import jsonpath
data = {"users": [{"name": "Sue", "score": 100}, {"name": "John", "score": 86}]}
result = jsonpath.findall("$.users[?@.score < 100].name", data)
print(result) # ['John']
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 38 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,497,050/month — #3,835 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_jsonpath-2.2.1-py3-none-any.whl
Keywords: JSON, JSON Patch, JSON Path, JSON Pointer, JSONPath, RFC 9535
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
jsonpatchApplies JSON Patches according to RFC 6902,…
permissive · top 1,000 on PyPI
jsonpath-rfc9535Queries JSON data using RFC 9535 JSONPath…
permissive · top 15,000 on PyPI
jsonpointerResolves JSON Pointers according to RFC 6901,…
permissive · top 1,000 on PyPI
jsonpath-pythonExtracts, filters, sorts, and updates values in…
permissive · top 1,000 on PyPI
jsonpath-ngParse, query, and modify JSON structures using…
permissive · top 1,000 on PyPI
jsonpath-rw-extExtends JSONPath RW with additional query…
permissive · top 5,000 on PyPI
bc-jsonpath-ngParses and queries JSON structures using…
permissive · top 5,000 on PyPI
jschonValidates JSON data against JSON Schema (drafts…
permissive · top 15,000 on PyPI
jsonpath-rwParses and executes JSONPath expressions…
permissive · top 5,000 on PyPI
json-specImplements JSON Schema, JSON Pointer, and JSON…
permissive · top 15,000 on PyPI