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.0a22.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f77c8ff24a04c8185009bedc53ae2ce171d1bf8895f78460167817369a08bf7 |
|
MD5 | cfde5c1e93f182c1a111b049eb095240 |
|
BLAKE2b-256 | 28300a3690d00d670c86015a5fd9ac48ed9c26ec8f73277f842a470d75853c51 |
Close
Hashes for polywrap_msgpack-0.1.0a22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d58170ec795a096c43fdf650d787931885819a028ad887e7256d84154bd74fb |
|
MD5 | fa298aff720e2196dd976ed53135d125 |
|
BLAKE2b-256 | 3bff5e1b180e333645f61bf101b4eb7eaaf393e91d6176657ff316c74e33353e |