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.31.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.31.0
File Size Uploaded Provenance Actions
jlens-0.31.0.tar.gz 501.5 kB With provenance Details for jlens-0.31.0.tar.gz

Built distributions (wheels)

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

Total release size: 19.9 MB

Release files / jlens-0.31.0.tar.gz

Download URL jlens-0.31.0.tar.gz
Size 501.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1307c0f165e3dfeda8d2b84e9e66585ba554d4d5c2a7fb9a4a243c8188c5ca07
BLAKE2b-256 checksum
How to use checksums
d95c2be2b4d3df855ee5fce72e54ae5e3b975a50ef72340125264a420a030ea1
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
e0c8a46cf5a606b57e43e20ee4c92a5df2135230106e53a56a2ba2a597fe438d
BLAKE2b-256 checksum
How to use checksums
0bbe2ce16041d772123d08ee8d33abc3d2b1fbfde0b29f76d2cf59fb0c854ca4
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
3e6b3d12cf8e7b92aa4df25d567aac69dc6e2eca3564f3a33d87d7823f01cd12
BLAKE2b-256 checksum
How to use checksums
05d844ef556356103fe59b26db3a3928129ead212eeca021d9d2b61806f4ad88
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
c3b5cb6ecac0054186ef1d0bea29d942e7086c054853962e5281a1eff5aa1a0e
BLAKE2b-256 checksum
How to use checksums
a75a2d21d5a00adf7a9675167cce5a5051e79522c3fffb31141f8a13d89fb47e
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
2a6462c7792a6e1ddba9d2a1294f4fbfc62732c0a640af1cbcccc1cc818c8353
BLAKE2b-256 checksum
How to use checksums
7d6204b84539046a3c92ef24abba613679f1aefe49feaaf1ae2724d1244c0475
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
1dabf9e59e014c1316cb20c582df470914d67377446064c69d1b09bf85d48cf9
BLAKE2b-256 checksum
How to use checksums
0f41eed55ea77424e0465f51eb69352f9c2edef35c9507d2672dcc1b3f099a02
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
3575adf4e53e26069446326ef1f539466c476b84dd4284418d8a4345aacf2297
BLAKE2b-256 checksum
How to use checksums
5e161c3712bf4981fcdc98a2dff1055837828fff7f7e773e9041a7539ede58f7
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
44a02b42f173551e0c89ee0cf5b92eacca63a1dcde41c39ffd210d326c1fa699
BLAKE2b-256 checksum
How to use checksums
26cf12dea4be2414cfb27c94cdf873f98a3f2438f15cb4231a23684923f9e1a3
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
e72a35f120a4a0bc9af71fcf9fa7c075c0856525601af51de7435bbafcc3bd62
BLAKE2b-256 checksum
How to use checksums
567d04a8ac548651f0e40b4cd863674d9720ead0cebb41dac9a6ddbecc894c8d
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
1ad4e667b7a3ba0aa30b67e6ef786dc8bfb5a3ba4c0cd128ef7d8c36de9849ec
BLAKE2b-256 checksum
How to use checksums
9fc9edd04062be2c95e0d696afc1e49fafad73a6d50132dc16486bc1b6d96480
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
ae0aa53f16721c018156831b70dbbe387bb5308bcb914d499c6d8eeec45eed68
BLAKE2b-256 checksum
How to use checksums
a5bee39842e52518eeb2e5561362aceafff0a128f80d208ecb90d64dc927cf39
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
38851125427a617fe2b1dc129d39bb8b9e4c67089d8eef8adf83c7184fb93c13
BLAKE2b-256 checksum
How to use checksums
ae94891cac9a6428be06c9f948071c2a042ce79e32bc0d7e5a8a6464b9324b0d
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
c5a9c067e324e7f5ae9d031b6c8d5fccd86a7e179c10a4e3ece330234e36a6e2
BLAKE2b-256 checksum
How to use checksums
0d7cdda380c896d6f3dc32a001c1071ad529d189b388a52818a579ae27fcbd03
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.0-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
7f7ffa64b9db63e8f5a750ab5f2437e93454acfb7bb8c48e4a5a1e28e0bdd81f
BLAKE2b-256 checksum
How to use checksums
afc9c20a3b65b94cc7325af7f38c60a294040faa76187e9c9a9f98d7ea4ece12
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 8, 2026.

Transparency log

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

Download URL jlens-0.31.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
f275a6409070e1aaf9c6945d957cb7b6b216780fcb03587fb0ca16cad5071e0f
BLAKE2b-256 checksum
How to use checksums
2aaafdcac8cf9cefffb8c08c225ea66d45c839318c16c688768190b77e4dc645
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 8, 2026.

Transparency log

Security for jlens 0.31.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.31.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 8, 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