bc-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.
What it is and what it does
bc-jsonpath-ng is a JSONPath implementation for Python that provides a full language implementation rather than regex-based matching. It parses JSONPath expressions into first-class AST objects, making them easy to analyze, transform, and extend. The library supports standard JSONPath syntax plus extensions like arithmetic operators, binary comparisons, named operators, and the ability to update or remove nodes in the matched tree.
You use it by parsing a JSONPath string or building expressions programmatically, then calling find() on a JSON-like Python dict to extract matching values. The library returns match objects that preserve full path information, enabling automatic ID generation and parent traversal. It depends on ply and decorator for parsing and function decoration.
Use it for:
- Extract specific fields from nested JSON APIs or configuration files using a single expression.
- Validate or filter JSON documents by matching against multiple conditions with operators.
- Build tools that transform JSON structures by updating or removing matched nodes via the AST API.
- Generate automatic unique identifiers for JSON data elements that lack them, using path information.
- Parse and analyze JSONPath expressions themselves for query optimization or documentation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and queries JSON structures using JSONPath expressions, supporting arithmetic operators, binary comparisons, and AST manipulation for extracting, updating, or removing nodes.
Yes, if you need standards-compliant JSONPath with arithmetic and comparison operators. The low install friction, permissive license, and zero security issues make it safe to add. However, note that maintenance is dormant (last commit Feb 2024, no releases for 992 days)—suitable for stable production use but not for projects requiring active bug fixes or feature development.
Install
bc-jsonpath-ng on PyPI
pip
pip install bc-jsonpath-nguv
uv add bc-jsonpath-ngpoetry
poetry add bc-jsonpath-ngInstalling bc-jsonpath-ng
Before you install
Low install friction with only two runtime dependencies (ply and decorator). Maintenance is dormant—last commit was 2024-02-05 and no releases for 992 days—but the package is marked Production/Stable and has seen no security issues.
License in practice
Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install bc-jsonpath-ng
from bc_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]
Requires Python 3.8 or later.
Verify before relying
- Whether the dormant maintenance status (last commit Feb 2024) affects real-world reliability or if the stable API is sufficient for production use.
- Performance characteristics when querying very large JSON documents or deeply nested structures.
- Real-world usage patterns and whether the AST manipulation features (update/remove nodes) are actively used.
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — ply, decorator |
| Maintenance | dormant — 992 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,425,449/month — #2,305 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: bc_jsonpath_ng-1.6.1-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
jsonpath-ngParse, query, and modify JSON structures using…
permissive · top 1,000 on PyPI
jsonpath-pythonExtracts, filters, sorts, and updates values in…
permissive · top 1,000 on PyPI
jsonpath-rwParses and executes JSONPath expressions…
permissive · top 5,000 on PyPI
jsonpath-rw-extExtends JSONPath RW with additional query…
permissive · top 5,000 on PyPI
jmespathJMESPath is a query language for extracting and…
permissive · top 100 on PyPI
jsonpathImplements JSONPath, a query language for…
permissive · top 5,000 on PyPI
jsonpath-rfc9535Queries JSON data using RFC 9535 JSONPath…
permissive · top 15,000 on PyPI
objectpathObjectPath is a query language for finding and…
permissive · top 15,000 on PyPI
python-jsonpathImplements RFC 9535-compliant JSONPath query…
permissive · top 5,000 on PyPI
robotframework-jsonlibraryA Robot Framework library for querying, adding,…
permissive · top 15,000 on PyPI