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.0a15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d35ef8e2b749bfe42058fcf29bd70866f11657ebfa38c22b74bebe725eab2dd5 |
|
MD5 | 64662d907c7917d972f8f39dbff5b4dc |
|
BLAKE2b-256 | 3d533b9f583fa3f41594aec4504e76c86797e83c2d3e891d8d8d749135d24dcb |
Close
Hashes for polywrap_msgpack-0.1.0a15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6defd861332337d6d26b02af4eecb00ad6556e94d6812cd3df7f368a410e1e56 |
|
MD5 | d0067c9280f86faf1d5ba0a39327b198 |
|
BLAKE2b-256 | 9a7738c7995ca90dc2f3d09def4b3ea2881da7244d960f39fbab7e250aa6a2b7 |