skillfed

jsonquerylang

A lightweight, flexible, and expandable JSON query language

jsonquerylang v2.1.0 205.0K downloads/30d#9,594 on PyPI
Permissive license ISC AGING released

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 jsonquerylang

uv

uv add jsonquerylang

poetry

poetry add jsonquerylang

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: ISC License (ISCL)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

json query languagefilter and transform jsonjson data queryingjson filtering and sortingquery json with expressionsjson transformation toolstructured data querying
json-queryingdata-transformation

More Text Processing packages