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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | acf8262ba13a607d1cdb1ab92a5a803a8fd261d92cf4873168ed3cf996ec4b62 |
|
MD5 | a5a2341e20995a414b32e04b4086ff2c |
|
BLAKE2b-256 | e4dff050efac1be94a47e950fcbc82ae7b49344a588e39efdc391f9dfa4b8c81 |
Hashes for ccdexplorer_schema_parser-0.1.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fec1f6f8352e4fd486a639d0aab31fb4a11a92d82c5545f95b6a1eeb6a7044f |
|
MD5 | cde1fbdaafc5f6aa18e76ac6e0823ddd |
|
BLAKE2b-256 | 42999a8d26b56cfd9347ab4c87a3057666820216b17fb2ad57361e4c673575b9 |
Hashes for ccdexplorer_schema_parser-0.1.3-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46f20309b8a14c91f2817f2f646ba2742902ea00e32c24e020dfe93068fc5b1c |
|
MD5 | 284aca3f9f8fe5dd0b14c487b1389055 |
|
BLAKE2b-256 | 1773d0dd2cb86f091eed126e1b09810f9145dd3740fcce2cdfbb0c9727ef4c69 |
Hashes for ccdexplorer_schema_parser-0.1.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5b746199b3c30263d0b3ea2ec2fdefdb773a8e3be08d513713d702a13a9e3b4 |
|
MD5 | 18aa911b42dc0ff4854ed3413db96192 |
|
BLAKE2b-256 | 29273cccd6a1ace8da9c1aa4d490865e05ecaac39ebd6f5cdc6093d597ad2459 |
Hashes for ccdexplorer_schema_parser-0.1.3-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ccd6bbfd1c439901e490e5a4609fa50556c71e49bc149f9f31a0329ad716024 |
|
MD5 | 17d546019217fe7b9000be8cf0febb11 |
|
BLAKE2b-256 | 7df19b70ce8c41bc4e0cb9afec2228cf05add0e7b7f9f5dc5735341426d2052b |
Hashes for ccdexplorer_schema_parser-0.1.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e5ffe18bbb78116fa5ed896d622a4d26ad54b9dbca4050e4e5fc9d474b6962f |
|
MD5 | e0fdf9bef7b4cadac64ef08c73a5d9ed |
|
BLAKE2b-256 | efb006f6438fec277cdeba5a9e737a72bb2d50db110a6fadf7fd2e95ce652c43 |
Hashes for ccdexplorer_schema_parser-0.1.3-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cf7620e3d25f91f1b15c7d9b91ede49e58cb4900b3b3f02a1021a3686724e3b |
|
MD5 | 3e5121fe9e000fb46951da6f4cf420c2 |
|
BLAKE2b-256 | 71e0d92a66ab98b32de42f5c887e2e047ff3688ed10cc83359c7cc23a16ac75e |
Hashes for ccdexplorer_schema_parser-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ebe4d70529491d8890432e7d55c6b10d22c1392a203bfcf292cc485eb61f1d1 |
|
MD5 | aeb1d639ff9c6e96ffd6a520d1367431 |
|
BLAKE2b-256 | e6ae09e502f6b98443a7bc48796ffbb8a30a0e0231fd5736e076575e6f3d3cd6 |
Hashes for ccdexplorer_schema_parser-0.1.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df32dab7bb7228e06d65d45cfba9defd4e5dee4a238e03f33aac4ae5a0ed1e3c |
|
MD5 | 177822a2c4d1c75265e8cbeab9fe82a1 |
|
BLAKE2b-256 | 18428acfcfdd0ca6a60725a970a6f9b2803ae5f23292da02ad1b1fe02131cd61 |
Hashes for ccdexplorer_schema_parser-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8181936d473ffe2e35ef964a9d7b0df7577cfbb5fad886fa6d2f3ea4091f6ea |
|
MD5 | 95b8f5052013a4d0e76c72cd9db1565a |
|
BLAKE2b-256 | 41c2e8868359cbeb5dc91694fb41bea48d6a53492c2561da4767b5cd6c0af4ad |
Hashes for ccdexplorer_schema_parser-0.1.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5686edabd632413bb0693109d55083e2dfe6cd9fbd4860e49a6b0595237e568 |
|
MD5 | f660a5ec19801241d67b6616935f2b13 |
|
BLAKE2b-256 | 6babe3eb089d4dedce7b82a0c3fc65879418bcbab4761ed032f0d0e17714a75d |
Hashes for ccdexplorer_schema_parser-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fe6f6e321afb0adaa76066ffa989c0b482e8cae8234bfea5c07eb5fe4fda456 |
|
MD5 | 2f2a28e0781e680641d62ac234cf3cde |
|
BLAKE2b-256 | 9f015b3fc73effdce644390e278241e177f65b91065af3db33fa16e2f3e9650f |
Hashes for ccdexplorer_schema_parser-0.1.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fb30ea434c0bbe43f6ed49e077bd49efecbfcc28a9d29774215844a095d1167 |
|
MD5 | 5d927317c9323b771cbe7f2a1bccfb78 |
|
BLAKE2b-256 | 57644a9697b881c6328d0207f7c38571bcb2e7dfa55c6ed09d4b43bae15a4c86 |
Hashes for ccdexplorer_schema_parser-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edaf11cd1627502142810e475842b88d5e42eeab5875606e5e989908a3b9a668 |
|
MD5 | 522a43bae332c454b3a45da7b1c41b4b |
|
BLAKE2b-256 | d22c302ddf66772003eb443928f1ee10a4687c644121c25c2b4049b2afbabb4d |
Hashes for ccdexplorer_schema_parser-0.1.3-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c48d40d0415bb5af8f0f3fcae77a6377410d9fb38d61eadd4dcc5d0e3bc5242b |
|
MD5 | 9d8117b01c479fd760e52ac3d948921a |
|
BLAKE2b-256 | 75768fe2ee5f3cea72dffed772a1c59c04f2ce0aaf60bffff8769fd9291fd6be |
Hashes for ccdexplorer_schema_parser-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36f4523bcc616acd5a15a6742a3f37cf8f16ff2a22aa2ff2bc3493b2fdd8091a |
|
MD5 | fbf9a89e6a68fa9871ca662b96f03b1d |
|
BLAKE2b-256 | 15e9a7faf5d7e2720c758a1cb4a85830929e0f31a131bf063670932953154f85 |
Hashes for ccdexplorer_schema_parser-0.1.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08753f9492a37581e400a44ec8e7fe4b6ba41705945b508c38184c95cacdeea3 |
|
MD5 | 28b35a65216ead16f59060681b8ac44f |
|
BLAKE2b-256 | 7a9d3a1378814fe71bf18d5dfdeb4e5e08732801113fa4f2782a5e4ab39e32fe |
Hashes for ccdexplorer_schema_parser-0.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85a368a1be5a722260cad985e57481331c9b66504bf9d4c3d1fd0633810bb186 |
|
MD5 | 7618014fc3846e9e43955018c2dccdc5 |
|
BLAKE2b-256 | 3e9845e53c32afe7cc515875d54b48e4326c40e9aaa1e7fb61e792d2fed7c188 |
Hashes for ccdexplorer_schema_parser-0.1.3-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92c70d86b5355a752cfeb0c560f50625cc1aa570793d9175c8e1b53ccbc78e33 |
|
MD5 | a303e7c8faa67183351f1ecda4ccb05f |
|
BLAKE2b-256 | 8d104f3d79b75fbf569eaa72941fb0c12ba2f77de80a0609f53b9074bcde5208 |
Hashes for ccdexplorer_schema_parser-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbf62ad22f3e587b20961df55be3bce74657787c58c63be4de72efa635ee06b8 |
|
MD5 | 0bc0a4b24500bdc996431f6461ecf2e3 |
|
BLAKE2b-256 | 4f2e4d0da262d338c35d0acd9100731406b2972e69462a1ede511741fcb83a51 |
Hashes for ccdexplorer_schema_parser-0.1.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78c62a0028ba19a41e38f5200a36b95c66c2a8d71dc6479398cecfd273f1ad16 |
|
MD5 | bc05deffcb28822267f16a1ae07dbf1c |
|
BLAKE2b-256 | 5311c546daf1c34e4e9c3e1d796223f6e2ac3bdd9d774b0fb9aa78ae28b0d25f |
Hashes for ccdexplorer_schema_parser-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ff7ad20af6c235e131cc92e22a7024fd646f41ec87ab1596bc2cfd631520a62 |
|
MD5 | 0e5fc5ec36a04e5fedf0f8fc69facc5a |
|
BLAKE2b-256 | e7f2a3a0ea16f4f3f6ab2201f21a3f493f97f85914fe0a00f884a8741447f6e8 |
Hashes for ccdexplorer_schema_parser-0.1.3-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72ee1e19979aef501754cccc75c161bf75f98e873257101a96e177364c3801a1 |
|
MD5 | 7803954db19bdd487d454696a364745e |
|
BLAKE2b-256 | e371f0d38211a47b6271c2efc5b3b3260b063b5912ea5a25f4d45806f614e161 |