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.29.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.29.0
File Size Uploaded Provenance Actions
jlens-0.29.0.tar.gz 495.4 kB With provenance Details for jlens-0.29.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for jlens 0.29.0
File Actions
jlens-0.29.0-cp315-abi3.abi3t-win_amd64.whl CPython 3.15 abi3t, abi3 Windows x86-64 Details for jlens-0.29.0-cp315-abi3.abi3t-win_amd64.whl
jlens-0.29.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl CPython 3.15 abi3t, abi3 Linux musl 1.2+ x86-64 Details for jlens-0.29.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl
jlens-0.29.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl CPython 3.15 abi3, abi3t Linux musl 1.2+ ARM64 Details for jlens-0.29.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl
jlens-0.29.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.29.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
jlens-0.29.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl CPython 3.15 abi3, abi3t Linux glibc 2.28+ ARM64 Details for jlens-0.29.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
jlens-0.29.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl CPython 3.15 abi3, abi3t macOS 11.0+ ARM64 Details for jlens-0.29.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl
jlens-0.29.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl CPython 3.15 abi3, abi3t macOS 10.12+ x86-64 Details for jlens-0.29.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl
jlens-0.29.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for jlens-0.29.0-cp310-abi3-win_amd64.whl
jlens-0.29.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for jlens-0.29.0-cp310-abi3-musllinux_1_2_x86_64.whl
jlens-0.29.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for jlens-0.29.0-cp310-abi3-musllinux_1_2_aarch64.whl
jlens-0.29.0-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for jlens-0.29.0-cp310-abi3-manylinux_2_28_x86_64.whl
jlens-0.29.0-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for jlens-0.29.0-cp310-abi3-manylinux_2_28_aarch64.whl
jlens-0.29.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for jlens-0.29.0-cp310-abi3-macosx_11_0_arm64.whl
jlens-0.29.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for jlens-0.29.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 19.9 MB

Release files / jlens-0.29.0.tar.gz

Download URL jlens-0.29.0.tar.gz
Size 495.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3cfbab4d0647c65f5ac60e0bf56943dfaa9bbfdc49b603ea547b8ec96a9e2069
BLAKE2b-256 checksum
How to use checksums
b057a26cccaca128ea4145df7be7f7cd54d5c18ed6104b5c6cfe56819a079428
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.29.0-cp315-abi3.abi3t-win_amd64.whl

Download URL jlens-0.29.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
44678117bad44da60333b37463fdd731ff853b3f8978fc927d2b4d8d7061fef2
BLAKE2b-256 checksum
How to use checksums
5301f261d7f1d30cf849f2d3a1f3adf715c9a3f004f300391e8024b3cbd36b64
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.29.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl

Download URL jlens-0.29.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
af396071de0ee2cc571958e333eee1b25f4a8d102cf87f5f2a51ca56665dff33
BLAKE2b-256 checksum
How to use checksums
b74a38ca365c97c803b746cb2f9ab16a94b0947bb9c97e8a68e135ec1401792d
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.29.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl

Download URL jlens-0.29.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
4d17da0df0e64e2e994194eb9588d749c87416a0dd0626a1527fc11d1380642b
BLAKE2b-256 checksum
How to use checksums
9a6b3c5813f65ad6c3562a16c0ac1dc06ccc79d20f9659341c3163ac2c81bb3a
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.29.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl

Download URL jlens-0.29.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
e9fc42f8e0bb2da0b1b6d7491fcde01f7cd849fb212137ecf6452090f30d5ae7
BLAKE2b-256 checksum
How to use checksums
ca3d10ba29f2e88f5bfa6d7674a34e6096c27235cf3c898a2eef1d507eb31313
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.29.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl

Download URL jlens-0.29.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
9602ad9ba72816bc9450cd44ae5a59d6e0862acddf25cba65a6d4984c20d8b4c
BLAKE2b-256 checksum
How to use checksums
15bc4c96a49167df558851c51fdb74abb01690808da17c70fae09645ed1bd5d2
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.29.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl

Download URL jlens-0.29.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.15 abi3 abi3t macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
04e666590ae6bdb8a762e5985dd0b9faa32d417ddb0946424b398d67b5537497
BLAKE2b-256 checksum
How to use checksums
d7ffcd535b18bc8987192afe96964917be0e740207b8baabc7f5770e16673e95
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.29.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl

Download URL jlens-0.29.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
9769072b1e3176a48dfe1042af85c94d210776dfa4ddb93eca67d76c7de0ed1d
BLAKE2b-256 checksum
How to use checksums
c12ae7b2b8728d9ae95eca699f438f3587a47eb163ce2ff73a702db48d0dbd0a
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.29.0-cp310-abi3-win_amd64.whl

Download URL jlens-0.29.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
e2d8bc954c47a1b2aeae65ed8e81e4d6fd303c55c7d43a831f585198770cc012
BLAKE2b-256 checksum
How to use checksums
63a2ed30cf30a4058e3a826c32efe0577339ba426912fd0d1ae7d799f1fc1aa1
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.29.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL jlens-0.29.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
4c94861b0e8d412cee9feb256a1c74a910d7336a108acb9cba6c2eb71f66988e
BLAKE2b-256 checksum
How to use checksums
107831b5c610ac8f2e0585a65a7a31ba4d36f4da58c3c1a3e451eacb2307d44f
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.29.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL jlens-0.29.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
dc7b36faed78a550d195e457934fee48001d82d41c0f03cc55942428fb6a5770
BLAKE2b-256 checksum
How to use checksums
253a4c97b41dde752fcf10c3812fd7093fb03adb5d43033afdb57abf0f735447
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.29.0-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL jlens-0.29.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
506ac7234eec56eb7886bfc8bdb064660c65b0094857c67e61f0f25dd6c2551b
BLAKE2b-256 checksum
How to use checksums
ec0a63a80c2d94810d30ed945d9f6914999cde7565050017121b9f5f4b9b5fa6
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.29.0-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL jlens-0.29.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
7c8fc05d278a6b8839cad54c30c924c4d33db9b4a9f1ef93551592eed4135653
BLAKE2b-256 checksum
How to use checksums
a944ec632d9a0fb50fcd5731b095eb62ad1fb1cb635d3fb5eb4927b0dcbee749
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.29.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL jlens-0.29.0-cp310-abi3-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
75ee7a9c4e89ae3c8f8be664e487d2ad2f3d64273af25f9124a429a137fca195
BLAKE2b-256 checksum
How to use checksums
5f4a66131c46f43415dafe89b0ba45135d8460b52b7145b2d4b5cb507ef54309
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.29.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL jlens-0.29.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
eb9816565ab3c095502b2846b0b038d4ba0e13b50ceae8a9dd18d9ae8570003b
BLAKE2b-256 checksum
How to use checksums
c3df64ee2cf94b1de35a797d80ef4b5436a280ffdebcb5c5be005b07427e3c37
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.29.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.29.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