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.0a35.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c53b25b9027a29904d7fa23504d960deebb817c05eeebd588cf085e16e3e6d75 |
|
MD5 | 2ac9951b27f4e8ba9ea2be0c6ae9c2db |
|
BLAKE2b-256 | 69dfeb9db5a5f4c8741fa53886013213bb5dd2ddb8012a1315f1c609b9251ef1 |
Close
Hashes for polywrap_msgpack-0.1.0a35-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d466570d181958c59fcd42106153d0d6444cac20bf5eb1b00dab6c5d1a1228a7 |
|
MD5 | 1308d99d3ba96ec87e17bd75019d9163 |
|
BLAKE2b-256 | d70dcf3c9869a2abd7c235b5b5e2a57c64d0667b42a53e9f3adac4d070112a5e |