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.33.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.33.0
File Size Uploaded Provenance Actions
jlens-0.33.0.tar.gz 510.1 kB With provenance Details for jlens-0.33.0.tar.gz

Built distributions (wheels)

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

Total release size: 20.0 MB

Release files / jlens-0.33.0.tar.gz

Download URL jlens-0.33.0.tar.gz
Size 510.1 kB
Tags Source
SHA-256 checksum
How to use checksums
366e49289050ed8beea1bf6dbf24a053574d985ce2d4fc557dabf80a1333b510
BLAKE2b-256 checksum
How to use checksums
0ddf827656172b83c8a157a5f9d45d4bd06c6a4ca57a7e723846b10d05737403
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
4fc6a96d2f40fde3ec25e1d9bafcac3dad02d0557c5eda3eb25acd500bc42347
BLAKE2b-256 checksum
How to use checksums
5017d5d80ad3ac734137fec2adf19e152f4f89bc6a071ce50195f05b4a2a91ef
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
300ce72d6385e3e61b399bd715e86280a23dc5954b50ffefbef804d585d7173e
BLAKE2b-256 checksum
How to use checksums
c1543b1763bcaddc435832416f23c08e20fc1b1ea512c69c197042c1bc7b53f8
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
645f5a61e3410ff82c8abb012a775f61a4f495345294081e54849bd08ec6f321
BLAKE2b-256 checksum
How to use checksums
fbddc3802fd832b60ab9ab3bcb1c814927015df84d4cc8f21218184a5313b965
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
fb8f8bb84cbbe108dc0e7f86d227294a2cc02b6a87a4165e6539aa63ed278127
BLAKE2b-256 checksum
How to use checksums
d33d93a1a206a8ae1d0410bbe4be72f8a47581ba272b0b7a2d82213c66525c80
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
d27f6e6a665c08e6ef0feb9406254f8bde837830d9400fb5f1c749a9fcff4b30
BLAKE2b-256 checksum
How to use checksums
476b398aea1288a2ac6423ef49339c8e7eee017291c771071bfd8f611e0805f2
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
166558db34735a6a96572ed531c0eec20accdc20dc2602186438a31f9cf70328
BLAKE2b-256 checksum
How to use checksums
922b837bf1782bc438062f0402556b359e5dc3d5fceb09a3cb1c292926c28918
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
5d8b512ee514f2a0c74d478cd7fa35263624c94a0abb429e2525aff4fdeb0305
BLAKE2b-256 checksum
How to use checksums
f400fcb7e067eae43dc78ee981e77e4dfee1b3ef9c4ca4e9307b288fc03a39d8
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
7bace25014a9b05220d6046a0b82b5492cfbcf60ed9f52149a4ea47f450b21b9
BLAKE2b-256 checksum
How to use checksums
e440f1f16c61aa8cb950ef5352d303e3874830e65d7c2490527b42281258ee4d
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
8ea4f834718ee3f2b11c75b33e5a6db7fcef9d5d3c6432626cdd0866573042b7
BLAKE2b-256 checksum
How to use checksums
85b298f07af17bf96ab577bd70587c2e8d895eb61e9897cc4e98fa6f83d97b5c
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
7ba00f3640b951e8df1a52bfade555543ffa2df8ae121668a8dfc2e04bafec6e
BLAKE2b-256 checksum
How to use checksums
642f11fc349f727e5315371df41a050c91e27d8bbc7b69f18b41b8ea73e43897
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
e8ecc7c4b6082e61b51bfbbe9b2804ba5ec0b0133d46e36e3f8b07131c31e4ec
BLAKE2b-256 checksum
How to use checksums
28f501cf9b2eba12a49a8ddde6cb7e638ca49374b2ddec6c7b3b10ed65f2bc3b
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
1f2a1c27f04a0c7f5572a93c24489fe02d3b3d8c911d97ede48b5604796bdaad
BLAKE2b-256 checksum
How to use checksums
de0812e1f91feae8dcde7b9a8439634d71700d893936e03e3f5ef7e20fb9f5cf
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
c3d295824ec06c4362d1332635344bf0b1e19564eb3ef2dd2c9c2750338c3ff3
BLAKE2b-256 checksum
How to use checksums
89b0fff00055207b8093dae9ec9fc3f9377b0f7dad95b927a3d805271a0e0308
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 11, 2026.

Transparency log

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

Download URL jlens-0.33.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
34af741f4d5b117f47d5e6727edcf26d5df2e5b5c916491b20b39f47c3f4d9b3
BLAKE2b-256 checksum
How to use checksums
79ee92ecc1c91b047c8d88254d91db0d98deaae0721403ce887956101f93c461
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 11, 2026.

Transparency log

Security for jlens 0.33.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.33.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 11, 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