Skip to main content

jlens

JSONata for Python, with an engine written in Rust. It filters, queries and transforms JSON documents, and it can explain how a result was reached: which comparisons passed or failed, and which items a filter rejected.

pip install jlens
from jlens import Expression

expr = Expression("$sum(items[type = $kind].(price * qty))")
expr.evaluate({"items": [{"type": "a", "price": 2.5, "qty": 4}]}, {"kind": "a"})  # 10

jlens passes the official JSONata 2.2.2 test suite, and its package is typed. Wheels cover CPython 3.10 and later, and free-threaded Python 3.15 and later, on Linux, macOS and Windows. The package is in beta until jlens 1.0.

API

Name Purpose
Expression(source) Compiles an expression; raises a JlensError on syntax errors
expr.evaluate(input=None, bindings=None, **options) Evaluates against Python values, read as the expression reaches them; None when the result is undefined or null
expr.evaluate_json(text=None, bindings=None, **options) The same with JSON text in and out
Document(value), Document.from_json(text) A document converted once, for expr.evaluate_document(document, bindings=None, **options); shareable between threads
expr.evaluate_with_audit(input=None, bindings=None, *, level, limits, **options) Result, audit tree and explanation; errors are reported, not raised
expr.register_function(name, implementation, signature=None) Makes a Python callable available as $name to every evaluation

Callables in the bindings are host functions too. The options are timeout (seconds), max_depth, max_string_length, max_array_length, max_result_size, now and seed. Errors are JlensError exceptions with the JSONata error code, plus position, start, end, token and value; offsets count code points, like str indexes.

The full guide is the Python chapter of the jlens book.

License

MIT. The code and documentation ported or adapted from JSONata are also under the MIT license; see LICENSE.

Metadata

Release files for jlens 0.28.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jlens 0.28.0
File Size Uploaded Provenance Actions
jlens-0.28.0.tar.gz 493.6 kB With provenance Details for jlens-0.28.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for jlens 0.28.0
File Actions
jlens-0.28.0-cp315-abi3.abi3t-win_amd64.whl CPython 3.15 abi3, abi3t Windows x86-64 Details for jlens-0.28.0-cp315-abi3.abi3t-win_amd64.whl
jlens-0.28.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl CPython 3.15 abi3, abi3t Linux musl 1.2+ x86-64 Details for jlens-0.28.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl
jlens-0.28.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl CPython 3.15 abi3t, abi3 Linux musl 1.2+ ARM64 Details for jlens-0.28.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl
jlens-0.28.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl CPython 3.15 abi3, abi3t Linux glibc 2.28+ x86-64 Details for jlens-0.28.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
jlens-0.28.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl CPython 3.15 abi3, abi3t Linux glibc 2.28+ ARM64 Details for jlens-0.28.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
jlens-0.28.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl CPython 3.15 abi3, abi3t macOS 11.0+ ARM64 Details for jlens-0.28.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl
jlens-0.28.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl CPython 3.15 abi3, abi3t macOS 10.12+ x86-64 Details for jlens-0.28.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl
jlens-0.28.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for jlens-0.28.0-cp310-abi3-win_amd64.whl
jlens-0.28.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for jlens-0.28.0-cp310-abi3-musllinux_1_2_x86_64.whl
jlens-0.28.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for jlens-0.28.0-cp310-abi3-musllinux_1_2_aarch64.whl
jlens-0.28.0-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for jlens-0.28.0-cp310-abi3-manylinux_2_28_x86_64.whl
jlens-0.28.0-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for jlens-0.28.0-cp310-abi3-manylinux_2_28_aarch64.whl
jlens-0.28.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for jlens-0.28.0-cp310-abi3-macosx_11_0_arm64.whl
jlens-0.28.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for jlens-0.28.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 19.9 MB

Release files / jlens-0.28.0.tar.gz

Download URL jlens-0.28.0.tar.gz
Size 493.6 kB
Tags Source
SHA-256 checksum
How to use checksums
62c6eaada89635ac4ffa2f44c068f93be6d419d67941fb5f27a168d4a48ba8f6
BLAKE2b-256 checksum
How to use checksums
a740c2cc2c7cda28706b64d22f8910ce1e1b40d9e8ff80088f22d5dc1c5d8e08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp315-abi3.abi3t-win_amd64.whl

Download URL jlens-0.28.0-cp315-abi3.abi3t-win_amd64.whl
Size 1.3 MB
Tags CPython 3.15 Windows x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
12b35276938b64f3cce2620de11ead1093883f7c8e02e32af04cb9c174f19eef
BLAKE2b-256 checksum
How to use checksums
e9caf1bfb3d6bd212fbe34303283d4274e9290fdec83972ed0c64ee16a334d0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl

