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.36.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.36.0
File Size Uploaded Provenance Actions
jlens-0.36.0.tar.gz 532.5 kB With provenance Details for jlens-0.36.0.tar.gz

Built distributions (wheels)

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

Total release size: 20.5 MB

Release files / jlens-0.36.0.tar.gz

Download URL jlens-0.36.0.tar.gz
Size 532.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e035ea97886e3eb90694f5df75ebdb846076d47f152e53330080c264ab940357
BLAKE2b-256 checksum
How to use checksums
6a528426c5dd3ca52339fb5d74f9c5c6b0f326f1d6144495ff323996a381e055
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
40385a8b8bda17807340c61e0241140cdc6b34e0dbed717d9a4b27f69f1ebabb
BLAKE2b-256 checksum
How to use checksums
6b26651ba277c7139a3fdd19705fe9887291a160a2f1c654dcd1f4fcfd70eb7c
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
7b2c8e2e82921a65ca419ff390ff55232ee0ab5f3347bfc7d65f1aa369a44edd
BLAKE2b-256 checksum
How to use checksums
77b8eeb02a1ead516def293458d837975b93b92ed7f0bdb914637dc45d16da3c
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
bd05cdee0ffa0795d8f45f1c6e2cd1e201b32e8e1d577f36315bc64064ba0033
BLAKE2b-256 checksum
How to use checksums
eb57abfa34d2e33676fe8e8391ee0a5acaee1c4a87fb25c93014cffd0e302b78
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
abd2e782dd320c337acfbf9d4557d1a7b743be7e8d89c41c3cc119ed0ed986cb
BLAKE2b-256 checksum
How to use checksums
4729293ffadc5a0ed486b72c49f923fbe4898000ca2e183667ede7a60c4daacc
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
896fad149971038a4dec25ab076e09eeff80e36a1b894ae94aa9b12eed4cad85
BLAKE2b-256 checksum
How to use checksums
0b5a3b2f4f3fcb822e1051808b386b4ce324e57608108906990f87a9824d99d7
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
b1cfc1f0d2a28ed5fb1cd5524827c7624942e68746492636cf151c74b9f506f9
BLAKE2b-256 checksum
How to use checksums
52df922803f103a050ffc1238035774d534b763d5163bb8797141a3c97ce7790
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
6bb6d3819e0cf246f03c60066d25fa9ad3e10bf96aa3afe115a39937f300eb26
BLAKE2b-256 checksum
How to use checksums
4be76c769cd124ef0f621a02521a82fde43de1d88c1f7b97bc535b5ca51bbeb0
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
0c55bc7f44ddd91570dc2877cb77aa0b9ad8e16df34eaf5e11a880fc03f67f1b
BLAKE2b-256 checksum
How to use checksums
db77c3c2605e17cc15cc1c8378bc695be9a7e3058118bc209fc104197f35078d
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
a64d1cbc0c5e2255db9741c0a0cbe7b70eb2333241554b24b0ee0dc3438ad067
BLAKE2b-256 checksum
How to use checksums
0d864d76c197fb64ce5669e8241bc094bbe44a35a9a7d3d2a8868facf2792ffc
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
6e1c58030f9d13cbcf865789903ad4e0c58d46bc35bae1cc13a7d81874d8621b
BLAKE2b-256 checksum
How to use checksums
e1a4cc2e4bee8b6b085648e9e05f6c45bf648f6a1d3b3054b3a31186fe960f25
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
475150698e2b0e4de690d02bc8e60fd7ece9ce7c6354da884d04181c2ad507a6
BLAKE2b-256 checksum
How to use checksums
c6a08e96a9038947469ce6616766ff4dbc8e2992995d22fb2176d199cc742b0b
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
a5e633b53a54804d360269d0def320cbe683fa893c1e8e6146c071822abb070e
BLAKE2b-256 checksum
How to use checksums
3c69342b6908cbeb6bcca3969dd4ce3353d5d42510acbb6e2f6b2514617f5ec3
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
cef2ea6092aec30debf074f6b4b7789853a115f70aa5cb9e294526624bd8775b
BLAKE2b-256 checksum
How to use checksums
0800012396fb285cbc215c21bffb80157d9b59430f5e0c044dec499fe1274a67
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 27, 2026.

Transparency log

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

Download URL jlens-0.36.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
c18d1ba0749f8199ab8336806a715d9856855fd18b2d9cf64cde8be03544e13f
BLAKE2b-256 checksum
How to use checksums
ecd0b164a3c819e7df6222b5c3344da339fdcd457f38100b30dd4dfdb46a7d68
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 27, 2026.

Transparency log

Security for jlens 0.36.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.36.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 27, 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