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.19.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.19.0
File Size Uploaded
jlens-0.19.0.tar.gz 439.0 kB Details

Built distributions (wheels)

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

Total release size: 18.7 MB

Release files / jlens-0.19.0.tar.gz

Download URL jlens-0.19.0.tar.gz
Size 439.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fa73efb9941caffe06982fe6fb8e141ea62b43ce021631fb1ce15eaaf73802b5
BLAKE2b-256 checksum
How to use checksums
a0bca44ad7ffddb89c77e62bad597b57cc93ff1953ca404f6dd11f4c852c4bb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.0-cp315-abi3.abi3t-win_amd64.whl
Size 1.2 MB
Tags CPython 3.15 Windows x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
7368b386b8094a7d205adff190ac20365da87dfd5612ed9a30b18c412b62dcbc
BLAKE2b-256 checksum
How to use checksums
637da8a62ad07a96ccf6faf6a1d610ddc1361ec692262af0c3e8cb9e1e43f3aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl
Size 1.5 MB
Tags CPython 3.15 Linux musl 1.2+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
0ea71c507fdf2f48860ee460dcfd3073ac9f335e9d03c43c5464a680af41c078
BLAKE2b-256 checksum
How to use checksums
1c2833a1fdd34761d6455eff200f98df0f40fd847b83ec1f2f2849477323df6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl
Size 1.4 MB
Tags CPython 3.15 Linux musl 1.2+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
0ddb5effc63b92cf608f6f3790e9b452ec1e3888b218b90647efe2048efb0e70
BLAKE2b-256 checksum
How to use checksums
34a3df6003306802221ad193b7ce64e377d138c21cdd28d35f8c771d286546cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

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

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.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
877f069e03d1bcd086f34118008701ff46d82753b80a495ad15bdc849b6a81dc
BLAKE2b-256 checksum
How to use checksums
3bc15d1ec9d63ebe17b0dadb9ddd2d1b0dfb37f543964eb1c43457677f943050
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.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
d40eb8f5a85598f0594029cb2e70769ba2f34fe5d75ad5136ca59942ff57e20d
BLAKE2b-256 checksum
How to use checksums
e5289f5c3dc1ed9fa995595ffee2656d732bf5c83248ff1c7df35bd77296f2a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.15 abi3 abi3t macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d9aeee625bbdb5861073dbcbd9f58d3d5a778de60d5ab7f453196d18c0b37e9b
BLAKE2b-256 checksum
How to use checksums
85d6efb12d4410e06b4ba43bfc316f1cd48823a7c4798a6ea56a69b122a4969d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.0-cp310-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c3f346e1cbcfce38230d1622dde86cb29a1667184a7e7b622a5bef87db84e2d9
BLAKE2b-256 checksum
How to use checksums
7e3abcfdb33ec11dc1859c16dd65ffd6e76fcfdc9c2bf6181862522dc40e19eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

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

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 1.4 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
248d90940fbea949cc5a1e0198c4002c243048aa6027bb64dc0c19acb6149c46
BLAKE2b-256 checksum
How to use checksums
40a7691b9be3f58713b4463b381a9df9d13fdd17865ab3c334ab0f2d84d1a725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.0-cp310-abi3-manylinux_2_28_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
24037a160a155ebbb2da21186d8636ed54b0c8f43b33ad7c230c045b5601b671
BLAKE2b-256 checksum
How to use checksums
c74c4bac4677b972eab8b35a41af73c7750fdb4aa8a62f3b158638a1a15b56e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.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
e9a153dacc303a29fd60820f4e7e405b5437c40623926c079a4b42f5f8785d35
BLAKE2b-256 checksum
How to use checksums
aa80f69b3f56d4db90c11290c257d34891187e25fd69b402c0550c0ed1cb643d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.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
90186bcf5904b1d4a5872a5d81170781eafc2b44be3de69e3032103679e88349
BLAKE2b-256 checksum
How to use checksums
3db0044697c5f7d6e577f94ec7275bfc88c30827550685c10b458456036397f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL jlens-0.19.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
59d74b9b98b0e67d81015c6bbf13960c2e7726ac99963290be9b2c01a7e6db96
BLAKE2b-256 checksum
How to use checksums
b77f8f1b9ad739167da17a3da3933a130d12fc1541a4569e93bfdeb9dca1492c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.19.0 This release

15 release files

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