WRAP msgpack encoding
Project description
polywrap-msgpack
Python implementation of the WRAP MsgPack encoding standard.
Usage
Encoding-Decoding Native types and objects
from polywrap_msgpack import msgpack_decode, msgpack_encode
dictionary = {
"foo": 5,
"bar": [True, False],
"baz": {
"prop": "value"
}
}
encoded = msgpack_encode(dictionary)
decoded = msgpack_decode(encoded)
assert dictionary == decoded
Encoding-Decoding Extension types
from polywrap_msgpack import msgpack_decode, msgpack_encode, GenericMap
counter: GenericMap[str, int] = GenericMap({
"a": 3,
"b": 2,
"c": 5
})
encoded = msgpack_encode(counter)
decoded = msgpack_decode(encoded)
assert counter == decoded
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 Distribution
Close
Hashes for polywrap_msgpack-0.1.0a25.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55160d7351cb0254d62e854714de627bafd22e3bca123ee7735267d7ebf4e24e |
|
MD5 | ee2e536462f62f92ef3c3903409d13a1 |
|
BLAKE2b-256 | 26007198d2a6808d4a54c75a142fc9caff46df5c11bd82d88f36e9a794a56b2e |
Close
Hashes for polywrap_msgpack-0.1.0a25-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83b9fd73866e40975328a58f56a6736e30f7c618b5316a3b61e8c24a261e28ae |
|
MD5 | 8f37f890e71bdde0415fc0118b3fb160 |
|
BLAKE2b-256 | a38ceb7a8c9161bc5bd894ab650999099eb4b2f6baa77ca2272b9d659b6d681f |