Your package description here
Project description
jsonatago: JSONata for Python
jsonatago is a Python library that enables you to evaluate JSONata expressions. This project aims to bring the power and flexibility of JSONata to Python developers.
Credits
This project uses the Go implementation of JSONata from jsonata-go. All credit for the Go implementation goes to the authors and contributors of jsonata-go.
Installation
To install jsonatago, you can use pip:
pip install jsonatago
Usage
Here's a simple example that demonstrates how to evaluate a JSONata expression:
python
from jsonatago import Jsonata
JSONATA_TEST_DATA = {
"Account": {
"Order": [
{"Product": [{"Price": 10, "Quantity": 2}, {"Price": 5, "Quantity": 5}]},
{"Product": [{"Price": 20, "Quantity": 1}, {"Price": 15, "Quantity": 3}]}
]
}
}
expr = Jsonata("$sum(Account.Order.Product.(Price * Quantity))")
print(expr.evaluate(JSONATA_TEST_DATA))
This will output the sum of all Price * Quantity for each product in each order.
You can use as well direct method for compilation and evaluation in one step. python
from jsonatago import jeval
JSONATA_TEST_DATA = {
"Account": {
"Order": [
{"Product": [{"Price": 10, "Quantity": 2}, {"Price": 5, "Quantity": 5}]},
{"Product": [{"Price": 20, "Quantity": 1}, {"Price": 15, "Quantity": 3}]}
]
}
}
print(jeval(JSONATA_TEST_DATA,"$sum(Account.Order.Product.(Price * Quantity))"))
Contributing
If you'd like to contribute to this project, please feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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
Hashes for jsonatago-0.2.6-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 026708a0acd9dbd1bf420c5d6e744a752340275a7536b1fa667eae1122638ca3 |
|
MD5 | caee66c18b95bf03dc5ebe77bc2d3aa4 |
|
BLAKE2b-256 | 69a3cb2bb98e6a4559a105524454376e95d59745f44b2b04a69560c3cfcb1255 |
Hashes for jsonatago-0.2.6-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1374789a55be1535ff29fb254ba1f93ce9dc4dbec2201bad3cc40ea53a7861d3 |
|
MD5 | 045f5c4b9bac9970ded3f5481dc35059 |
|
BLAKE2b-256 | b97eb8a255c49d23010d44ad9b720832b22df995647ce06a7790e0517a43746e |
Hashes for jsonatago-0.2.6-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd9acaffd937b862e59b4baf946559ba363322c60b10ba68bb448ed391d17c71 |
|
MD5 | f8906d93441b81b1c6c8d2e3587c1f73 |
|
BLAKE2b-256 | 1dba45829fbca070da4d7194c077ede6f8a7ade239fa203b9a664e0eee1038cf |
Hashes for jsonatago-0.2.6-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 428cc0da36f3d8a14138e851ab7b9a15a28117fc38e0d7143971a7ea3e6a3868 |
|
MD5 | 308c4fe5bad0326faf9035d601d1ad44 |
|
BLAKE2b-256 | 9c527d60728546e9bafb995093a2d518ccec4e74c9fb8b78e505278ed4f6db13 |
Hashes for jsonatago-0.2.6-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9974504484b8426dba110d2d518b70122774c1132b60526b5d56c5f6609117d |
|
MD5 | a0690961893d2b9bc0c80d08a96da9cc |
|
BLAKE2b-256 | 3e7e3ece845bbb8f1892a0c627ca6fa2ff9d54a393829a54f4359367e514f163 |
Hashes for jsonatago-0.2.6-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b946175c641c420712054df5dedb04189528c3ecfcb5a79a4cd7d968087fe532 |
|
MD5 | 36781f0f7a1b8fef0d5fdee3d89d6726 |
|
BLAKE2b-256 | 9a2e5106ea83683b9f939255d659f54a21fb04a5d5436c52b16435a2b2c24aec |
Hashes for jsonatago-0.2.6-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24eb496c6694cd826a3cef18fd362f9b0cc55e399a0fefc47fccc3b8e58d1885 |
|
MD5 | 987a64d69913f4db83e8179f4c52b55b |
|
BLAKE2b-256 | b691005c9a0ee8b38c99fb5a686f67b232914a29bed3eaccf7a1a9effccaec13 |
Hashes for jsonatago-0.2.6-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f73f2397d07bc312c5ddb953b3ab60df81fa453b37dddf2d53c5ca49e130206 |
|
MD5 | 814d1bf1a535a538dba4133d76a72a78 |
|
BLAKE2b-256 | 07e4eb2f4b12fbab47b05006e265cab238a6fd2fb476977ba38ed80569985fea |
Hashes for jsonatago-0.2.6-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 363b5baa813529cabe2fe13a444155f924c5eb55e1067523b80b59700a0aeb2f |
|
MD5 | b2ebf4f556dcb7c3bbf640c48509f464 |
|
BLAKE2b-256 | aeca5048dae56b80dff6a6d30d93cd9a7aaf950c3ad7f1ed8748a2269fc698a1 |
Hashes for jsonatago-0.2.6-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37db1c99a167d358224a76fd6bceaa2c11af773ca4dfd03c70ee9aaecb0339ee |
|
MD5 | ce96939a823ce06e2e0829e06b79c3a9 |
|
BLAKE2b-256 | 42a138732a527e80b9f85a5dc88c767c001ab07f83ca5cb4d106355ca680ba2d |
Hashes for jsonatago-0.2.6-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93db75a4501e90ba5db02aae490ee61fefec4bf77db12ca734795f7b0f301938 |
|
MD5 | 955209f14006d7965acbb59cd629d013 |
|
BLAKE2b-256 | be755d36a80ec53fa6c72812a8584b5cf771fe9ed12b89952d64d3beaefdbdae |
Hashes for jsonatago-0.2.6-cp312-cp312-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d067f015534cc0f000515fb76f82fc066642cec4a58afe21d136d6656cf17f28 |
|
MD5 | ac1d9bbeaee15707f9cb39dc74aaea5a |
|
BLAKE2b-256 | f581e525628d0fcbfdb9afe743f27512671786efc5aa2251f17686ade260b4a3 |
Hashes for jsonatago-0.2.6-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf65f18454aa845d2ec18fee562816672a48358a01953a5186c9d7b259b92f69 |
|
MD5 | 2470fcf058de92c439b40a79918a74d9 |
|
BLAKE2b-256 | 9e66fbae9013c1f5a54c552de83b45b67c3331e9ae9e9c013033be2207bac830 |
Hashes for jsonatago-0.2.6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e89e93f8ef0d0de24edfe29aac88a79d43825c4f5b2402435444658c3d1b146 |
|
MD5 | 3603b75e6e38c09756f6934eb6a41cb3 |
|
BLAKE2b-256 | c81fc39cba89a382c0a532ac82aead9098f2528a7b52314bd53fb318ba067a9c |
Hashes for jsonatago-0.2.6-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7517275fb795f112101c9e106eb39878f3c5d798aaeb05ddf7c6091bb4e2ad24 |
|
MD5 | d66fb8f6137561fbdd623884f81c2a33 |
|
BLAKE2b-256 | 0ab999e5cb35c323a09b1f590788cff04fe7b43e8194aff13ec2502a315e2cae |
Hashes for jsonatago-0.2.6-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f04f61acf2010f9fc569950771a3d6908d811816b9e379fb86025cd800482d57 |
|
MD5 | 56659e3cf9c1a9f6934137626c7666ca |
|
BLAKE2b-256 | fbec2ae8e5ac3934510141042a961f6b237bd943203825a9c9e57c17af23bde0 |
Hashes for jsonatago-0.2.6-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e15d91611d1af120d59ae31ce4db02d13bf93c3dfccb85c2eb374a013eaeb39d |
|
MD5 | a849db90561e7de57ee99742f6b7265b |
|
BLAKE2b-256 | f1c165fa483391067be54ab72c8d86c573a21c4106feb2a04ecc2fa6ec0137f5 |
Hashes for jsonatago-0.2.6-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d1ce21860a22327171b6ec8523843ae23c9f3e33e7276632afd5ef5407f2731 |
|
MD5 | 67278a33d38c36fb259d762abf65a68e |
|
BLAKE2b-256 | 0b9fe16ce204eb2c5146aa784f1987f1eba8834fa5abdbbfb1a4a614ab58cd02 |
Hashes for jsonatago-0.2.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 614ccfb5a76e3f380628f4962ab09c91f266cfe5572befa5121addb2a798e4d8 |
|
MD5 | 85d1911ba06dafc084cc410ee76960be |
|
BLAKE2b-256 | d6c6889d334d7b35c3629d47fbbecd06f7ee0a46746c5f1cdcc65af9ed2cd129 |
Hashes for jsonatago-0.2.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 023d36b5cd669b85a893fbbb17e4fc03728ebec9aa19783ae2432f463d8eafd9 |
|
MD5 | 7655060ffc448c23a0a3a91b1fbe15ce |
|
BLAKE2b-256 | 3be5c18016a833196edd677c851a15f83ccfb60d3732c783d76ae691e24af1a9 |
Hashes for jsonatago-0.2.6-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 443609d3a7b6301f7a6b23e0d4a54c04a1f99f4a73daae3f9754902c17f0f0a6 |
|
MD5 | 4eedb543eb80865774fc2b6dd78bc851 |
|
BLAKE2b-256 | 2c9d5c794310e7a3ea475d811a6369ce2fa764a6c0c56842a2767a0d02fbcce7 |
Hashes for jsonatago-0.2.6-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ad56e6a5e4b7a22ea69f17270c490d089a65035ba975baf3fe6770a950252fb |
|
MD5 | 6cf0f55efb8aef9b5270e0c0d1c96584 |
|
BLAKE2b-256 | 584cb8bc7734b13ec25efb96175f133bd66f57455814b23e805b3cf16d6efd33 |
Hashes for jsonatago-0.2.6-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0329e43bd3111dc62cf797f48b98223a74dfa830a033732a965e540466c75ba1 |
|
MD5 | eea94a7674180d5ea85ac245dae5b2e7 |
|
BLAKE2b-256 | b76ca7a357c2659f43a90a7882959ac65d6e7031fe38759658bb6b2e8a4de1b0 |
Hashes for jsonatago-0.2.6-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3e1fae26a1ca2fb241663e8fa5fc7d47a8c985443651622fdaed38f3af2f652 |
|
MD5 | d2a82b62fbd4a4440f71b4d76d09ea87 |
|
BLAKE2b-256 | cf158b60587c42e60fa465ced3ca04efe58f1f0b8c407e60f04c1ff8ad5661fc |
Hashes for jsonatago-0.2.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 553cb247346254752b4a42e0696f643271309bd10269e3133776179f253db755 |
|
MD5 | 8152a42f38e743e509c830efd939fedb |
|
BLAKE2b-256 | b04f5f0b98061fd9460685cc7fd9db1776ad3fdf6ff556d93315fd0e8a3efc45 |
Hashes for jsonatago-0.2.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3f4d98cba691b699d8bdc2cf51d184295ea7b5da91c76cb45964aceedfe3879 |
|
MD5 | 053c9929a2d562726de3244e15dc961b |
|
BLAKE2b-256 | cfeecfccd04c0bebd306697c867620af4e18ef2c3b114ba9175aab9ffe4efd7e |
Hashes for jsonatago-0.2.6-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8c8a2740f3733bacb6363af9cda57984eb501c85b1c719f245b5bd0d11c600f |
|
MD5 | 66d67bf18c701b940387641b755299d1 |
|
BLAKE2b-256 | 2279d3af23609a3a8afd5dc906d395ed9e59166339482e462a5310d3aacf7a34 |
Hashes for jsonatago-0.2.6-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdb1c6213f6a4a6f3c0606bb77d75f79bb6c55bf5daa30558f7bb1b7177d270b |
|
MD5 | 91a9ca93b72049dc64a88c01ed5ac102 |
|
BLAKE2b-256 | d54bad57f794afcb2170ee23144554621dbaa2c2c6a49e96b5cdfbc50bb7b0fa |
Hashes for jsonatago-0.2.6-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dc855d632f2373facd1f027aad7bae57bc8b2511d40200d30ca748400c736e5 |
|
MD5 | 33887cfe81833b909ea4aab28bda4444 |
|
BLAKE2b-256 | 651261cf11452870cfff896d66de3ac057424d99c323e86d4d53850bac19652e |
Hashes for jsonatago-0.2.6-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bf388accbaada127b1c0f90fffba4fe95bf7787059e885149c088701cafd927 |
|
MD5 | e8ed3e255e22f90960ad3a1a2757074c |
|
BLAKE2b-256 | b71e29e3b23d29ea62cc895abef3b4314c573b0bc084f1e3c3b26f3e5bfe14d3 |
Hashes for jsonatago-0.2.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce0446861bb250a207ae69add7baf6514c559e16dbec3dc65f72de7c504b154c |
|
MD5 | 1f85fff5529941447d57e25afe69e172 |
|
BLAKE2b-256 | 551ba5d8d95b578549a9de6ec4fb2351199bee5a88ce8eba9e5c6600d8140924 |
Hashes for jsonatago-0.2.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40de584c0fd0b62690595946c3cf59dc4660a75928d0e5d2e2b78f39c676be38 |
|
MD5 | 7250276d0fd4508fbef85e46bde065bd |
|
BLAKE2b-256 | 823a890afe282fd1373dbde539d532c40ea47f8a151110b7eb8d4a6deb7470a0 |
Hashes for jsonatago-0.2.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0771c2a407cce48edb04c8b698812f04a81ee7fd6bcfec186547b74f8363ae48 |
|
MD5 | 9f533a1b227b85056f61bfe74531ccd4 |
|
BLAKE2b-256 | fbd32d798855a963a652676cefad3289634602b4eea23f7d1f6c6b8067adfc17 |
Hashes for jsonatago-0.2.6-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80f712064b0eb6976382d4627e993ad48468248c43db801ff801f8d52d1e79fa |
|
MD5 | 1bc6a913f93f7638528462a8c02cd22f |
|
BLAKE2b-256 | 3ef664b9a82d06794a814f47be60e3d361844a421dc126b8e9cde23cb5c5d162 |
Hashes for jsonatago-0.2.6-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24322c4a530b79223da5cf32f65bd7ca22604011123a8a901b8443291fae2971 |
|
MD5 | d7d09983b30a004194d7faf69bef1d94 |
|
BLAKE2b-256 | f70e8a1ca7a84347800106335456ddf2efc657f35bda7bbf54f27c7355e0beb2 |
Hashes for jsonatago-0.2.6-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 881e897ed060bb960145b73a5097d70e8779d9a770198268bb666f61ea6702b4 |
|
MD5 | 7820ba76770ce9cf292181505ddb87ec |
|
BLAKE2b-256 | 06fbe8e34905a3929ba1a45356dda2356e57901c9a87a39001831ecf9abc6ea4 |
Hashes for jsonatago-0.2.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72bfdac9add7a6e8ff04b7ff4964c665b5a56eb28ac7e4a5ec42f181dbddb162 |
|
MD5 | dcde660ee8c96eb4c914e101c1915e33 |
|
BLAKE2b-256 | 6ce69bf4bdebfcfaae0902783b0c1a906575793a98a11b7595cfcfe0f6491626 |
Hashes for jsonatago-0.2.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21b8a21ecc05a57626a71a4958ae47c196540149592c906ec484601930c1723d |
|
MD5 | 9ae35aad6028ccc2d60403c4c7d0f694 |
|
BLAKE2b-256 | d0f290a1930c631c9b7472e7aebbb575036469637476d8edf661c03ccec0a612 |
Hashes for jsonatago-0.2.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14305ae989c3234adaeb7e19a313a1184dd991035819a7e24b518ddb7e90fbed |
|
MD5 | 4c3ba0b4eedb82feafdc1dd0a7068c4f |
|
BLAKE2b-256 | cf22efb6cf07025871584145253a989829ebfc9a4f71c6c9dba374c11bf936b9 |