jsonquerylang
A lightweight, flexible, and expandable JSON query language
What it is and what it does
jsonquerylang is a Python implementation of JSON Query, a domain-specific language for extracting and transforming JSON data. It lets you write queries that navigate JSON structures, filter arrays, sort results, and pick specific fields—similar to how you might use jq on the command line, but as a Python library. Queries can be written in a readable text syntax (e.g., `.friends | filter(.city == "New York")`) or as JSON arrays, and the library compiles them into executable functions.
The package depends only on regex and installs as a pure Python wheel, making it lightweight. It supports Python 3.7 through 3.13 and includes an API for compiling queries for reuse, parsing text queries into JSON form, and extending the language with custom functions and operators. The last release was 248 days ago and maintenance is aging, so updates may be infrequent.
Use it for:
- Extract and filter nested JSON API responses before passing them to downstream processing.
- Transform JSON configuration files by selecting specific fields and applying conditional logic.
- Sort and aggregate array data within JSON structures without writing imperative loops.
- Build reusable query templates by compiling queries once and executing them against multiple datasets.
- Implement custom query logic by adding domain-specific functions to the query language.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Executes queries against JSON data using a specialized query language, supporting filtering, sorting, field selection, and custom functions through both text and JSON syntax.
Yes, if you need a lightweight, permissive-licensed JSON query tool and can tolerate aging maintenance. The low install friction, lack of security issues, and broad Python version support make it a reasonable choice for filtering and transforming JSON. However, verify that the query syntax and custom function API meet your needs before committing to it in production, and be prepared for slower issue resolution.
Install
jsonquerylang on PyPI
pip
pip install jsonquerylanguv
uv add jsonquerylangpoetry
poetry add jsonquerylangInstalling jsonquerylang
Before you install
Low install friction—pure Python wheel with a single runtime dependency (regex). Last release was 248 days ago; maintenance status is aging, so expect slower response to issues.
License in practice
ISC license is permissive and poses no restrictions on commercial or private use, modification, or redistribution.
Quickstart
pip install jsonquerylang
from jsonquerylang import jsonquery
data = {"friends": [{"name": "Chris", "age": 23, "city": "New York"}]}
result = jsonquery(data, '.friends | filter(.city == "New York") | pick(.name, .age)')
print(result)
Verify before relying
- Whether custom operators and functions are stable and well-documented for production use.
- Performance characteristics when querying large JSON structures or deeply nested data.
- Community adoption and real-world usage patterns beyond the top-15000 popularity tier.
Package facts
| License | ISC (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — regex |
| Maintenance | aging — 248 days since the last release |
| First released | |
| Downloads | 204,998/month — #9,594 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: jsonquerylang-2.1.0-py3-none-any.whl
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
mongo-query-matchProvides a MongoDB-like query language for…
unclear · top 15,000 on PyPI
jsonpath-pythonExtracts, filters, sorts, and updates values in…
permissive · top 1,000 on PyPI
sqlalchemy-filtersAdds filtering, sorting, and pagination…
permissive · top 15,000 on PyPI
fix-busted-jsonRepairs malformed JSON strings by fixing common…
permissive · top 15,000 on PyPI
jsonslicerParses JSON streams and large files without…
permissive · top 15,000 on PyPI
json-flattenConverts nested JSON objects into flat…
permissive · top 15,000 on PyPI
python-jsonpathImplements RFC 9535-compliant JSONPath query…
permissive · top 5,000 on PyPI
jsonpath-rw-extExtends JSONPath RW with additional query…
permissive · top 5,000 on PyPI
zipcodesQuery and validate U.S. zipcodes with embedded…
permissive · top 15,000 on PyPI
trustcallTrustcall helps LLMs reliably generate and…
permissive · top 5,000 on PyPI