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.0a16.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3f60252f4f3415c7356ab183275197330265e755d8eec71f05e4bccbca01470 |
|
MD5 | 79efb27ac9b6046bbdc5890c78837019 |
|
BLAKE2b-256 | ed93c97ffaf2a8b7601cd27ec1d672b5c111658a331b7b1d9c22dc943b950d5e |
Close
Hashes for polywrap_msgpack-0.1.0a16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 155b6f68ad668edef1df8172e7f765e883dec38172e2e3022d20ec5027fe9cbb |
|
MD5 | 82239152d8d70a9a5c64f3d92fa46d28 |
|
BLAKE2b-256 | c02794b9784ca5f279b6b397707fdc2c13e8636f442964fa7b19f7df46ef6066 |