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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4118c7f4e7682c040f983e8d0daed738637d0e20018bc134633790ae995e214b |
|
MD5 | 9e3619efaab2d430d20af0c3a8f3aa5a |
|
BLAKE2b-256 | 9b8d90093758cc603eafb17172c8d5f07613801425edb93268b9ceea030d3bf5 |
Hashes for ccdexplorer_schema_parser-0.1.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a488709d83199a06dc7583401221d9614b999206d69e012f036ecae46b7e252 |
|
MD5 | 571d2be5caa547538404c68463fd2fa3 |
|
BLAKE2b-256 | 8a7b6b8121fb7fdb9ad22f7efbb86f1582582acb44e6287381747aefc461f8a9 |
Hashes for ccdexplorer_schema_parser-0.1.5-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6792874c80b64e31ce4904e0e9c3271fc4236a9807a2a822a3eb9591b259267 |
|
MD5 | 54b29d1b87c59170b4cfccfe7e962971 |
|
BLAKE2b-256 | e8a7032b92b526b1675d0444340c1117a2e5f4d92ad0faf13ef8876b74284517 |
Hashes for ccdexplorer_schema_parser-0.1.5-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7bb1060041fd9fc4300da2ce7cbbcddfd1a58ea6f41ba1d86ed2563723e5736 |
|
MD5 | 280dbfea340d5729cff1166d869fe3ff |
|
BLAKE2b-256 | b7eefb91cb77d7aea33a8226433fd22246dae539eb2f3986825f69b376e15faa |
Hashes for ccdexplorer_schema_parser-0.1.5-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee70695c092d33edf22043ecee2c02f9ae9ef54701be50d2c20ae4bd7c4c8efd |
|
MD5 | ec4ca1737c6f36cc4e72abc10f473fd3 |
|
BLAKE2b-256 | bd2893748d6991ecce27309c6412188bdcb8886f902529dd319156125153bdeb |
Hashes for ccdexplorer_schema_parser-0.1.5-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 606d38fa30d377e9f6b3ff7996fa30ea9df8ff4f2350facefcc39f753fd8a07a |
|
MD5 | cd463510ebfd65c850a49671360d89a7 |
|
BLAKE2b-256 | 94e1ff3360deb7761461cedc600ae9624ad29a8d009fd828a2e0bc079960cd52 |
Hashes for ccdexplorer_schema_parser-0.1.5-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0fde333e8473a3babb54f37209aba13d1a17f1bf8efe81ed661c971f3fc936e |
|
MD5 | fd42d1ca3a4594e66aa319bb0ccb8e66 |
|
BLAKE2b-256 | 5f0c413d7ff7bf0c06a6fefdbc1f0edbf1440336f5f55c6aad9492d6cfe8ad5f |
Hashes for ccdexplorer_schema_parser-0.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb15e2ef5804f5f8c0347ac90c73ab710571c72c06dd59dd5f128a705641f433 |
|
MD5 | 782a11aa1ede0b3ac8abd98dea04f859 |
|
BLAKE2b-256 | 8bbbf6ba3c153854a86f34b52534a4312177ccd5aecda372ab67a59647b6273c |
Hashes for ccdexplorer_schema_parser-0.1.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcc8c8734ec585e70614f7055ca044995c52096f623d83e013dd12815a2ec26f |
|
MD5 | f948c647bdeafe220b1360c13ebd6f3f |
|
BLAKE2b-256 | 0145018d6107268c6e4431e1d5e0c4496062a1e296bfda30ee9233eaae7d792c |
Hashes for ccdexplorer_schema_parser-0.1.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2272e828b85be8026428216f55c3691342709a2e61156cd224bdee92f0872337 |
|
MD5 | a65b52baf623334fb279f9233769aa42 |
|
BLAKE2b-256 | ff2e697765cb1146e269f3afa0f35476acf5711adcd0eab7bace69fc6d0b0149 |
Hashes for ccdexplorer_schema_parser-0.1.5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57158d15b7942d7adfebb9560b3594828340d6406f5da08b6124762ccf4ab4bf |
|
MD5 | 410fc42afee79b1ea4f531d5e9b2fce7 |
|
BLAKE2b-256 | fce473c292ce3205f8be0dcb3f745e845ada07529a3c94d99de4f477c4314aee |
Hashes for ccdexplorer_schema_parser-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c10591d7a0c9621758044ae44c2e4d04837f53c2a1a0706060fec0d2d5aecfa |
|
MD5 | ab8623b8bfb7df267408337b65a345d1 |
|
BLAKE2b-256 | 45d12e22953c62a085e758c76cf09cb78e6f45523a0ec98aced94b276ccd800c |
Hashes for ccdexplorer_schema_parser-0.1.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49ce68cabeb21b0e454422f4589e13defb6d4113c54ea30519a485444f0fa4dc |
|
MD5 | d6f55dc087236d69e02d96e0a19c419a |
|
BLAKE2b-256 | 0a496a8de06766d1f8aa10f4944b8866b8edbbc1b3c2df68c2b12addfa0b2a59 |
Hashes for ccdexplorer_schema_parser-0.1.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a93fdfffde2ca15e747b21be627c1a68ea9e518a684828366b1f7975ffca13c5 |
|
MD5 | 6903d1ba65cbbcfb3cd003ce334b11a2 |
|
BLAKE2b-256 | cc355bba8db8ab2501dfae5729b9a0c91dcba906d7a832736b35663068fe13c8 |
Hashes for ccdexplorer_schema_parser-0.1.5-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac43933be1998b624bdab40514abc59158435470cc8cf6e01ac8cbcd63761563 |
|
MD5 | 9c4c60fc0e28ca03ce2cb664342c352f |
|
BLAKE2b-256 | c3ee0e1a7f10c8c43908f6163d39c4a19d44b7bb8167bb9fb8134c1c914f46d3 |
Hashes for ccdexplorer_schema_parser-0.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b23fe4a657aadbf05dda1fdd694ea40b6ad8c45054d01f2a42006e5fc900e787 |
|
MD5 | e0cd4d1c32f6789826b3cfdc7309b862 |
|
BLAKE2b-256 | e9db38125ea0726fc54f88af1d41b7f1bc4a577315870b0edacf60cfd9c6a4f3 |
Hashes for ccdexplorer_schema_parser-0.1.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e25bf5f660d147c67e8b4f47bb719b24533ac859eb7458a749b0962af808e47a |
|
MD5 | b1dccf547f1da8ca463a7acf75c9b4ea |
|
BLAKE2b-256 | 2e8e8b4b5197f56c40da913cef6000c295741b915c9e86ee23fd53b72bf55d7b |
Hashes for ccdexplorer_schema_parser-0.1.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af9e08ca2e4ae6916466881a35dbe5ab8842ce739b86c8b29ec65c40844483c1 |
|
MD5 | 0338055b180437a32f3fd4703a7bd8ee |
|
BLAKE2b-256 | 4b4c1b6d6088aba163f1fa0d5562ef11a3cf50d73765f3f1d1ebbbcf4b5918ae |
Hashes for ccdexplorer_schema_parser-0.1.5-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ada13bc715dab3e5b0afcbdea90236253837fee2b9bb2709c3889d0420738132 |
|
MD5 | 13cf07a48d5bae6a5889bce420a8f6bf |
|
BLAKE2b-256 | 9e88908a609785cccb917f63d69e6e547ca5eb49bf5beef4e414f5c411a9942d |
Hashes for ccdexplorer_schema_parser-0.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d8df4881de3ed9e848c8b6241db9d53d48a93ce96eacc7c2755f3153d38837f |
|
MD5 | 41887c3c3b899f39bae02e43071df4b6 |
|
BLAKE2b-256 | a2210d1642a111c79a44bcfe48085272e12c7ba0a763e95eede9b2e2a7c1e915 |
Hashes for ccdexplorer_schema_parser-0.1.5-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 298bb5e7fa1a6dcb4e631dd2d62fe8d2faedcf6b4c2a4e9f2443f02eb1ce2a3e |
|
MD5 | b555453f2cb340570fc72bda4ab70b91 |
|
BLAKE2b-256 | 811c54e26e0bd3dc3e26c5dcc5680f89620a50fe2f5f68a0327d916a3d4e886f |
Hashes for ccdexplorer_schema_parser-0.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbc81bd14dce9a4ef71c2cc1a568ef41f16dfe4f81079724f74dabe5e3df7dd6 |
|
MD5 | 747aa7c86867eb216fdf4a29073184a8 |
|
BLAKE2b-256 | 924ce0354ff89f2e12aab1217f367651a791cd4b09a5489fc43961b8ba4715b8 |
Hashes for ccdexplorer_schema_parser-0.1.5-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdff75ebf61cb32ce636ac599056fce68d0239a7cb0861c88fd9fbd00b8c371f |
|
MD5 | 5e9edb21f97cab07aaf7d8c75f05cd30 |
|
BLAKE2b-256 | 6cb71868e1f81a4b88d5b8948d5c568f155fb1aee107b07732142245b9e5181d |