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.0a23.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4b86a8bc2825772d0cf743f88442e3d8ab0dd967fbf0b45df2410874147e117 |
|
MD5 | a3e144464f21cd6ebb1c49e463f80ffd |
|
BLAKE2b-256 | e3da36a753d1a24dbdce258c69e7a41221b6aa643e31f76bb94308cab135c2e8 |
Close
Hashes for polywrap_msgpack-0.1.0a23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff9082b68e984224b1b6b29f494daf5ff971930660c90fc76841189bae49fadf |
|
MD5 | ea41c0d94ce2c18bde0ef97d94b5bc55 |
|
BLAKE2b-256 | 2496350d8a2045ed66df3483553776872525b974cffb39f563dda9994291e8f0 |