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.34.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.34.0
File Size Uploaded Provenance Actions
jlens-0.34.0.tar.gz 511.9 kB With provenance Details for jlens-0.34.0.tar.gz

Built distributions (wheels)

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

Total release size: 20.0 MB

Release files / jlens-0.34.0.tar.gz

Download URL jlens-0.34.0.tar.gz
Size 511.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7e9bc2a3dcf5450454d3f299c4175cd24498a61a530dc4f9d6f5fdb4ca4cfba5
BLAKE2b-256 checksum
How to use checksums
9de51e781064e4e0811685be179e96ba0b36250a4d57349ea44bb0753372993f
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
a547482103b20652d3d87e397713ecc429d9fc5a1e28248d960c664d4ffe3e21
BLAKE2b-256 checksum
How to use checksums
a568898e14506ad4403441c73abd1dc46432afe405b39122db784169a7d9a569
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
817c18883876c127fe2916a5878a7001a88917f749352fa31196e3feffdb1cf1
BLAKE2b-256 checksum
How to use checksums
00e8d688165701ff6c71833052f97956d39b329fb730bab84efd9648db452c0e
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
e2da60a7dbaeecc23f45c83ed07eaecf87fed7449be2b6a46532d6d48ed5f212
BLAKE2b-256 checksum
How to use checksums
6c7b6f4a4fd75833d320917072c71d4fc7c8691238e0d1e475ef9dde7d107ecb
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
e8ea84998de3e241510eba61407a964113fb092fc2d577d176dec7ef2ea899dc
BLAKE2b-256 checksum
How to use checksums
7d7e1a91bbda81688aa3a0663b86369a1ef3d41b59245883f54a449bf06bd330
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.15 Linux glibc 2.28+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
b1d11985b5811aa2583bbb5c8f0bb9f8b4e30972abdbe3533020388950d0b1da
BLAKE2b-256 checksum
How to use checksums
914417b4fc7c572f8d1a513dbb77b31039c2232f972858b6ecef5e7211cbd4e0
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
b6cc9e612140af7ae4dd6f69bc5c10294953c8b972f637451ada444c2ae24bd4
BLAKE2b-256 checksum
How to use checksums
fd6dcb4b5ef733cbf009c323b7744b07a4ccb64868c8303823e48ebf7b982d82
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
8cea1fa0adc58e476071999697f7c38d7986b271abba7e8fb80de622ddb94eb5
BLAKE2b-256 checksum
How to use checksums
5dedc34efdb1cb10465573e94ef4e6b8bcbc57ea93da1f410afd36d2a29ec585
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
78c5251d7ba469625ca86b37cd1d6881be338d9b5498e0051752f29bc671e003
BLAKE2b-256 checksum
How to use checksums
c7fb26f45c350849094f2c94cbad127274e110cd4ee50ad5a5a0fce4b1db601d
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
e4cac75ea848512ba99a90a68aa33119348a05a65456fb131f0c58884b5f064d
BLAKE2b-256 checksum
How to use checksums
fe3d464897a7be591ed922748e6d089b3ace99e561d48f8c15f5ec75d73eb000
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
365e58c0e9f88dc625b32fe5b9c2a85be88943733218bfa03a4041387e1bf25b
BLAKE2b-256 checksum
How to use checksums
10f79097082d885fd63085d2700506233436a3529aedd6be44c777ec4dce20ba
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
3bfacb36fbaabdd63cff1ceec0372b5eb5f59f2ed65782eeb8c54e805edbb7b3
BLAKE2b-256 checksum
How to use checksums
0023ba9514f5b3ecc32645a796a99fd5423fee732535cfdcea4e2d8f9138017f
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
cea6533b368041af8f65b08d6666acc9d5424c835efb2ce44caf8ada65945a83
BLAKE2b-256 checksum
How to use checksums
6cd63e9041103dca0112ceb1bd7ddaaf3f70e4e704a6b54287d49db416337b98
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
23c9cdb44f24092a9c0ab226dd2133e7e4a988358b0d19c28390d53a5d0b75f8
BLAKE2b-256 checksum
How to use checksums
33e34ad13bf5f97729dc4ba91eba03a95d8abd2ba225a262c3654ec224f02fef
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 14, 2026.

Transparency log

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

Download URL jlens-0.34.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
41ba2926853001b3416f0497d6ec544e584ab3c8eab723b169a7eda16c04bfe8
BLAKE2b-256 checksum
How to use checksums
049807692b38b2a44eb88394535f7f447d21dba1b1bbd2f816031b6719ddb801
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 14, 2026.

Transparency log

Security for jlens 0.34.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.34.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 14, 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