skillfed

python-jsonpath

JSONPath, JSON Pointer and JSON Patch for Python.

python-jsonpath v2.2.1 1.5M downloads/30d#3,835 on PyPI77
Permissive license MIT Active released

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

uv

uv add python-jsonpath

poetry

poetry add python-jsonpath

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

jsonpath query enginejson path selectorrfc 9535 jsonpathjson pointer resolverjson patch applyquery json documentsjson data extraction
json-queryrfc-compliantdata-extraction

More Text Processing packages