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 schema_parsing
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fe9ce8d0d0f608e09c1a24b47693dd78e8c70b9e40f4a3af1c923b948e6dc2f |
|
MD5 | 47e56b1d57b6136368709a8df0e19cbb |
|
BLAKE2b-256 | 49603725f6188dfa907bcd6dc6e6fa54b45890fd42ab93912f16003c062359ac |
Hashes for ccdexplorer_schema_parser-0.1.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2e85cd1bf55acb7ce2ab37341ade02fc144c87c1ef17018c9bf23f314fb4f95 |
|
MD5 | d13c40bf567210d52aa7c8a89941c843 |
|
BLAKE2b-256 | 8c5d58323344ce0a69a2d4063def87e7a60d0f9e9eaeeded5c011737e8808987 |
Hashes for ccdexplorer_schema_parser-0.1.1-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8f4f7b238ae59c01b55979e4cecac2f09131f11030691380d2b4d6323e8a5f4 |
|
MD5 | a76a58856f3f860eb48e52fac48983ff |
|
BLAKE2b-256 | 9aa1c46ec253ae6c4831dc8fa1e5de50e09d20f78637716867eb4434a44f2192 |
Hashes for ccdexplorer_schema_parser-0.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab73479aec0880b34ea75a7c099a074991c6e34c036e6035d698db89a7b75cda |
|
MD5 | 070d11aef84fdc4b3546e36b4ec4fc1c |
|
BLAKE2b-256 | 59298212b2e11fd8d28e0b123af1c273dd16d4a72c195d03b43faf15b2cc182d |
Hashes for ccdexplorer_schema_parser-0.1.1-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 850f27b424fba3782d31f7c2add2554dfc4ec364aab978260399a0e85be73fbd |
|
MD5 | 4e9cb3abd085555a2b004ae6c7b85535 |
|
BLAKE2b-256 | 8a5c558e89f525f263df07402d52a8a310e0563ae6b00fb01952807d0ed8a553 |
Hashes for ccdexplorer_schema_parser-0.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80987808e0a5872749e8b07e1f6dacb249496098072d9e11c56a572f5303cbb2 |
|
MD5 | 86d11073afa67c9d9abe44ad5426071a |
|
BLAKE2b-256 | 5b087a9b40799ac451b0ff3fa1cdabe85f4ce24eb050f1aed5c6bedffe39e0c1 |
Hashes for ccdexplorer_schema_parser-0.1.1-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6db503899d8096f9e25c002e6756e827ee4b8c69c5283d9a220917bad191e559 |
|
MD5 | a665d4df4e26494f201f212687aeec2b |
|
BLAKE2b-256 | 62141d7ee4715b6b4e44ededb007e550b2696d40252ce6cec49853b7dbe8aed6 |
Hashes for ccdexplorer_schema_parser-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a099fca730882821347f4b58156fb89e57ab1f097d22b70b17ce3b4f1d19712 |
|
MD5 | 7691491d051e3e84dba1c883754370fe |
|
BLAKE2b-256 | f2dd43ac51d9ddc000bfc54630c72bbaad653465e515601e348bd5c0c7589627 |
Hashes for ccdexplorer_schema_parser-0.1.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a56a1d72724f79ca1dcc39c33f9f7d39f539548fad34d652fe03ae75f207c07 |
|
MD5 | 4e755a5e50022a772537d8f81234d767 |
|
BLAKE2b-256 | b558cebbcaad5e2e2097e8759c77326a2f344b79b57de7d5b70783d98e9cbe16 |
Hashes for ccdexplorer_schema_parser-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 156c6f897e45c5c609109fabe508bf56f03a422840098dd345682aa85d24ec0d |
|
MD5 | 2e0fa9a766d663175d90c1fc54bb3d21 |
|
BLAKE2b-256 | e233249daa9331d2cb7a64bd71b4954399fe3e896b02cb1c66577698c499c35c |
Hashes for ccdexplorer_schema_parser-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c3c32612510155fd715266cbf3ee6a4902b14352f79aa672dc35a0c6b19da5d |
|
MD5 | d31ede560565f3e342f199ad9caaae68 |
|
BLAKE2b-256 | ab4b2a90b4a4bada8c357f8543c8a4c25add4ad17c86dbede1fa8650e5c0774a |
Hashes for ccdexplorer_schema_parser-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b8d84c4bbc554c9b5e76df26ab9475f4a7e64e088c1ffa2edfe2e46a3c428e9 |
|
MD5 | 6aba93bf7750765dd7be8484e9fb479c |
|
BLAKE2b-256 | 64f87812df5c1d17f282b693519a3b724bc8e99c776538a442eb38dc479bff3d |
Hashes for ccdexplorer_schema_parser-0.1.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3399af25b9b114805c2f6597a36d80b39668f1d84f49f2864694c2875c6ffd5 |
|
MD5 | 83df0522341e5c5c824a04f30ffa8055 |
|
BLAKE2b-256 | 0582a4e8d1749bbeeaf0f308353c4c0247756781551aee6e076b948d986dbf99 |
Hashes for ccdexplorer_schema_parser-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e44b923c7a6389aec893cb02e9cf8d8d6d829cbac3f8cae799d9eb144a679036 |
|
MD5 | a847dd71df1fe350e9d0610f921263a8 |
|
BLAKE2b-256 | 7f3a7d3f227e5cf5417bf18161e325d9cdd14aea13b91d052bf6d7595692ac98 |
Hashes for ccdexplorer_schema_parser-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 566d29b8885e88f78dbcd92163e84136b4336c3e0bf36850a80f7a35f3334723 |
|
MD5 | e2f91f07ca4a7f2e55ecc9f6ca7f168b |
|
BLAKE2b-256 | ecda55339a965758a650959f55e6826b9b111f052d99587b2f99755634f7f75f |
Hashes for ccdexplorer_schema_parser-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc2e04278e187817747eeef039b677572b46226150aebefddc195443c0a2f221 |
|
MD5 | ec7a2efb13452a6573d42b170cdb02df |
|
BLAKE2b-256 | 07524c23677d4a3f2124e867b6287e67141c33a5b071c1172a8d3b37cbe0841f |
Hashes for ccdexplorer_schema_parser-0.1.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e62ac25e4bccd6ce07601813752564376ce8a220111e44b0b07cdf6e4268ff49 |
|
MD5 | bd595565001461dfc9e770907c9220c1 |
|
BLAKE2b-256 | 11f2580123e4d450911f6fc61140f315a1f96e0f073b80b8109e09775d70b89f |
Hashes for ccdexplorer_schema_parser-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e490798859a46cfd5b66e2bf6231096260b7e4160ae6b18c2c6d6e3a1da9c61 |
|
MD5 | b36745c27f4f2a638cd23ecaff33db8e |
|
BLAKE2b-256 | d6055b7977e46737dee126556535a8cc1f2dfb7348775fa08664a1196ad5ed2c |
Hashes for ccdexplorer_schema_parser-0.1.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b86c56db33e66bf3263987460ba81bb4e7292c0471bacead56800f4e86278e66 |
|
MD5 | 19de1ea5a7073c00d92e1320d3daa0f4 |
|
BLAKE2b-256 | 2132aeac02d7f6cd2a1af8238d2f3a979820ae6c09078ae0c92faf0c0ff0f7e5 |
Hashes for ccdexplorer_schema_parser-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 408cf335d42357da3c48e840e22b6e2c0aa13e9b5c8b1ea68c1a0bf59ace50d4 |
|
MD5 | 88da1e44c9ae296d334a70f7f494f9a1 |
|
BLAKE2b-256 | b10c0426e88782a5bc9b4a526c75310619824846755b9df7bd847d4bb8be817c |
Hashes for ccdexplorer_schema_parser-0.1.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2861d1977863a551cbed403e44c5606528c3617e348058c3fda8dbde337b178 |
|
MD5 | 0165b848e3ed208c65e3a909b3233ac6 |
|
BLAKE2b-256 | 095385908cf659ab7faa2477056f0a9611404deb58e6772cded37e9e5c8b7ceb |
Hashes for ccdexplorer_schema_parser-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d160baff308e4ff0c2a78f09953619ffe1ad2eeadfe8d886f924a41ec4066448 |
|
MD5 | 3ec4e71fc112250bcb1c44334c3cdec5 |
|
BLAKE2b-256 | ec26bab94c2f9294532e0712fdab32f69f62b6ab06d13677b8af40f8b72cfe95 |
Hashes for ccdexplorer_schema_parser-0.1.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ae12659d6b841a0d5d3c0674a0e8647f505b3f959dcf570e97c10aee811e405 |
|
MD5 | b7a9e024e400ca2832284dd612be7fde |
|
BLAKE2b-256 | 00a213dd2c75a03b3765566a4ab298401a312bff03c754635e15c99e61cd4fcc |