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.20.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.20.0
File Size Uploaded Provenance
jlens-0.20.0.tar.gz 442.2 kB With provenance Details

Built distributions (wheels)

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

Total release size: 18.7 MB

Release files / jlens-0.20.0.tar.gz

Download URL jlens-0.20.0.tar.gz
Size 442.2 kB
Tags Source
SHA-256 checksum
How to use checksums
257ce648e2017baf78fb115e32a09503018da36298ddec187ffb75deaa0c42c3
BLAKE2b-256 checksum
How to use checksums
ef1f1e01e30a915fa5eecab91a128a7e9019fc5bffe8c8368512cd3fac3a4c37
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.0-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
7e56a0884259e77c2b43afef27b981c6fd5211951f451ea3467e310ba2539c84
BLAKE2b-256 checksum
How to use checksums
0e8ac017a3d738ed2431b56384d42ad1588f8146ae8784f58e703a947eac4465
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.0-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
c161bd54b2bb452d3f51b6f2bbb6da731217ec5f238552e67bab0ddf3de6e843
BLAKE2b-256 checksum
How to use checksums
a1ab8ff8b4fd30038a0cb2a1c54034b1e94b73a2005c9d77ec570bb6355a1d08
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.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
97d56c31ba8bfb29568f9b1ed653b36e6210eb2ee2c9ac7496a4ed70a447dcfc
BLAKE2b-256 checksum
How to use checksums
9b74d6cf30fb39c15ebb5853bcef69b1bd0dd1c30897b37df4112bfa8d5296df
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.0-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
d88d75a597859b2910d7e8035079378ded9fe51bd6a59d4de4f82968c7975908
BLAKE2b-256 checksum
How to use checksums
4d43948281922d0796beece00b77f079520561c26529ac1820de7c0ca7b44f66
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.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
87f2eaa1b0d477031f17a16574e7c0340da0f738dd647fe3832a75c62815393f
BLAKE2b-256 checksum
How to use checksums
176fad414778451d5e2b830a59a65c1e5d516e4784c46637140179bac7afee14
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.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
dd8d449e01211f28edb99d4f063025dc5f08da3bc89131e99c88c1abc3891279
BLAKE2b-256 checksum
How to use checksums
aa86842b6202ce1fe41263af51bfc8567a080748c4ed7f2b1247550cdb64f958
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.0-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
1802facdcda360473b90d534433bf9b1e3fa6cf4386d40ff1ccdbb9fae280d7f
BLAKE2b-256 checksum
How to use checksums
b360159c888c71997edb22718474d1a7006cfedd7bcef4894cced07d86b70df8
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.0-cp310-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
78f3edbd997b8fd8527bbbc02161ac71b59bb25cfc2abf90bab8377a8346f100
BLAKE2b-256 checksum
How to use checksums
80b82a734093df9314cec119ec4c42c2a9bd37703decda777c6bbdf3e3ce38d2
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.0-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
8af27e284242688174e90773790a81a3850ed3fc8061e9e8204be6fa74069b06
BLAKE2b-256 checksum
How to use checksums
8074bd2cb67a54eb5821bc50cdc3f23d0a90691b1ee91e8777cf0a09b38f5d3e
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.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
bb11deeb72f05719c3522d01a9307f87ecc96a5e17d2fb3712884f13b78e1cd0
BLAKE2b-256 checksum
How to use checksums
5bde2a8fd5c3792c27ef58aeb23443aa6628ea2aaa55e6f72193d0e5ee064858
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.0-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
3bbe6abed8e563b086492e159444a69ef03d82bb905a56dc2ca2b0ed0c7ab59f
BLAKE2b-256 checksum
How to use checksums
ff1cff3bc32ee34b5c9bf3dae923f4502db790f857a61c608304de852398cedf
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.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
94eb0a7dc047dac6a2604e63962d0fd24706736ab3d9345ef84577d64067d4e0
BLAKE2b-256 checksum
How to use checksums
9744b0f9ab3413c8a8de7979bbc375569176dbfd49051073581450a6d817f1ed
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.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
55fd875259416a416dee9245b8092a33666ea5cadb3613d1c9c7701d921289e7
BLAKE2b-256 checksum
How to use checksums
c45bd86dab8f405607f279c07f55609c19384fd61cee07143392a61b14278a31
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 18, 2026.

Transparency log

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

Download URL jlens-0.20.0-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
34aaca9577c755a284fcd46dd939787a99d8cb1ece742c2a8a0aeb1043eb7287
BLAKE2b-256 checksum
How to use checksums
7b7c419eaa34b13b8df022d9c766e05c37995a72a39223c50a240de6312d1c55
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 18, 2026.

Transparency log

Security for jlens 0.20.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.20.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 Oct 18, 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