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.5-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ce1d7d1b578d06c3b78a2e2098f1f0f117f069a4bbcb0a8aa4284fe6df8d4bd |
|
MD5 | 851f5db6077afd360ab20438fbe06877 |
|
BLAKE2b-256 | 0b79a7a07189019df524f7c153892cefcf9e761408cc2cf22b03df7b67c0b6c1 |
Hashes for jsonatago-0.2.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ee82983fc0dbe6527b5f49c87f7ab4e4ce4574be57c17dedceeb10f0a9384fc |
|
MD5 | 4edba4616d21da8035a2e87bc2a712cb |
|
BLAKE2b-256 | f03f27ab0da5bee731a7602bbec4bee2a06bba93f256961b39f4019f137a1020 |
Hashes for jsonatago-0.2.5-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bfa927757bc038906ce1a64722c2c9dcf3b367703dfb738059d0dc5b7eba383 |
|
MD5 | 23d7d110f25546d597e19e1288b22fdb |
|
BLAKE2b-256 | 85495d2b0bb2ae8a3c130cdd06b080ddbd85639e70eb6e635c5cd9a07f9b9eee |
Hashes for jsonatago-0.2.5-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00c1df4363aa6ffc876a83a5bbfb1adca443f093bf5cfb91cf44fc4cbe5835b6 |
|
MD5 | 1926027da845adadc97560bddee796a3 |
|
BLAKE2b-256 | d078ea80caaf2690ef1c98664665756d56cbab8ae4a36965a621a35d96d8f5af |
Hashes for jsonatago-0.2.5-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d58cc03cc23fae22ede3acef907de9a1f9b9e59d615700af64745d7c84790561 |
|
MD5 | 1ec8062476d0e31c9b42381851bb6107 |
|
BLAKE2b-256 | 7c74ce822d1454a7dfd992bb24534b5814daae2914a259ac9c834bd36a49b519 |
Hashes for jsonatago-0.2.5-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03c0185fe99438a470d6d3fde5b0f7c774aaf91d309bba9164dda86b08d44371 |
|
MD5 | f313a7170c9120ff780aa16190bbeea9 |
|
BLAKE2b-256 | 6c91be6a5c61ee88981b9d94094d5242d1e3db9f43baa057a5cb8a088221954d |
Hashes for jsonatago-0.2.5-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3154fea06aad66d5b9801cab5037a1c497794834ac83275137cdfef7b79ac796 |
|
MD5 | eb6db508001d873dc3c67b71dc14fd61 |
|
BLAKE2b-256 | 787ddc6f5b5969569e1ca70053ea7ff6ca5c8358b9d85c895e6a6265b8206fb8 |
Hashes for jsonatago-0.2.5-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df87c621b6624b5e545e8aebbe34fcb19834d7aab8fad0898c6bb8f096b557c0 |
|
MD5 | c1d95da740d6819aaf31c3ec5cc08e49 |
|
BLAKE2b-256 | 1887814584799fcfc02ae68523cad496f7a0784b8f5b48e14d8ba0cf558a27f6 |
Hashes for jsonatago-0.2.5-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dad945d54434270b4259da373335e1f1c758ee0110f8692c31c88601978da171 |
|
MD5 | cc5b35839ca32d03df3001f8fc394652 |
|
BLAKE2b-256 | 10af9ab8163e47ae0676a01b1a6bf0fa95784a06366371ce23beae0c2557b862 |
Hashes for jsonatago-0.2.5-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5adec647d9daefd4338e0e7242bf3d1cbb6bf8ced4b99f321d4f013f349624b2 |
|
MD5 | a1652af5271212fca07d0e1d532a61be |
|
BLAKE2b-256 | efbc00c9c71d492378f44ba843205a4dba9a11eb9e7c4872d7dfc8353c6587b0 |
Hashes for jsonatago-0.2.5-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8027fae517680f7b341a7ece49689642d264c710541c28144fbd727107f51eb2 |
|
MD5 | 6f6d04e9e584f40aa939e93745d1d1cd |
|
BLAKE2b-256 | ec51b8e8868f07a521218f75f6faf88177bb8bfabd2a747424fa3574efa6d06d |
Hashes for jsonatago-0.2.5-cp312-cp312-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11c209cb1d8ce5fa7a654cd8b3f7b500128b51013c9b648babcad6dfc0e3e2a3 |
|
MD5 | 3d8d8c5f5f9820c69034b2f6696d7f51 |
|
BLAKE2b-256 | 9ea0a6cf4046f1566288ad57efc4d03b4ed5ec635eda25353b2dd50fdac0bbab |
Hashes for jsonatago-0.2.5-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d1349d6e9a906066602a41715d6d49f61fe2c4dd8826f7a3a89f1c1cc91b688 |
|
MD5 | f19cb26473e132c2212bf8e9797cb7be |
|
BLAKE2b-256 | a93f9adf44d07370c0b59843ab77a1921839f7d3be06a0e4e6f132b6da49aa65 |
Hashes for jsonatago-0.2.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 043dce794c6af37a3bf4c2056b4cbc92c557ea58a0a7af406f337d0bbc0d3200 |
|
MD5 | 5c41f7689a9060cc96400eab5380aa39 |
|
BLAKE2b-256 | 4d343b580a3290829deb2f86c6aebc89f5db4967370f6c2c1cfd7294b16bbeac |
Hashes for jsonatago-0.2.5-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e314866c7f7f73adae1a89187058d0c6751b67fe4eb0c8a661d5b39b68ba2774 |
|
MD5 | 9df9c71e3e5f6b8669c49b3a0d3e6022 |
|
BLAKE2b-256 | 1e2bfdb4f5f0cc71a8be4b3982b2ef2e51b9ca95e38d2c4bcd0fdfecad764e22 |
Hashes for jsonatago-0.2.5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29222d4d72c8e359be2d2e56c2d361eb63e105be095424bac292ef68729d1607 |
|
MD5 | 74b98e125e5cdf53f5e625010d55dedd |
|
BLAKE2b-256 | 7610a8dbac3fb2165c0d483803605b56fd8216e2e868addbc5fd89e838658fac |
Hashes for jsonatago-0.2.5-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fbc366eb8c148144a30165d504bb1f1195ca68a3c34f4ff593f6719381751a9 |
|
MD5 | b1bdc87cda3bed6a21d522f5c7beb6f7 |
|
BLAKE2b-256 | c06771910794459c3047747942cba79c1be07531a9fd46ab0d6e527bca1cdfb3 |
Hashes for jsonatago-0.2.5-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de39d2ff92d1db80c5939535b0d15935e68bf27e699da78cd0f34e0c7d3a1c56 |
|
MD5 | 57c4ea19855facff0acb4f169170c5c1 |
|
BLAKE2b-256 | bfda8b642dc1d148b9baf1a60f523cdf1955d3ae0aece51047b0e60d5c9beb3a |
Hashes for jsonatago-0.2.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 407a280cf9cf761b8d024b126535fd5c69d04f4e33a1bb6c8bffbbe4ac06533e |
|
MD5 | b3a7d95e6eaedef8d49b84d93f733cc1 |
|
BLAKE2b-256 | f17d87e7854e0f5d7032592e9b5dba7901ef8fbb72cab09f95743d42f5134556 |
Hashes for jsonatago-0.2.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c1e319a60c4f242e794ea8e4966a87bf7ff08ccef382ba77ec830e5fcde1e8d |
|
MD5 | a10cdb1092a29b8460bd768bcde04bc6 |
|
BLAKE2b-256 | 8b8910eb36ac960292e8bbcf0e12192f70e05e2d285a0a6e6cc164e9477a9636 |
Hashes for jsonatago-0.2.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 273ee298e99675df1fd0be0edc2660203b13ef8349e86d274637e6b3d8412384 |
|
MD5 | de69c7ef4970b245ffde854fa3095bb3 |
|
BLAKE2b-256 | 53d6fc913aadabb0d86dc19f37e46bb8ddfba455c0fdf00c96730cbcebba3400 |
Hashes for jsonatago-0.2.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2386e76f8f1c3036492786aa236040831b42a1116f0614fb851c46b5a6d74e08 |
|
MD5 | 02181d94bdab6d398ff921fb9d87dcf6 |
|
BLAKE2b-256 | 6807d0895fa870dfa0a6f105999c8ecba2b07bea6a145adf41431b65b2dcc0de |
Hashes for jsonatago-0.2.5-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b098a0fa1caec1277e4146f403737b9eb6e323e97304e1d8a7a1402c51f0b469 |
|
MD5 | 71352df6caf980b7e077959c9e4bcc4b |
|
BLAKE2b-256 | 5d94c7d62bf8b8f66c6989a397f88b8a00fbe88e9e65de78192f844d57978a9c |
Hashes for jsonatago-0.2.5-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f569938e0a4f5a17ece7d27847769f0c7cafe8e42db076f14ca0be11ff3b94c0 |
|
MD5 | 3027b527a2b029b94c8efa00daa04ed2 |
|
BLAKE2b-256 | f74782af21b5614675534cfc41c8d73a7422c06d150358685ced9a2416e6b7a8 |
Hashes for jsonatago-0.2.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72d06c0f5609b563c8f5b28d620f130c5984df4fd57269c2fcd8c1993ef047ac |
|
MD5 | f0a0859836754c663930e9b472a54910 |
|
BLAKE2b-256 | 026105cbb11190be95a68af6ee396ffa1dcab518b38017c08abe7f1fffc1bc7d |
Hashes for jsonatago-0.2.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d063e8e09c48a48a9fee6bc8413ee4b843167c817b2d262c2165e7341ff3c8f6 |
|
MD5 | 19a8535d9aa5c03184adf2cf5725bf41 |
|
BLAKE2b-256 | 0f47a3219309a21dbd23a7318c35d55277ba19fbd0e373544cf07e9465d9ce46 |
Hashes for jsonatago-0.2.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 982c3dce5ef1f7b20da44212bfd33cf968cec10bfd0cff8b8f1c696f0ca4286c |
|
MD5 | 3821d840a053ec26796a19ee5c9d51a1 |
|
BLAKE2b-256 | 8cb70da78b136741e73ac209e13e561b93ae4ee7e6f89bf66c71abea266761e6 |
Hashes for jsonatago-0.2.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b92ed63c53765942e2a055059578f6c673b561b3fa15baed7e9e3931b49c9d6a |
|
MD5 | ad2bc7681068c4da65557b870afa2880 |
|
BLAKE2b-256 | 21f7c6e13f3f39207fe12c6eeba0b3fff9184378d494c3751265372ba7e5b6ed |
Hashes for jsonatago-0.2.5-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f18caca1664f94b0c5bb1c71a0cd9aa27c98f8006f902d008f21bf18e334b18 |
|
MD5 | 109d1a1526a019eb73c840a667a8ac32 |
|
BLAKE2b-256 | b46d8b986fa2e65929fea51bd903eb42a87b01e5784085be4f89e07167f06bce |
Hashes for jsonatago-0.2.5-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03a3e5c8e82fbf4783f085bbb34fc6d0eac5b2fa142dacfd2112debc6f158686 |
|
MD5 | 74bab646466ac09ba9890ee665f32dea |
|
BLAKE2b-256 | d1cb633c31b7a9487932b281ab3932421ac93e9363b58ba3e310679083e92df3 |
Hashes for jsonatago-0.2.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca396fb948c2c8e381640d4d0c1281b46ea846c697358e4572b4aceeb181e76f |
|
MD5 | fc4ab47f10b4a4bb7c86d59a336e1492 |
|
BLAKE2b-256 | 5289637ad6babbd156e0db629fbab8779adb034eb7f8ac3ea9f20647bf8046f3 |
Hashes for jsonatago-0.2.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb6fbd35030efc8076776640281ab8a5f4ec7e94a5a8282aaaae6f2f54044050 |
|
MD5 | 74493278f197feeac9b97bf4ff54a4c2 |
|
BLAKE2b-256 | c2e710a7f770215cf9a84cd105904c7d7b68ecba7f1ecc28d40b6c237b00f0ef |
Hashes for jsonatago-0.2.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e1a425ddde61ceaf68707544cf482b7edc886e9f89a8490feaf12a50dcdfeb1 |
|
MD5 | e07b595c7c20aa845b84e2c7ffe579e2 |
|
BLAKE2b-256 | d71d8c514544f97e2bd03a3173e7dd299ecaaba87fe2b6c2afa5159cc1299863 |
Hashes for jsonatago-0.2.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fc7e68ca62fe3cb2b9572e20485abc9005e822641e747bc80bc724f2cd67c7c |
|
MD5 | dfbb9e7b1cd043a316acdae6713a10c5 |
|
BLAKE2b-256 | 8d9d98bb1cd59020c82178434e152c9b073149ab64ee9c3ad4ad6b4d2047856d |
Hashes for jsonatago-0.2.5-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8b5338b30a577ec5daf0813357038d5cca619d5b22d6fc492be3d5dc06da33f |
|
MD5 | 5b1bb2ad1e3766df8b839d7493cb5e88 |
|
BLAKE2b-256 | 6342ba326e886c4b534569002f611a65a6ca87d81c64cf75786bce559d9c3c77 |
Hashes for jsonatago-0.2.5-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea245dbb0ef99dcc02681e170b62013d77a6728fa899b683373a91009ccf13ed |
|
MD5 | 86bb7ead98445a7d8e6590abbf5b88d9 |
|
BLAKE2b-256 | 6977a19c669f971a4ccf79113c0527da8bcd84dc09d3cf19248ab97d218fb195 |
Hashes for jsonatago-0.2.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28e179e394f130bc76c1412abf4fcdb9c26eb4810c778abddf53a9934f2bc32e |
|
MD5 | 4ce130fd860081a242793584ad05c031 |
|
BLAKE2b-256 | 661d2778158d94b2038e18daae80b58ff412e0363b12e8fc353c5dc6ca60b729 |
Hashes for jsonatago-0.2.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d66c249433c9eacfac5988f6cebd24db3dc4416904abcc8ad835a851304c1421 |
|
MD5 | 0d92c528a6eb2bdfa3d78080940dc36d |
|
BLAKE2b-256 | d0a6fff415cfccfa4f1ba60d45bbdb1bc14b22fe409a24d09a614b4fe8d911b1 |
Hashes for jsonatago-0.2.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e0446e1fa342028f5cab5552d85a231b5772fc8c8405fba790df879e238775f |
|
MD5 | 3cde0ce76d887b06a1144efe58915509 |
|
BLAKE2b-256 | 9089eaea1cc3090cb0fde686030c1155acde8bacd0a199371431a78e5fac667a |