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 follows jsonata-js 2.3.0 and its official 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.37.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.37.0
File Size Uploaded Provenance Actions
jlens-0.37.0.tar.gz 549.1 kB With provenance Details for jlens-0.37.0.tar.gz

Built distributions (wheels)

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

Total release size: 20.8 MB

Release files / jlens-0.37.0.tar.gz

Download URL jlens-0.37.0.tar.gz
Size 549.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8fe50feefb72f8c4ca230822f4705b8a64ac59a8055bd8293d7fc6d0394445de
BLAKE2b-256 checksum
How to use checksums
bad6b48dc698ae2894bac51cccfcd6e0d2becef3b08193b98ff3a812c0621f16
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.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
653019eb1c981a20329baec98d4e198eb6299b271c4d1c192d11588e0b5d0090
BLAKE2b-256 checksum
How to use checksums
48623c99952dd874bcd10e8622e54d49dd6861b92441deea731b72d4813d49f7
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl
Size 1.7 MB
Tags CPython 3.15 Linux musl 1.2+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
188e5eba675681808eb0ad64254dbc255014298196bfd95d024dbe5aa38d62bd
BLAKE2b-256 checksum
How to use checksums
67babb779232f06aab34be5aabb060e7adcda773d701666205705db07512e37b
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl
Size 1.6 MB
Tags CPython 3.15 Linux musl 1.2+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
1ed548df4464f59264912c7481d46b25330d4f2c94a8f0a869c59f786eeda36c
BLAKE2b-256 checksum
How to use checksums
68c0cf911f8fe210dd5c6d44729cc3a633c0b7f2f074d646144e5ba305b57780
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.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
90e96760eb0c8b7e6bb3de883f26ac5edb4dc63f93c1eee67c777de26c8c6eae
BLAKE2b-256 checksum
How to use checksums
6ddbcefa4726e4885bde2664d5808338360250682d8b56cbf9ef839f7b72c6ed
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.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
2cabbaada6be432a96f04b46d825926de05d1be9d1d2eb237d5034dd4fb49e0f
BLAKE2b-256 checksum
How to use checksums
5594689ef7b987a0528cdc2f1b2aa8b6f5330a5af1a30c45fec902ef7afec606
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.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
016fb501dea81db654a4815134eaee399e3831c7bc5f44436a8a4ed4aa1d75dd
BLAKE2b-256 checksum
How to use checksums
21dc858381fda3525fb6d30789aa0f7ef016324fd6953e739b344ca277c4eb56
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl
Size 1.4 MB
Tags CPython 3.15 abi3 abi3t macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
28da44665e624c19c5ba96e49262eb91ee29c538ec27b0dca025d51ec4101d0f
BLAKE2b-256 checksum
How to use checksums
d1696df2e26fd30aa87d959af17cbe8a44db575b9b5cd5487f300f6d97b2c66f
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.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
95892e3e5798a13450a3c0683e86a58bd7e7f30978587a00682c3337fc16d0c9
BLAKE2b-256 checksum
How to use checksums
60a75a84e6bf77cda9f2a431cf4f59e0118df11b61506f4d7f89a2cfe44dd2ec
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 1.7 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
882c44c7ab80db97632c152c251cc27e9e601e64323a446c5fc4924cbb0b68f3
BLAKE2b-256 checksum
How to use checksums
f3cd77029e1ca0dd51074ce06db5f30ce69f185c9c8935371a3b1a4f1cefb495
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 1.6 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
648bf0b304408f694187858278ba2565e40a9c7113d522b75cd4a2d54b1677bd
BLAKE2b-256 checksum
How to use checksums
1dec6309d6c23b65d60e64ff2ca15676e3df6d4fa2c74d2b04018cd62b112622
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.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
606cba5fca06d6a597e7acf71fa511ecf98f610629028512f7133ec316bb2fc3
BLAKE2b-256 checksum
How to use checksums
df6da55c75ea73c31b910d8e89dfd50711f554725d8756a9e97e4e3e048add2e
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
ad7aceee43c55fbde4462dcb3900c17cf393312c3e80e2a5f4859cd191a3d391
BLAKE2b-256 checksum
How to use checksums
5e4d083d879c7e704e2ddcd63b27187ef99aeacbb05fe8d5d31154cead8b4753
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.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
80de1114de7ce725617aea979c1ecfc1799e69af252dc816e08aabf5797acdaa
BLAKE2b-256 checksum
How to use checksums
3c207c0743f52fda0257a98ea6cc286a9bf7e69a05f45b852093394897840256
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 28, 2026.

Transparency log

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

Download URL jlens-0.37.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d094598efa88966cdc35a8d61bc7b057876444306f18f9288ad0abef12969e53
BLAKE2b-256 checksum
How to use checksums
83f3f5ad85fb9f6378c12deaecd0539f6efbff605b9318c010aaa362bffe86a0
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 28, 2026.

Transparency log

Security for jlens 0.37.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.37.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 28, 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