jsonpath-ng
A final implementation of JSONPath for Python that aims to be standard compliant, including arithmetic and binary comparison operators and providing clear AST for metaprogramming.
Install
jsonpath-ng on PyPI
pip
pip install jsonpath-nguv
uv add jsonpath-ngpoetry
poetry add jsonpath-ngPackage facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 170 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: jsonpath_ng-1.8.0-py3-none-any.whl
About jsonpath-ng
from the package's own PyPI description — quoted content, verbatim
Python JSONPath Next-Generation |Build Status| |PyPI|
A final implementation of JSONPath for Python that aims to be standard compliant, including arithmetic
and binary comparison operators, as defined in the original JSONPath proposal_.
This packages merges both jsonpath-rw and jsonpath-rw-ext and
provides several AST API enhancements, such as the ability to update or remove nodes in the tree.
About
This library provides a robust and significantly extended implementation of JSONPath for Python. It is tested with CPython 3.10 and higher.
This library differs from other JSONPath implementations in that it is a full language implementation, meaning the JSONPath expressions are first class objects, easy to analyze, transform, parse, print, and extend.
Quick Start
To install, use pip:
.. code:: bash
$ pip install --upgrade jsonpath-ng
Usage
Basic examples:
.. code:: python
$ python
>>> from jsonpath_ng import jsonpath, parse
# A robust parser, not just a regex. (Makes powerful extensions possible; see below)
>>> jsonpath_expr = parse('foo[*].baz')
#...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Parses and evaluates JSONPath expressions against JSON data, supporting standard operators, arithmetic comparisons, and AST manipulation for querying, updating, and filtering nested structures.
Low friction: pure Python wheel with no runtime dependencies, tested on CPython 3.10–3.14, and actively maintained with a recent release (170 days ago).
Apache 2.0 permissive license allows commercial and private use with minimal restrictions; attribution required but no copyleft obligations.
Usage
pip install jsonpath-ng
from jsonpath_ng import parse
jsonpath_expr = parse('foo[*].baz')
matches = jsonpath_expr.find({'foo': [{'baz': 1}, {'baz': 2}]})
values = [match.value for match in matches]
print(values) # [1, 2]
Verdict: Production-ready JSONPath implementation with zero security vulnerabilities, no external dependencies, and active maintenance. Suitable for applications requiring robust JSON querying with support for updates and filtering.
Needs verification
- Performance characteristics compared to other JSONPath libraries for large datasets
- Completeness of JSONPath standard compliance relative to RFC or formal specification
Similar packages
permissive · top 1,000 on PyPI
jmespathpermissive · top 100 on PyPI
graphql-relaypermissive · top 1,000 on PyPI
pure-evalpermissive · top 1,000 on PyPI
astroidcopyleft · top 1,000 on PyPI
croniterpermissive · top 1,000 on PyPI
pytest-json-ctrfpermissive · top 1,000 on PyPI
dacitepermissive · top 1,000 on PyPI
sqlglotpermissive · top 1,000 on PyPI
pathablepermissive · top 1,000 on PyPI