Download URL jlens-0.28.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl
Size 1.6 MB
Tags CPython 3.15 Linux musl 1.2+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
dcd949fb7f83ff092308072975c991585bdc80c6fc4a11c9880c5956a7d1e4e8
BLAKE2b-256 checksum
How to use checksums
6fa62aece93a4f3eb3a9d3f6ee66cba2898b6962debea5a5a9284728eeab393e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl

Download URL jlens-0.28.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl
Size 1.5 MB
Tags CPython 3.15 Linux musl 1.2+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
6b56ae3689dbe59e843ab51bd464c25eb93605a444593a349ef145c2d5dc9447
BLAKE2b-256 checksum
How to use checksums
b373408aba364f604f8eb5b9bce1ffe03f09f6157354b8f28284b9fee0e46165
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl

Download URL jlens-0.28.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.15 Linux glibc 2.28+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
bf24f541ab5aa93af10312f1186ef53ac6521a9bf1696c6bc89d814383125058
BLAKE2b-256 checksum
How to use checksums
fb2c52871c29d59a5c0d3fd34978fdaef95202cc4dfdbd05f6095797371ad56d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl

Download URL jlens-0.28.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
Size 1.3 MB
Tags CPython 3.15 Linux glibc 2.28+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
dbc4555f00982d3de4449e33f74d9842857076df7c3a57bfa9b6513efb62d987
BLAKE2b-256 checksum
How to use checksums
78585ece940612550c357a10466bb55563c5a65da1197446dfff7d3edb425050
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl

Download URL jlens-0.28.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.15 abi3 abi3t macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6365722568f2770726a3b0fcb0f87d32dbdf3dd7fd1911f691c58e60471e53e7
BLAKE2b-256 checksum
How to use checksums
05073208d1705abb9541eb1d90c272133bbfae610edf445266c323997337bd0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl

Download URL jlens-0.28.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl
Size 1.3 MB
Tags CPython 3.15 abi3 abi3t macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
3eef128db2218383720c76ee3cdd4bd6c884404db0284fdba4ec3eb136e4afe2
BLAKE2b-256 checksum
How to use checksums
3199237d4277f5693119e9afaefddf77fa00446dfa6fdb911c1c184caafc202f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp310-abi3-win_amd64.whl

Download URL jlens-0.28.0-cp310-abi3-win_amd64.whl
Size 1.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
62041d9d89c530d4e4789429ca4ac839db82d3f672dff3fa3ebe3c879cfd888a
BLAKE2b-256 checksum
How to use checksums
f439ce4f13de5d0dc51878034224adcbd9abbd0b7d3d9a91569aa51eb5e4a509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL jlens-0.28.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 1.6 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
c2a20c25ab32ae237741b7d21d37950d27325d027e71a0209622b8a4a75f43e6
BLAKE2b-256 checksum
How to use checksums
ac9615fea5f8b4973031c1e94c95dd69d803f5cf8b90913c9ea9c043aa774f1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL jlens-0.28.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 1.5 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
ed888152538efecab727e771a215f5f500bf87492cbcba15eb6b5ff079fb6447
BLAKE2b-256 checksum
How to use checksums
2c8cc4d8523248ab0c86529c848b18caaea42dc481cc7073bd5ed79e000a5e9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL jlens-0.28.0-cp310-abi3-manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
07ca1d5f61ebee7153fcabc76a2efbb6d36e8509200f67e57708f6d21cca59d4
BLAKE2b-256 checksum
How to use checksums
06eb4f55163fe8bbe769d2b54e5fb9162118a28b7e0b2e0e003f8fe9ff6ecbf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL jlens-0.28.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
7f5eb4a80e8deaa37cba40327703556caa06b5b9c98a6662e0a80e6d8dfac8bb
BLAKE2b-256 checksum
How to use checksums
08e69eb10df36fde5a923052d7335928d46b70b1b51f003c120aa027a42f72c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL jlens-0.28.0-cp310-abi3-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9d91e202c76a887310e8ddd20837d5008b58f9f3b1522c92c99a775c76ded717
BLAKE2b-256 checksum
How to use checksums
60b32bd68e66cf1e99d2c50fbcd71de0df3ded1e582e26b5ebd7aa0c555ceafb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / jlens-0.28.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL jlens-0.28.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e800eb98df563fd1aca7359e6a0327aa3b39108637b033df53f5c134d5a60ad6
BLAKE2b-256 checksum
How to use checksums
28d35f74a1c95f8edda1c8ca47b3126ac328a1ba1a5875698c565f1984a9d47d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for jlens 0.28.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 15 files in this release have been uploaded with provenance metadata.

Select from 15 files

Attestation for jlens-0.28.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page