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.0a29.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 286c93c3bdc97c18c5afcd8be93b286012ffb937d75f15336f6293b632070c89 |
|
MD5 | d557c8ec04783222b0ff3d7b8d5de92e |
|
BLAKE2b-256 | 14b11c4ad8c5dab4b2d96977515b57c4ca92bdd7b3c785a4f2ce1b2e03b96aef |
Close
Hashes for polywrap_msgpack-0.1.0a29-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 898af76cb278630c0e826ffd1052d9cc1fa832082046ebf8d96f9eddacba7ba1 |
|
MD5 | 9dfc1da2614dfa50b3b5042a2cc68dd0 |
|
BLAKE2b-256 | 2ebf9beb646fa2e7f6f1b47f185b5c84c990d7e7a9bf8aa678ca0f11767bd7a2 |