--- id: bc-jsonpath-ng version: "1.6.1" license: Apache License 2.0 license_treatment: permissive maintenance: dormant --- # 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. License: permissive · Maintenance: dormant · Downloads: 4.4M/mo ## 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 above — 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 pip install bc-jsonpath-ng uv add bc-jsonpath-ng poetry add bc-jsonpath-ng ## Installing 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_current - Install friction: low - Maintenance: dormant - Downloads: 4.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags json query language, jsonpath parser, extract json data, json tree traversal, json filtering and selection, json path expressions, query json documents, json-query, ast-manipulation [View on SkillFed](https://skillfed.io/packages/bc-jsonpath-ng) · [View on PyPI](https://pypi.org/project/bc-jsonpath-ng/)