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.32.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.32.0
File Size Uploaded Provenance Actions
jlens-0.32.0.tar.gz 510.1 kB With provenance Details for jlens-0.32.0.tar.gz

Built distributions (wheels)

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

Total release size: 20.0 MB

Release files / jlens-0.32.0.tar.gz

Download URL jlens-0.32.0.tar.gz
Size 510.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c46613fb2176f8f471bb508db4083f217b44ffa40c7b8a701ea4cbcde7b67846
BLAKE2b-256 checksum
How to use checksums
068c0ca04b2a56710eb3e80051559e718755bd4393b31ee1d943dd232d8e03a9
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
738bd8b28f6966762964aa0ccbe4bc052c73ffa4afa6d376f413ad598abb1ebf
BLAKE2b-256 checksum
How to use checksums
da8c30123f98b74324fb688ee4ce6ff4550320d8bf742a600196555c420bf1cd
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
7c1abeea7e65ca1b96dfd8e27ebb0934315d48db476b837d10fa321fa8c6b12a
BLAKE2b-256 checksum
How to use checksums
bc0035514481f1b49bd2eb5fbb8ef0c1beb0e2161bc0815a6134f15b783e2df6
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
25ed3eade3e4a34507e1b93f220a6e038396ccfa4f4f0af70bbdba2c19db764f
BLAKE2b-256 checksum
How to use checksums
823e4f260692ea398a391d3c132642bd753b3ab4b4e73646b0f7d70089ece3fb
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
7df99d25ef6cb5ff2fec95a09246ba26f8507515604c5c08bdcd71ae96684601
BLAKE2b-256 checksum
How to use checksums
83963285eb4c41989728a273dcc3be2fea07bae865dd86f7797156c8f404d1b8
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
76d82a0f526398cfe167b024ee636b51a208cb219717d8f30d5fde5e5898b675
BLAKE2b-256 checksum
How to use checksums
dc39569112ae1461c5ff46659b3fa58fd9e44b3965653576df8156c8df4d6120
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
96e1e67f2ee6aa6dc7b2f9b116df9ac59ec49d044a1103042376e0b59ccb755d
BLAKE2b-256 checksum
How to use checksums
7484041cf408d70f683adfbb276c322de8ef21182f7c1f55ad0fc0a35338f7ff
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
d52213263be04239a8678b9a735e9bf3348327d6632d52adb6e4abf8173c5e95
BLAKE2b-256 checksum
How to use checksums
184c4b3afabf2244ec39b8c95dbf851908c21a463aafa0c2bb9290b5cb616422
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
3bc7af4f11bc6013a5c7ee4efa9437d45285091c798516b411cc48506df14d31
BLAKE2b-256 checksum
How to use checksums
13e47ece92e839cb909e52a453ab2a757e483144dbea2823f93bcbb3cfd882ff
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
06a19c0ab5c88cb909ed1747a972d974b43734c6d4c4ccda097e8bceb6f0daf8
BLAKE2b-256 checksum
How to use checksums
fb6a0fb0741a826d6d8482200c2fa107524691bc01ed5d9fb3362185eec24604
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
c983047d0b81e30dfdd199ad69ebd24e714e473da5eafee4a8f1dae175d954fa
BLAKE2b-256 checksum
How to use checksums
3fb567ad735b497694123f205ce172b4ba98ce9e031cd3bff3bbf5a9b7696de6
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
4bb4d6546ee8f791aad4dc1fa8ea197ddfda29bf46569320291ba3f32a693204
BLAKE2b-256 checksum
How to use checksums
2b83180d58a60969149b031b58629e7983d39591695f09240af00be95233daec
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
a0d82d8f0f4d8e2efceb3a8ea8d1ef0f3d95dc7ebf357f950eebe1a9b5663b53
BLAKE2b-256 checksum
How to use checksums
5949325bd4b813e04ae30bfbb3c23e932cc87b2aad89c94b950e6fd8f0d0ea63
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
e498138c49d2694e2acdcea3150187a076191b266f50df9f8e7882e4df1c7fec
BLAKE2b-256 checksum
How to use checksums
e6fb66c2f2741adee7cc1961b84a2244a1844ea688fbe8c1476b57c9aeb1563e
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 10, 2026.

Transparency log

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

Download URL jlens-0.32.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
583daec72343eb8c547f2e3cde6193942f6adbda9c39144f8c85e6f4750a0b46
BLAKE2b-256 checksum
How to use checksums
186183327916004a089621d16e7b9513b796062cb064965ee1709c3f5e686372
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 10, 2026.

Transparency log

Security for jlens 0.32.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.32.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 10, 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