No project description provided
Project description
Bindings for schema parsing
These bindings require maturin and Rust installed.
We've tested with Rust 1.74.
Project structure
The Rust bindings are in src/lib.rs
. They are simple exports of functionality
from concordium-contracts-common
.
The entrypoint for Python consumers is the ccdexplorer_schema_parser
package which has a
single class Schema
. The constructor will instantiate the schema from a
deployed Wasm module.
After that the constructed object can be used to parse events or return values using the schema in the module.
f = open('/path/to/module', 'rb').read()
schema = Schema(f)
# to convert the event which is serialized as [1,2,3] for the contract "test"
# to json
event_json = s.event_to_json("test", [1,2,2])
Alternatively to construct the schema from a Wasm module and explicit version,
e.g., such as the data received from GetModuleSource
grpc call
resp = stub.GetModuleSource(r)
schema = None
if resp.WhichOneof('module') == 'v0':
schema = Schema(resp.v0.value, 0)
elif resp.WhichOneof('module') == 'v1'::
schema = Schema(resp.v1.value, 1)
Building
Run maturin build
.
This will produce a python wheel in target/wheels
that will contain both the
compiled Rust binaries and python wrappers. The compiled package is platform
specific, so a package built on, e.g., Linux will not work on Windows.
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 ccdexplorer_schema_parser-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbe2f5d44063d0f67f531a86835233475a81ce62df00588b447977e128f454b5 |
|
MD5 | b08149ccdd9abf003cde0c91f3dc751b |
|
BLAKE2b-256 | 7bcab27247e3a52396436e1cb43737bd0990aa379d3733df6b91bfbc6b660b45 |
Hashes for ccdexplorer_schema_parser-0.1.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ca4cee5f6c4c81f55830c3524ca0b800a36d4cc42c67b7e1d4ae299638a2125 |
|
MD5 | da68ed34005992c01d81ec1ab46f2150 |
|
BLAKE2b-256 | 1df5035496ecaa0bf4b6345b70dbeaca05a7dc1884f85df9185e839a898821b0 |
Hashes for ccdexplorer_schema_parser-0.1.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd1d0f3e2144799db7ffcc2665ed0a3e5668bb10fa7b783915d6742e90ca84dc |
|
MD5 | ba6655962cf85f1b9bc38774370f11b6 |
|
BLAKE2b-256 | 77165fb86f7c8e8b124045c1ed3948f8f152aa6ce8b7d54f9850354129fac5ae |
Hashes for ccdexplorer_schema_parser-0.1.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ed27e9239d5276aa9d3eb3de9a2c03f32938874c9d2834af899ff9a35141659 |
|
MD5 | 16940a8ec8500824eaa93565a7ccdfdf |
|
BLAKE2b-256 | 1acfcb7f4d76d97d9ad31eaf41f8b7a8c1b3b46335b62bcaffc26b6d807103be |
Hashes for ccdexplorer_schema_parser-0.1.2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd9d7f2c6eae04509adedff60279b5ebe702d2b35995f673b3173cd30cfbb3e1 |
|
MD5 | 1545aa58a6a1bfe59f0902f26499ebfd |
|
BLAKE2b-256 | 8864c9cb17b5d894f148617e724a6e9287e0e751757f8b989b6dfb5d9043b57a |
Hashes for ccdexplorer_schema_parser-0.1.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c5f306627d7108c93cd9bbf9effe0e6f142a386ab4f9c19551e751a49bc9cea |
|
MD5 | 1d80122ced8126902f0f913d04bbaac3 |
|
BLAKE2b-256 | 1e1c68c7b69e2f3c15fc2ad3c0ee82779d032e5b56c328e28b67cfa61fd90949 |
Hashes for ccdexplorer_schema_parser-0.1.2-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 600433f065efcd4fbc6ae1a00b44d7555fc49dcfee02dcb4467513e7412dde6b |
|
MD5 | 0fe9dca6969a54b3e6d3b2983bcbf63f |
|
BLAKE2b-256 | fb7459adeb6caa7e0b31b25841c512aeeaa5adb89b36b27c0446a3e82684f65c |
Hashes for ccdexplorer_schema_parser-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d3fd57b814f4423d60646830aaa87303440986f21419186f1dc4cd08d926413 |
|
MD5 | 424c34e656a7e650dd247f45f2a2d102 |
|
BLAKE2b-256 | 6e6bd784e2e9b1a95ae22143cc8983da96e6677d681ac103b5389f0213a75245 |
Hashes for ccdexplorer_schema_parser-0.1.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b61f4b50fdd85eaa14244601e400f1f51debe982a8749fa27c3409f65218a292 |
|
MD5 | 420c73ffb9da73042e511051b1dde0cc |
|
BLAKE2b-256 | c2e075886dfe2d1000fd0f6040ddf279a9c8698100e11c9b20b0628c8fe71434 |
Hashes for ccdexplorer_schema_parser-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec15348973190a4cf2b490c2573185530119da45a716e7061083dd3435b49fe7 |
|
MD5 | c7b43db8280480625d36d4c384fe8f3a |
|
BLAKE2b-256 | 07e1c008002811745ce3f3523e7273ae5a1cc7f980af566d5f2587675f0dd2d2 |
Hashes for ccdexplorer_schema_parser-0.1.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 669b00e59a3adb2854dc23537507f5a6f87d0f277b15cb1be700ea4297bcff57 |
|
MD5 | 500885a880f522a68fb814698369546b |
|
BLAKE2b-256 | 8a371cbcef0ebaabe466e55524f556b6337a09e54e4608147df99b1f86764728 |
Hashes for ccdexplorer_schema_parser-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c64686b1cf3d44ae583bf2ac854c46dc2fb0ccaca4b0a7a1f4f1373a17aaa11 |
|
MD5 | fd3c16376b4da40d55e498c4c38cd57d |
|
BLAKE2b-256 | 2886870fb63ebdc9579aa6a8d243f55ea8c0851eb160daba6275251a7f72ebe4 |
Hashes for ccdexplorer_schema_parser-0.1.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35a931760d8d2788a655b7ba88c94d630b95f08a622f6ae8ff1702786f2961a5 |
|
MD5 | d2f89e4180a3817c875256e46abec0a1 |
|
BLAKE2b-256 | e1e4e5cdf386cee6947f83e298d0e1cbce490f4f05b7ee9da523cf225458dde9 |
Hashes for ccdexplorer_schema_parser-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38bf5457589091986c59c5db650741c2786511b461d56ea25d2aaab1137a0e19 |
|
MD5 | 17f043c1659b552e4a8eaafd6ee812f2 |
|
BLAKE2b-256 | 754aa03ceda23fa004a5018ea74449e2b7e78ff6c1254aefc1e85b423ec64c2b |
Hashes for ccdexplorer_schema_parser-0.1.2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 036a364b1dae0e58f64e9f68bd19cbc95c7741506647a9ef0ae04511af1700c5 |
|
MD5 | b39c4aae939fa7e86f6fd7456342b03f |
|
BLAKE2b-256 | 941f5b1c4fa4d445abee7b8e9f1afd720d609551b1cfa6cf855411e5c2e58030 |
Hashes for ccdexplorer_schema_parser-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 776ea3d590712b0920164480007fc07071d3017947dd1c0618b107bcf92daa0e |
|
MD5 | 7b15e1b040bb21d1a9e23a76edf0c33a |
|
BLAKE2b-256 | 428243288581a112a0932daf5ac68f12ec04871ee753bae08bd47d88928e702b |
Hashes for ccdexplorer_schema_parser-0.1.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9750b9830a4a9a143f951f727d8a599b86f2eca409d391fafc1feceae702496 |
|
MD5 | 97b74fd49df959c0466e7d247b73ef54 |
|
BLAKE2b-256 | 62364a234c1815168a7baa4b5894097092911c089280f13d6b35fbc1cab2bff0 |
Hashes for ccdexplorer_schema_parser-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ca91db1688b93327f492d9e05385788c939a806ab748ad1e39b8bbb8ce76896 |
|
MD5 | b169e5d224deb73f9427c1e5b6c4a320 |
|
BLAKE2b-256 | de9177385063fbd331d5b28786f7b802eb57015b60b62c8043ff654f0212a1ec |
Hashes for ccdexplorer_schema_parser-0.1.2-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d51905d70e849b574da0e59c41e388062c83356bc32c38cf51895e5d2597ebc |
|
MD5 | efc340fd90a327ab9e16a254764c03c8 |
|
BLAKE2b-256 | c66ffb8f1072614376b134f3b89bc450ff85b6e679483b196ffb728bf51f724c |
Hashes for ccdexplorer_schema_parser-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42ab0991302104c50227ac5c38f08dffc67ef9bb11677b30383e317fa41e3d79 |
|
MD5 | 69b3bc5ffb7f896f6be2d4a9360b976f |
|
BLAKE2b-256 | 4e5c7f5b9a2617573d7cc772422da65bfba74a2315ac20e11e40049c95f29348 |
Hashes for ccdexplorer_schema_parser-0.1.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff83e75208e9b71c819c9f0ca937611adb2b7dcb050d136d4ae3f6f549f9f873 |
|
MD5 | 02342bc1797f5051ce5742aaf50b484b |
|
BLAKE2b-256 | 007d913f3db73ddc90f538b4ff02392c08d5cc4a86d5c21f449223f9a6d91aef |
Hashes for ccdexplorer_schema_parser-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7735bb731404da1ea82c241cf2eac84a52a1e583a803ed3b9ba9fca7f74f4ee8 |
|
MD5 | 34e0c488d916b398aa1c2b27a8ae166f |
|
BLAKE2b-256 | 1614070d8aec8554a23f3a38b2463487497e0a320ea33fd86db583af1edebcf4 |
Hashes for ccdexplorer_schema_parser-0.1.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0e24291d479ef9c3d19fcd41ccb4aece50bb34c76686bd703810df916319401 |
|
MD5 | 8857f87bd6b140598b77ba232b4179c1 |
|
BLAKE2b-256 | 3f4a6398ba178e2ab608b126a6e08b35fe0f3a4cd5b1aca690e48cb2a6b9e10a |