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.26.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.26.0
File Size Uploaded Provenance Actions
jlens-0.26.0.tar.gz 464.6 kB With provenance Details for jlens-0.26.0.tar.gz

Built distributions (wheels)

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

Total release size: 19.0 MB

Release files / jlens-0.26.0.tar.gz

Download URL jlens-0.26.0.tar.gz
Size 464.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ff781a8f469ca04971cdb104f3d071becbcad70ee6f8a817f92cbb25c13d8b2d
BLAKE2b-256 checksum
How to use checksums
a3c873a668f6eb8095e6913ed36670f99da8ab6301474e1f32b026209108cf6a
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
4185becc479b90e002bf7dde8e3d90a4cc36304b6695e2c185aa0d0979435af5
BLAKE2b-256 checksum
How to use checksums
8b7b4013ce8679907fd48ef3718ed23287bcd2161da79b804bcb819e74e721d3
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
f39848b737636045f0fa4d6f7e1f2c1953551b220faec2644eac2fd84e63491c
BLAKE2b-256 checksum
How to use checksums
684130165bd507f0fb21a35d3940204360c72e755e8978fe02d9d85be53373bf
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
240fb013ad1673c7ded1b031f27a0d682e8b3ab5dd400e7181ecbc36fad88231
BLAKE2b-256 checksum
How to use checksums
b752feee54f829fa71ac59e30db3937614bcad09ff2eb6e9e7bead0843e2f27a
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
ab136c9b98ccbf5891086c088bba18ce66130c1a4290cff896f073cc71214aab
BLAKE2b-256 checksum
How to use checksums
6699b3869752c0bff28aecf4104584b4435a443f5bc6ced039cacc70d103585c
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
6680b74858b3636850a7b071d6f18162f8a1dd335b62d17a1c06d0ebdf748674
BLAKE2b-256 checksum
How to use checksums
3dbfacfc4ad42dc32d8fc6893b4bf63df573585a5a2b82e5e99549fcc20ebabe
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
af72ab725fe4367b1ac9df1bb4482ea45500d7bdee799c9536d5d159502fc952
BLAKE2b-256 checksum
How to use checksums
999ff5b66d73f570d25e76d28527ac4476571c84a96223af723ea01566f99007
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
0db1b5772aa6d804c02729053f3603bfa06e0eaba170ec9f70caec59e3cef1f7
BLAKE2b-256 checksum
How to use checksums
3f682a01cf0ebad47d89de2971f704da956cd3937571f6673b4a2b13feac9d15
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
94fbe2d6757bf18f20cbb65bea152e56562d3838177aaa47374a155a9c54da4a
BLAKE2b-256 checksum
How to use checksums
18da702fe3725031d0d948f208e5fa1207c1fd9830cf589a5fa14792d7d85432
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
64ef7a9c006df4767135165a048d46aa26c3ad44fa6e508d4e99bb814354a8b8
BLAKE2b-256 checksum
How to use checksums
94d68e140889c682674c4582980314304381d0d522d0e5df16a1a0e815e60025
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
d98812283104fb9b27a6e4663f35246f0e79e3589c28c17948103ccb337b8f85
BLAKE2b-256 checksum
How to use checksums
1449a848007b4291847e0bc48295e58f028c3a398ce5ae984c58445d2c5b837e
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
b8c2f913b418c5d6b4c589fe880626b20693fe44fdbc782a9112d6b23027b661
BLAKE2b-256 checksum
How to use checksums
fe0bb6f2bc49da14d904daf5366d416d740a5dba2899b7e2ae23461469e36dd4
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
36a39c293e98afdbe182af8f607ef7a575f40066164a6eca99e9caaf75319a98
BLAKE2b-256 checksum
How to use checksums
afccd09e1ad4d0a11ceecf478f891d58c09b0191ae49b452df766a61f708d632
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
81fc9eba19bd3fe8825919885b11814c02f1ca257bab0ede15d8f6ceedf099ee
BLAKE2b-256 checksum
How to use checksums
a20c9cbc593c474dbf706e6df072ad87c8606f36f97ce74b56d3b34c30009e2c
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 2, 2026.

Transparency log

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

Download URL jlens-0.26.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
4257088dc736c5f9cb03a751de8f452dbdcab99002e0feeaa2482726eaf7f512
BLAKE2b-256 checksum
How to use checksums
f8c2c5f8e517cfc95a7dfaae45ae4f19e1e6ad55cf5682a81e01283a571649e1
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 2, 2026.

Transparency log

Security for jlens 0.26.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.26.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 2, 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