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.0a19.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46fd8b6e49c8810280ced0b65ebcf01f278da075605a62cd705e2a60851b3d3d |
|
MD5 | 406f20b8b390a1422b1843ad50c787e6 |
|
BLAKE2b-256 | 15c2a49bc63c7bd509e04a4039adf6d2786a67253d9a139a5eac59439d9ccfd3 |
Close
Hashes for polywrap_msgpack-0.1.0a19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc55ee8f91849fc4df630b5f4706bd37c07fe7bd1f22625a972c0e1a468bc1da |
|
MD5 | 1c5722b1a3a4301ff2c1e8777496b5c5 |
|
BLAKE2b-256 | 6c70a0c628aac334dd6793e2fa35d7642b7895b742dafa6630ef40d2a4607f46 |