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.24.1

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.24.1
File Size Uploaded Provenance Actions
jlens-0.24.1.tar.gz 457.7 kB With provenance Details for jlens-0.24.1.tar.gz

Built distributions (wheels)

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

Total release size: 18.8 MB

Release files / jlens-0.24.1.tar.gz

Download URL jlens-0.24.1.tar.gz
Size 457.7 kB
Tags Source
SHA-256 checksum
How to use checksums
efc8efa54e7e127abed625605fa3e6bc21787dbe794d266dcca9805402093c77
BLAKE2b-256 checksum
How to use checksums
99a4e61bdc1986fcc970406de54086298b1c571446d12c76af5cae993aaca483
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
7041fd94654b8639508c25c33d48cd7cc62111a8f0a1d6f128604d099286f13f
BLAKE2b-256 checksum
How to use checksums
86975041f015dd52f30d719aa75c02eb035b5828531627adff16bbb7dea95593
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
bea0d366b09a02fba9c08c7cbfc38815a9f02438655c5c8090710c33b1d6d9b5
BLAKE2b-256 checksum
How to use checksums
560fe8c8d3773f00fa0b81e568fb7e3648f5f4184f58bc95d8e698d1bbd0ea59
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
b7760371355d843a572c1f75bf10e4656f8bf9f508e67921021da8e22d3e5a7b
BLAKE2b-256 checksum
How to use checksums
2cd19e89326d523a66ffe9ed6a94f64af4d8f446f22286d66afce59b6181324b
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
3ad929a0f64662f9c3ea393f4280bff457c05f941b4f46b0bbe61cb7a5ed1f25
BLAKE2b-256 checksum
How to use checksums
a5da5928c6a2afc61b638e718a25566f3516f68fcb5ded63b36f862470bb8ac0
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
24c0cd4db209eeb6ffbc44909c9c239423d33d34fad93f59fb967a6fd74d82da
BLAKE2b-256 checksum
How to use checksums
7f6a95c9a24c83fccecf272b2dba39cdca44e9bee43e5249d470e3e928c8814c
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
1f63a57fb00823c902e3928763a9e43494c398f398d92bb7bb9c134b08bcdac9
BLAKE2b-256 checksum
How to use checksums
84b78896c683b1dd46fdd8ef58ebe53c141f2e38bdee9958565a2f89d17c8909
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
b6fe86ee3e7451a8144a651beb7b797eb2bd56e1602d47138175941f4f5f894a
BLAKE2b-256 checksum
How to use checksums
33ceb4d9e892665505063040c597f573c2dd1b75da21bfec4430803101714d31
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-cp310-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
58cc8f64872dd328f82b6289391eecf2f53b1f6ec89a79098dc2e5a4888b1a99
BLAKE2b-256 checksum
How to use checksums
0ca4cb0eddbd5b6b8d336acdd96cc35cb0a28d65bfcc171ccfe806212bb03073
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
c255d50b240e08cce9fd851e150285840f31fc17a6d28099308aaa3d9c39ff63
BLAKE2b-256 checksum
How to use checksums
078aafa305c436fc3850ec1ca418b0ddde21a839883a4e395d71dc5b44324a0c
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
b85de2b9e34ac62f68cc91739602e1b6399f4a9fa1ec8ba5e1487842ccb7e1b3
BLAKE2b-256 checksum
How to use checksums
40ab71736d8bca43cce1b4c0bdbdfd03dff77ad2572276b4737b64c776482de8
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
385ffbeaa9363769d9ed292d7d4f6d7fc676c63ffebafe73c542e914096f5d11
BLAKE2b-256 checksum
How to use checksums
fb660322b690b4afad193686c769aa26e779eb9d03bd1914d7b256f2254ac6a0
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
471415f68df88e386bd2abc12744e5fa588640e3421907c6b6d9cc1f99f571d2
BLAKE2b-256 checksum
How to use checksums
a18257c656f6d7c6f001bbe7cd301010663e4139ce4b47cf42484d894157d435
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
178a98ae2c7c9ec554afe37bccf61b99fd3ee3fc6fc97b6c9a89091ec074fb2a
BLAKE2b-256 checksum
How to use checksums
e448c4d9bd2051e9b155b7752462bc2a05ed73e295ade83a84033e93a606b4e6
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.24.1-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
12c9f9909054bfb82853d680bb15fa83bd9992814757879b1fe4133be7e5743a
BLAKE2b-256 checksum
How to use checksums
d1c7705106ba04e2ca268f7524bc699a00d36050a93d0464d7afb1d973bab021
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 Oct 26, 2026.

Transparency log

Security for jlens 0.24.1

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.24.1.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 Oct 26, 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