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.27.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.27.0
File Size Uploaded Provenance Actions
jlens-0.27.0.tar.gz 489.0 kB With provenance Details for jlens-0.27.0.tar.gz

Built distributions (wheels)

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

Total release size: 19.6 MB

Release files / jlens-0.27.0.tar.gz

Download URL jlens-0.27.0.tar.gz
Size 489.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7f81aa217acd3028e3d5c13cd5629cc5a7474a33e3cece04a472a218040d8163
BLAKE2b-256 checksum
How to use checksums
c7a88ce04e65dc92be5d4c0aaf2af4a589425608a2d2aaae410fe6d51fbeb3be
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
f50a373002912cfcdd70de0eed78d850b80ab59eef9a86ca526a9a9c5bb53006
BLAKE2b-256 checksum
How to use checksums
affff0c886f3eff6cd86000af71901930d3e88b167a9dd8b626858e72d6330a5
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
14e11a47e9fde7f78ffcb9e71081fbb3f4196604c98a666945055a458a49cbd9
BLAKE2b-256 checksum
How to use checksums
8a20be58bc8b86a99880c02d3494c74f3db993dabe2e0e8826258ccb1f013956
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
c65a2b1d5075de527bdfd360cff3b1338f0bea1e87eb34b3afb75d1f816194bd
BLAKE2b-256 checksum
How to use checksums
a13cbd5551989066874414476aec044d0558b51623bae1cd1f24c4744deb06f2
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
b0d3690b6ebcc9a435ea28c1109593b2670155d9506587998b40cf81f9615d7f
BLAKE2b-256 checksum
How to use checksums
adfa266827db1de337985005543a963c8a3201147e492bbccaec8b86fd156f18
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
3158207a751c85f18397f97a8fcde664cdfbdf83d6f25f60bb882d249f89bb96
BLAKE2b-256 checksum
How to use checksums
4c29d9e31ea42a6218d83aa2d1301ff583a5e6e2394f1e1ebb8009c2cc6c6bfe
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
234e8e9e24668b6f13eb33a1e83174f93f1c74b14bf1a076139d94403d5f6bcb
BLAKE2b-256 checksum
How to use checksums
d83aa6e2853c084db6b9ed07f628c212e1b0d918aa5ecd579a67ca178276fdcb
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
963df5318e1879f97675349da1ab1f7ae9c840a15b23e3c8d0cdc21194d495ee
BLAKE2b-256 checksum
How to use checksums
e57e8aa136af5410dc205c2e6548ecfdef515747419c5dbe5238b5d2f97b9314
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
86e3920cd5947562a4ea03759e9fceeb18d4c3b8ec1c510f4361fbc03901b998
BLAKE2b-256 checksum
How to use checksums
0bebbda2cfa974ca0a3df4e072fa720957f9820b3386a9bdde170c84db9c78b0
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
8f90bee9ce2039f57d0311fb68e9f4d091c6602220f645be8987a17d861a1db0
BLAKE2b-256 checksum
How to use checksums
728fd6c6ef96a1800bcb7ae478b4c4fa56cbf4d624090ff9ae2ebdfc27e2b7aa
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
e682082dc59c65533d6e1d9a2e313a1680cb76e4c38c9ac502f75066b757faf4
BLAKE2b-256 checksum
How to use checksums
5483d7d9c6f52deaa9a93c0a3d6a72a118edb60412ac45f989a512f1a6ed8bc1
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
51e730f2bf19850a8570a21e005a2419d7455db1a38ef28779910cc283aa3e5a
BLAKE2b-256 checksum
How to use checksums
f950174362580d626c4d3a0962bead7e17bb756633280d2c37a46c8565c396bc
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
c9509e0c9bc393a7c86eb37fa39b34b90e0044744f55c0c3b4200e94af8b3d41
BLAKE2b-256 checksum
How to use checksums
16fd4c9e9061a5cd4a1ed6b41605eaa1821256370f9910c96b3bfec5ac5c8043
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
b1ec8eb65282bfd0d7a224cd2eec9bdce00290f10b1858a9633faa74ab531957
BLAKE2b-256 checksum
How to use checksums
b840767ee49826319036bb2ce989c9b7c86928027636197d55f31997bd5cec92
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 5, 2026.

Transparency log

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

Download URL jlens-0.27.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
4e7b15a2ef9bc81a4d5c3f3a3bd67983ba604520051386beff5f2a7f8cb11559
BLAKE2b-256 checksum
How to use checksums
5b7bab165c2d5801f91b5d48f2f9c64e198f45a3c52b70355f7bc75889f08970
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 5, 2026.

Transparency log

Security for jlens 0.27.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.27.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 5, 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