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.0a24.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a43e2271d8b038817c262d9db51cb8ebd610aeb5e91e4b7a1af828ed3d065e45 |
|
MD5 | 4d335e9e4bafc71c9a31d33e1de10c59 |
|
BLAKE2b-256 | ffb49d1bcd98e710c4299de40f8b6261a1456289027209e260394586f556642d |
Close
Hashes for polywrap_msgpack-0.1.0a24-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b96cbdf73788b676e3c95cf22f09ac2ac1061fef0dc5375f05f74811abdd70b |
|
MD5 | eb5eca81eab04aa0d17c26e80f671f86 |
|
BLAKE2b-256 | 9f92c0cd3fbe90bbc2aa5718c45be5078d6487cfb1a2caf56a0720fdec0cc554 |