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.0a32.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20852e199c999c6249c37b6af80ca18036dcaa945b84f0affe1ab5765072f611 |
|
MD5 | feb8e50b1303263d7cd36ebf961726c6 |
|
BLAKE2b-256 | 9d3e21312ae4ffd8d4b6c07df044f77acbe1ce07378f622355335fe71b00ad68 |
Close
Hashes for polywrap_msgpack-0.1.0a32-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40b0e84915c25e4539ec323f9786cb3f587ee4c18bae09a1c412cad0b8eccec3 |
|
MD5 | d55c9262349a4d094f915bfdd7a6a2ed |
|
BLAKE2b-256 | 456901941d246fb828ea6f04adb687b7f117bd809b7f4f60392d3a216eb7100d |