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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f09242e4f1bdaecdc370c0b6072a456a790043dc10ab0738a9587c009407c711 |
|
MD5 | 6f9cb54e59755a8e1da4c3e02ed605c3 |
|
BLAKE2b-256 | c479832c62d4da19bc635eb84d747be89c13731c78f1962608fdfc0258ba1ab0 |
Hashes for ccdexplorer_schema_parser-0.1.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1019187468d1f75194a8a338230b224ec49e4f08337dec7a9d2703360868124 |
|
MD5 | 994fa751358f63f0588f7e2803114d4b |
|
BLAKE2b-256 | d5f8ecbdb0ffc5eebe00d540e4d9a4843db2c06cf1b77e376ada5ad9fb7a911f |
Hashes for ccdexplorer_schema_parser-0.1.4-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 468c55b98b6de03cf58da160d1ad1f884c96227fc538d2831c744d8d0e9c8a32 |
|
MD5 | 096e14f2f7f4602d28ddaa90b00a9147 |
|
BLAKE2b-256 | 3bbd1552d6532da6d0338b7d38d307ac166af0925d114b408e39bd240b9f03df |
Hashes for ccdexplorer_schema_parser-0.1.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d48bff837594c4ee0595581900ee8822f36acf78f47b631f2c07f73c56958f3 |
|
MD5 | 4936ae40d2aa69d1b08f65b69c80fa74 |
|
BLAKE2b-256 | 309b9c4e2974b24fc33196429f8b9adf88b935c3a56532b028fb133363354232 |
Hashes for ccdexplorer_schema_parser-0.1.4-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8241d7007888d1d00d1badb7fff16adf89078b99fb3292f5ad288bbfceb21c3 |
|
MD5 | c672878dbd40efe5173c5295caad7917 |
|
BLAKE2b-256 | 234d20cd8499bb39ca4a74b276201e4e3a2d68352e740645b351109b52ed2a8e |
Hashes for ccdexplorer_schema_parser-0.1.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49051c0c4185954669221e7156a5d9dbaf43fc89002b05804280a6b64708db69 |
|
MD5 | 5604973c404ed3327895cee8af226066 |
|
BLAKE2b-256 | dc96b33293e59502ee2bf8931a7e59d44a8d3297e7aa1f8e126819fb30e75bce |
Hashes for ccdexplorer_schema_parser-0.1.4-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc7ae92ad3728227788c174a1f4aced444d1ae55f215cf032ee6b3766d506348 |
|
MD5 | d5c4cae2ddfeeed57a2389debe819830 |
|
BLAKE2b-256 | 6af22f9f7251d2f9772afe157d750629d0822f74a3889a00ed65dc6a13a11d9e |
Hashes for ccdexplorer_schema_parser-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbc75fc4ede4aaed1c53b941f49921c2e1e412449bf3eb4b05e19c363a6a03dd |
|
MD5 | 3c01f441a6cc56457d2ff12ec1e76956 |
|
BLAKE2b-256 | ef1484ced80bd95cc5da62304633254667ab9eba2a8d8af67ede542fed365cd0 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e18d0e45f9c4cadbe2465eb0428e006766130240dd3891c5f23f8c4d5f96332 |
|
MD5 | d5665295aa0e6778d1874e8380e7034c |
|
BLAKE2b-256 | 5eb6bf06ec12673d2042ea60ba515009a0330446a33a9acd2731d149908d07bc |
Hashes for ccdexplorer_schema_parser-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62b361e35f2e68983d82bd4c3782f61e8e6704e0a09355492e06c8881471828f |
|
MD5 | a2a54e2a65312eddd6237f8f4130da81 |
|
BLAKE2b-256 | 8f3489db8f22d6dbde4e6ba56056560e3e278989fcc1659f33d415e9f454fed3 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dbf9b2e42e43d23d4780600a20d437f3b084580176c57019fa6d8ff9823b0b8 |
|
MD5 | 36dd3a2dc2eec66ff6c42f9c04f12260 |
|
BLAKE2b-256 | 05a98c83095561aefe5ab12a50e3072f6ce0290ce9bd2356dd68f5401072b5da |
Hashes for ccdexplorer_schema_parser-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb437fd24681d31e7c5b2a3d20fb1cca09d694b9fb8fd4b6b310a7684764ce36 |
|
MD5 | f4d60d3c32d565c479afbb5c4d68e4b6 |
|
BLAKE2b-256 | cbcb09d79834a83ce97bce3a8225139a86434818f92c94ff47781be133787303 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4535fe2c679e04886ba350854b81b19386f761817e5e7f0cf7014d0f83244297 |
|
MD5 | 34a7002093d6eb19416b94dbd0491f9e |
|
BLAKE2b-256 | 0f2a2036d73ca0c0d28b890c29ed26e849085aff31a3d1fe1f4e0f5494ae7e01 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3605327e929d30af9a77a4fd1fe4568ad97f95716c329e6ee664e921333ff716 |
|
MD5 | 528e0e527a8cafa0fdfc047966777a2b |
|
BLAKE2b-256 | 125ccb4bb0508f9a3b529ccb35660b02ad6aef268ca0c3177688c636dd686d51 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b90d6259578ff9f5630b12fb14172e4a5e2587cbd44dd5527d7886b11c7cc9a |
|
MD5 | cacc4959be0c094b2ae13bff88ab9825 |
|
BLAKE2b-256 | c15eb2b376a274b2ec648ae74f5439ea4f52d59a83e034cff2f48e459cc7f505 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2575886d5971cc607e2e1f3554c043310c3b5f6ded1f47f59ea177d1f55f0a0c |
|
MD5 | fb5ef5136c8600386aa4a72f757c077d |
|
BLAKE2b-256 | 57339c9da7e5ea26854941f084aab51aebdd6700836cdd3de0d6a2b5780a9820 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf8d68b7a75307bb3fcb9247b1c62b44855d46022c2cf7ede934d2203f1fa23d |
|
MD5 | 19d0161e48399188d4c7a480154e90c6 |
|
BLAKE2b-256 | 6d806a85ff6a35b7a60f2e64c74349e1cc877ebf431516167e1a47b506381925 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4183bd3a6d22ffc6f1f9d95374ad785afab784b2279c401f5bd18ba4d72b2a43 |
|
MD5 | 76d8fd350f55b21b48b885d6c3464d8e |
|
BLAKE2b-256 | 22d1938a48370169741500815e2c337055fedfe3592a5e6d3abc97e26743cd42 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b09d496bc64dfb225687ecd331862fe896e8beeece9963dac0019a2e173b6907 |
|
MD5 | 75d039fb1cd257fe8db70c4764a5133a |
|
BLAKE2b-256 | 5e7b8e263c6c0b6c3239cb9eb7c1704c45cdf9f1b3fc39527bb2e36c03975e55 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e01990fda273cd8dcd44ecc267be2e030b4513ccda35f03203865a6ef8f2e17 |
|
MD5 | f5b0d042bd72d2bb3a3ab31d4289ebd3 |
|
BLAKE2b-256 | 5aaf2552ffd8e163c96a953bc2bc4dd170c2d44f6e6a3638c5cc2f1f30d0a8cc |
Hashes for ccdexplorer_schema_parser-0.1.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20421d011197a90a7455cba042011cf6a2cbd8f20ac1ba6295efc5da8122f5e1 |
|
MD5 | e539dd5e844acc2fc98a92e3ecbc480d |
|
BLAKE2b-256 | 6855d646f77f4d0001ea1dd43eb62595062ef4ca9b3c70177538086aaa41a452 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34b2fe2bc70fe4ddd73dc6f76d9d15d1c6245b0db25c8e20a8497aff05f844f8 |
|
MD5 | 0c5a722b13cd706c6919a15561bec56e |
|
BLAKE2b-256 | 54dbfd98827f9f8cbcce96974e6db0375b9c7e4291a0c49c648b567dce457b75 |
Hashes for ccdexplorer_schema_parser-0.1.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 768ba969beb05308fcc810e7f1dbce01f6379d66db4c400554ad99c3e1948270 |
|
MD5 | 60fa1fa338ea5a5c41cdc1b4f718c418 |
|
BLAKE2b-256 | c7e8615b4a45c21a5146a12abd7b6988d5afb8a65e1a2c4965d886dca0a3fdc1 |