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.17.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.17.0
File Size Uploaded
jlens-0.17.0.tar.gz 411.6 kB Details

Built distributions (wheels)

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

Total release size: 16.7 MB

Release files / jlens-0.17.0.tar.gz

Download URL jlens-0.17.0.tar.gz
Size 411.6 kB
Tags Source
SHA-256 checksum
How to use checksums
308ef45a559feeb3f5b896d3c1f54b0b720bb1ce286d44994acba88ea5ae88d5
BLAKE2b-256 checksum
How to use checksums
dec910dbc1ddb717d2876563fefcc6dc141093829e3449ea2f6bf82c40e73845
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.17.0-cp315-abi3.abi3t-win_amd64.whl

Download URL jlens-0.17.0-cp315-abi3.abi3t-win_amd64.whl
Size 1.0 MB
Tags CPython 3.15 Windows x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
bda12ec1895389e1acbde8da9b6e428221ca523f624f38309facf3362717392b
BLAKE2b-256 checksum
How to use checksums
15a9086ebafa97dae837bf84e8bfa13ec6bd236596fb6e8097408876676b709b
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.17.0-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl

Download URL jlens-0.17.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
1abfb89d9ef826877842d97c0dadda6b303813b46063c72e0b621bbf09afb5c2
BLAKE2b-256 checksum
How to use checksums
bc3e36506e1ac552695dc8be0674207292614fa2e3d82293a0870162b2fe1975
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.17.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl

Download URL jlens-0.17.0-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl
Size 1.3 MB
Tags CPython 3.15 Linux musl 1.2+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
74474e9457b9f1c3d830772ca509723df8a6d9c608469e3205167e89bb04cdcc
BLAKE2b-256 checksum
How to use checksums
1f3fdb0ed62ff97562002578541d7baddbcda54c5b0fefde50874a61d26a5f10
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.17.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl

Download URL jlens-0.17.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
94d2b7125b000582c1908503b32ddfac8f379ddd18664164e29a3d611d85a0b4
BLAKE2b-256 checksum
How to use checksums
b635d5c962db945e7adc35234057002b419eff3de3acffafc778d74391183f5f
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.17.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl

Download URL jlens-0.17.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
Size 1.1 MB
Tags CPython 3.15 Linux glibc 2.28+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
6e2704bc53a6751c46b57fc419799773061d4da85777024f4f8b6328b54b1bd4
BLAKE2b-256 checksum
How to use checksums
851af63f7e2f2773469980ce18091b6a64554c95a0bc0a3d7ac5a9b570ef454b
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.17.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl

Download URL jlens-0.17.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl
Size 1.0 MB
Tags CPython 3.15 abi3 abi3t macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cd20727058c4816a167704a4c5248eb9f52a89bf633cc7b6afae932958da51bf
BLAKE2b-256 checksum
How to use checksums
ad8ddaaa968b4d2f172bcd61306e3c0aae09bc38e67c13b3db912bf03a7fbc9a
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.17.0-cp315-abi3.abi3t-macosx_10_12_x86_64.whl

Download URL jlens-0.17.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
82e830bb91e0e4b51f44f776c71dbf6b2a98f39924f7794caf3e774aca076959
BLAKE2b-256 checksum
How to use checksums
73ab356c54742f41468ab3ba146909a1a4c67b8c0edd8f6890280a6aac1164be
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.17.0-cp310-abi3-win_amd64.whl

Download URL jlens-0.17.0-cp310-abi3-win_amd64.whl
Size 1.0 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
45145f6e2f9add81e77cb23111654a8f43dc1ba62b35cad545a232c46b618cfd
BLAKE2b-256 checksum
How to use checksums
24343749adbe4739c0bec4239c73806b381aa16d31a435b02b7d12df4b7b1d6d
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.17.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL jlens-0.17.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
8ada0e2c1e6db04640fc1ed9dd4b4fa4a87cb33b2a1862537b832f7c7d3eeaaf
BLAKE2b-256 checksum
How to use checksums
43f59e6666072f119bf1d2c4f88860489fa5bfefbd9877e4edb4c6eb07ec2134
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.17.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL jlens-0.17.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 1.3 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
26647aba560f773a13dc21e2f395ad748ea46a89cf37daf6c49175073cae3e87
BLAKE2b-256 checksum
How to use checksums
3ed5c92b8ca6e8bebdd19e173eb319fc60c59aad9bc6656f058445bca11a46c8
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.17.0-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL jlens-0.17.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
2e37f97cd81beb2ca2cceda80fb959ece03b845d38c798ad68acf777d1d6a964
BLAKE2b-256 checksum
How to use checksums
f3f054e30128877ae4534250f246dc789d9a7c99f42acb1cf193e069c5169676
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.17.0-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL jlens-0.17.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
2a851d117963efd3e8e330c9cfbb36726e918152512486491f0c6e530250cd57
BLAKE2b-256 checksum
How to use checksums
e51768f8fb22b085fd124a753d8ddb3ef2627c8dbf695d72562e982a9c9a175f
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.17.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL jlens-0.17.0-cp310-abi3-macosx_11_0_arm64.whl
Size 1.0 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7409228d4a40cdec9fe15acc31b433071f003bdec8a55286bc5885e4b8ff087b
BLAKE2b-256 checksum
How to use checksums
1acfb730446e3c984b3e406c5b42846f87f92d471840221402d2415c257a886f
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.17.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL jlens-0.17.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
f38bce1eca6de4997c2dd386cc5eab18931f502573fb0759a0aa43fddf54cd13
BLAKE2b-256 checksum
How to use checksums
6a55304b1ed8260029f65952b96e515c11372d89fc0e3ed06bdb777a97ab2096
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.17.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