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.25.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.25.0
File Size Uploaded Provenance Actions
jlens-0.25.0.tar.gz 458.9 kB With provenance Details for jlens-0.25.0.tar.gz

Built distributions (wheels)

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

Total release size: 18.8 MB

Release files / jlens-0.25.0.tar.gz

Download URL jlens-0.25.0.tar.gz
Size 458.9 kB
Tags Source
SHA-256 checksum
How to use checksums
19736638ca4114847263c2f7bcbc996d105a14e358670e7cda0378450ef83249
BLAKE2b-256 checksum
How to use checksums
3d4617d3b2862ed25ce2b37b758224fd2ba3c6ec6b70b01b99ce61d8d68d9b79
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
0fb520ca45899be9481de255abf96b1649b417c2ed853dd038e0326ff606ef90
BLAKE2b-256 checksum
How to use checksums
2e2b9e7f19806fcaccc585387b31a9da51f9aac2630d9d919bee1ccc537b3b42
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
860723e72d61afef734c8adc26071bf409fcfcaefea2d71b17a7c66639274fe9
BLAKE2b-256 checksum
How to use checksums
4e3bcc91cf5263e23641d1e4fb277b61066c01351b04fb0dc48986e348f4fcc4
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
f9dd78d0904d57a04906a97090e1376e0d8c5c50ca711baa4782724d76a5be42
BLAKE2b-256 checksum
How to use checksums
a280a622dbe7a8ce1347a9a6900d249470281fdf7d6d9144eca0de0020890889
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
15f4542c7d2577cdfd5d97dd2e70f6b17fa1faa5d8d0d41fbbb9679a6746cf9f
BLAKE2b-256 checksum
How to use checksums
91e17d5bda3424e70260bfa604f558132ea7cf9a1a46f4045ff6bd8e429ca44d
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
8a8d3de49026ff40de6861e066da78783b742290461981c30cb7ed0aab46d1eb
BLAKE2b-256 checksum
How to use checksums
3bb796931d2eeff2b4fe3be051d9ffe1a841bbecbb73707372e1552235cd60ce
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
0bc97a322dfb02b29ea51f046109d38a669dc4daf5ef8a693d12ab18875a618f
BLAKE2b-256 checksum
How to use checksums
74ad2e8ad1085340a4e6e2b3a73342e1c8d8bd562a4ed2a73251a35ba034e960
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
31019519b40d5e560360b74a715db15c7f984c5307211b8051f0ca2a66d3c55e
BLAKE2b-256 checksum
How to use checksums
d166042ae190a21ee4e9a3196cacd5e499c21f738d553667d24729843ba77188
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
add8a7e494f341ddb5deff48b06c7697b944b275eb4885e645e64126046cb0ee
BLAKE2b-256 checksum
How to use checksums
11cec027eb8f34d6e5736634ec3e79e4f7c58f621c9b6dde5cad89a0f0f7ea77
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
fdc763ceb5a682b321709126aeda9603573165e2eef2c45822b8f38d9a95f2cb
BLAKE2b-256 checksum
How to use checksums
ea3db5c4907810bab43ad4523aa2d7825e41242dd394859c9abb0a7dde09dea2
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
f2673e7e4adf972997eeee8c56b249dabe290944f8f250268a95031e1ce6246c
BLAKE2b-256 checksum
How to use checksums
f424dfad6b1a7a52b654a9c50641af8121dba153da99d0db8cd5117950f46db9
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
7cde8eeb997f3604a5db3c7c2a29c73d2e3f861b9ea8c06055b3078c4c61c490
BLAKE2b-256 checksum
How to use checksums
6ec41ef966c3ed59963dbcc34dc59c13dcfaf6aab01034aa1f9dabd7ae9565aa
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
d27961e7477651a54b5130e3347e98b5bd436fcfb93c28e41768b69297399bc2
BLAKE2b-256 checksum
How to use checksums
b6cf4a58f5cb23c48019280dec72b45648237c57e81317a3e014272ca767cf58
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
3692a52487766c075df509cd19dc8698cdf13b9740923741fff70fa3a31e6eab
BLAKE2b-256 checksum
How to use checksums
ee86e23c81f15bf8c5859a0238496b033c6a0988d56dbc57cda4b5f2bd2e4f18
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 Oct 26, 2026.

Transparency log

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

Download URL jlens-0.25.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
5b2d5c2d0e75695dd1a30c28584dc4f727812ec6cb24aae769236c7fd5ac134e
BLAKE2b-256 checksum
How to use checksums
417601271cc676e4cc552383c41e5c98e9e9526b9d13bbd6f338cb7ece5979a2
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 Oct 26, 2026.

Transparency log

Security for jlens 0.25.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.25.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 26, 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