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.18.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.18.0
File Size Uploaded
jlens-0.18.0.tar.gz 429.4 kB Details

Built distributions (wheels)

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

Total release size: 17.4 MB

Release files / jlens-0.18.0.tar.gz

Download URL jlens-0.18.0.tar.gz
Size 429.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ccacd4134e73923bdf3b57e64a975d8458aaea52070bccb691a515150ce8f972
BLAKE2b-256 checksum
How to use checksums
9b9609e2602c075cf5b2bbb7c3fa253b9362171b642c3424b53ecdca00f06a80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp315-abi3.abi3t-win_amd64.whl
Size 1.1 MB
Tags CPython 3.15 Windows x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
24a6efb598de9b8e4aaed0d48c79229c86f2893681b5d9fd668adf18f8298c27
BLAKE2b-256 checksum
How to use checksums
c1f77bfac6c061e19512ffc802792eb34593012e8b5b1b6e2b30148ee762e9b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl
Size 1.4 MB
Tags CPython 3.15 Linux musl 1.2+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
58fa22eafb6f243ad8e19ced45d1afd501f4c435f47aa91896602421950c180e
BLAKE2b-256 checksum
How to use checksums
6ec35f1e63874a415b8f36e0478f1fa6320497abc5038cff3e8f30d6a1f2f082
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-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
4ecd499b23fa54cad443151f4ae1ff6a2bac358c0ea35901429b474a1e726f94
BLAKE2b-256 checksum
How to use checksums
f64c5a3cd6260aae70475fca819db377afd683aabf8ff02b74fb95a07410d956
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
Size 1.2 MB
Tags CPython 3.15 Linux glibc 2.28+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
179fd3cb373b88dec219065dbd319fa2434b298cf63c60ebd2dcf5ecfb7653cd
BLAKE2b-256 checksum
How to use checksums
7e7de6d05be06332c37b245245c1dded50afaa0e2b991528da5a3b49c8963d92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
Size 1.2 MB
Tags CPython 3.15 Linux glibc 2.28+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
36c4a6d190bd9cb61d9779249dfce30ad4506ef3e5a8a3ee2e8301fad8e5c017
BLAKE2b-256 checksum
How to use checksums
3848dc06279b28fa43dc240f1c9dc7f7518d6802f17d27d7922db6011ecde03d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.15 abi3 abi3t macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a8c3bb0b8e55c5ab2f9dd0d72394070314c541af82f2117b61e0529c41ae95fb
BLAKE2b-256 checksum
How to use checksums
e824034e035134afd1d5749c25fb655fa4744f215363031a77730bbef203983e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl
Size 1.1 MB
Tags CPython 3.15 abi3 abi3t macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
1fc6799e6338a1c19a8268c99a169ea6917d0f11ca8050df2a8dad6ffdd1ce9e
BLAKE2b-256 checksum
How to use checksums
d787157ab50705cf1b0c4d705bbc3bb72108b06dfb3e2e73ee2f61804d66986e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp310-abi3-win_amd64.whl
Size 1.1 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8626c3d6a881a3bb9fa8cbb3e5cc429760c1f0dc221a1385c1dccfd036969ff0
BLAKE2b-256 checksum
How to use checksums
24b71c9154620c9c677a50551ed227053b10e693329eda2fb73f2431e25fb144
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
cd98a73ff3abaa354dccf507a6713e4dfde6420c944ff7d1cf242b4a634f160a
BLAKE2b-256 checksum
How to use checksums
f93681955b6fb40cdf69ad9140d9f47eb55fd0c0a9154774db8578b44139be64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-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
0e1b257a2ba764f0cce7ad2f24c2f4a54fc5766a3a5784ff26030f0878b57b66
BLAKE2b-256 checksum
How to use checksums
4c4cca78ca99f4b6a84a949b8721cc8aa8d12b9d0f0db2b932820f75312386b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp310-abi3-manylinux_2_28_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
78b61277400de8843a512af3797d6357c340e8fdc1abc9ffa4956d5ffbe54c76
BLAKE2b-256 checksum
How to use checksums
f6507592c9b6223eb77c777dc48ac1eaff20b1cdb0c3d116a2ab4d19e48e20a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 1.2 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
ffaa6983817edc2cbad42201f296ea99a1675d812d9ca3657ec501c66467ab13
BLAKE2b-256 checksum
How to use checksums
b92cd285d8544468555bcf56bad0f0fc571c13631088570f02af2d64760804f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp310-abi3-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
549d81a688e3ce174186c26162148c41b37b1f9a2688ae387fe9f0b8c2b7dc9d
BLAKE2b-256 checksum
How to use checksums
47281651e94bc7bc766f9b5c78a30ad4f341251f4143c8b1294e8e47c75d350a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

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

Download URL jlens-0.18.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
80b6354574e6c0021aacceaf1989cf895fdc30e55ca0f2097f55929e974059b5
BLAKE2b-256 checksum
How to use checksums
ae561748c4359042a99de501ae45eb430814af465b0a45d200c38c065a172e58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.18.0 This release

15 release files

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