JSONata for Python — Rust port of the jsonata-java reference implementation
Project description
jsonata-rs
Python bindings for the Rust port of jsonata-java.
- PyPI distribution name:
jsonata-rs—pip install jsonata-rs - Import name:
jsonata—import jsonata - Requires Python ≥ 3.11; published as a single
abi3wheel per platform (Linux amd64 + arm64, macOS arm64).
import jsonata
expr = jsonata.Jsonata("Account.Order.Product.(Price * Quantity) ~> $sum()")
expr.evaluate(data) # evaluate against a dict / list / scalar
# variable bindings
jsonata.Jsonata("$x + 1").evaluate(None, {"x": 41}) # -> 42
# one-shot convenience
jsonata.evaluate("a + b", {"a": 2, "b": 3}) # -> 5
# custom functions written in Python
e = jsonata.Jsonata("$greet(name)")
e.register_function("greet", lambda n: f"Hello, {n}!")
e.evaluate({"name": "World"}) # -> "Hello, World!"
Errors raise jsonata.JsonataError with .code (e.g. "S0201") and .position.
Value mapping
| JSONata | Python |
|---|---|
| number | int (whole) / float |
| string | str |
| boolean | bool |
| null | None |
| undefined | None |
| array | list |
| object | dict |
Building
pip install maturin
maturin build --release -m crates/jsonata-py/Cargo.toml # wheel in target/wheels/
# or for local dev:
maturin develop --release -m crates/jsonata-py/Cargo.toml
CI (.github/workflows/CI.yml) cross-builds wheels for amd64 + arm64 across
Linux (manylinux + musllinux) and macOS with PyO3/maturin-action, and
publishes to PyPI with pypa/gh-action-pypi-publish (Trusted Publishing) on tag
pushes.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jsonata_rs-0.1.2.tar.gz.
File metadata
- Download URL: jsonata_rs-0.1.2.tar.gz
- Upload date:
- Size: 124.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f232870337944191614c9c68c0779dbd3de52a150acb23037c1a0df3739d6e3f
|
|
| MD5 |
c1147bf07752bd35dc70a058f3cfe5e8
|
|
| BLAKE2b-256 |
39dffb10d2a91ce4a0a2b86b66feb5c1585116e661b9856327d10a6573359701
|
Provenance
The following attestation bundles were made for jsonata_rs-0.1.2.tar.gz:
Publisher:
CI.yml on localstack/jsonata-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonata_rs-0.1.2.tar.gz -
Subject digest:
f232870337944191614c9c68c0779dbd3de52a150acb23037c1a0df3739d6e3f - Sigstore transparency entry: 2035304983
- Sigstore integration time:
-
Permalink:
localstack/jsonata-rs@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/localstack
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Trigger Event:
push
-
Statement type:
File details
Details for the file jsonata_rs-0.1.2-cp311-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: jsonata_rs-0.1.2-cp311-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.11+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd578adde193b112d00ef234fbbc63a8eed89381f6d797399cd98f0067098b9d
|
|
| MD5 |
3d477d10c62c1e6a1157ee97b92288ea
|
|
| BLAKE2b-256 |
5fdb8237b309e2a9e6a79cadff4762260bfe6f9acfd7e8d9d7afd18273287c6f
|
Provenance
The following attestation bundles were made for jsonata_rs-0.1.2-cp311-abi3-musllinux_1_2_x86_64.whl:
Publisher:
CI.yml on localstack/jsonata-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonata_rs-0.1.2-cp311-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
bd578adde193b112d00ef234fbbc63a8eed89381f6d797399cd98f0067098b9d - Sigstore transparency entry: 2035305100
- Sigstore integration time:
-
Permalink:
localstack/jsonata-rs@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/localstack
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Trigger Event:
push
-
Statement type:
File details
Details for the file jsonata_rs-0.1.2-cp311-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: jsonata_rs-0.1.2-cp311-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
528ca76af85ffcbb27300fefd736471e3b69e910063e5830fc16616987407ad0
|
|
| MD5 |
62ef527dc098f42e706390f1ce0fea7d
|
|
| BLAKE2b-256 |
815abbbac29a1699654778b4793660c5bf6f482b5ad0ab76e3307f47811d87c5
|
Provenance
The following attestation bundles were made for jsonata_rs-0.1.2-cp311-abi3-musllinux_1_2_aarch64.whl:
Publisher:
CI.yml on localstack/jsonata-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonata_rs-0.1.2-cp311-abi3-musllinux_1_2_aarch64.whl -
Subject digest:
528ca76af85ffcbb27300fefd736471e3b69e910063e5830fc16616987407ad0 - Sigstore transparency entry: 2035305395
- Sigstore integration time:
-
Permalink:
localstack/jsonata-rs@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/localstack
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Trigger Event:
push
-
Statement type:
File details
Details for the file jsonata_rs-0.1.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: jsonata_rs-0.1.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc1b5abf1610bc12b484cb5146057f21eb3bda1ab3a61a7a682c46142af1dcdd
|
|
| MD5 |
fba540fbd96d66f5cf7d0cbb885f83d6
|
|
| BLAKE2b-256 |
cdf89794c265bd6b1066e374d9f80f38e4c1cb01cf0e63e812669606abf2a702
|
Provenance
The following attestation bundles were made for jsonata_rs-0.1.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
CI.yml on localstack/jsonata-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonata_rs-0.1.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
dc1b5abf1610bc12b484cb5146057f21eb3bda1ab3a61a7a682c46142af1dcdd - Sigstore transparency entry: 2035305639
- Sigstore integration time:
-
Permalink:
localstack/jsonata-rs@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/localstack
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Trigger Event:
push
-
Statement type:
File details
Details for the file jsonata_rs-0.1.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: jsonata_rs-0.1.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdff7228f64ddc0be87e9bc2af9dba34683044a3ef62870fc745799da35d98a5
|
|
| MD5 |
c39b004b460bbacf807df627c9dae2ad
|
|
| BLAKE2b-256 |
bfe382b574178efc17b7987379dc7ae43e3847daca352d92d0bd27b09c76fac7
|
Provenance
The following attestation bundles were made for jsonata_rs-0.1.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
CI.yml on localstack/jsonata-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonata_rs-0.1.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
cdff7228f64ddc0be87e9bc2af9dba34683044a3ef62870fc745799da35d98a5 - Sigstore transparency entry: 2035305490
- Sigstore integration time:
-
Permalink:
localstack/jsonata-rs@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/localstack
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Trigger Event:
push
-
Statement type:
File details
Details for the file jsonata_rs-0.1.2-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: jsonata_rs-0.1.2-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a49a2744d5a94fa70443e5efe9daf909d450b069e93f446f9b0f295376441b4
|
|
| MD5 |
a5e1c337724a018bec8d9e8e65c54ec6
|
|
| BLAKE2b-256 |
bebb4ef8dc64d685297f431d97d1e406a1fe2724997ab3284fe6bafa79ddc151
|
Provenance
The following attestation bundles were made for jsonata_rs-0.1.2-cp311-abi3-macosx_11_0_arm64.whl:
Publisher:
CI.yml on localstack/jsonata-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonata_rs-0.1.2-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
2a49a2744d5a94fa70443e5efe9daf909d450b069e93f446f9b0f295376441b4 - Sigstore transparency entry: 2035305250
- Sigstore integration time:
-
Permalink:
localstack/jsonata-rs@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/localstack
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@2f15f26c0b0b0a82063e0c24048a76ddd0ac94de -
Trigger Event:
push
-
Statement type: