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.0a30.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b1856b945a301b6734f790efe9a7f62908850a13d6824010fff56b0dd2c5268 |
|
MD5 | b363b8c4c7fdee855cff35d3f089fa9d |
|
BLAKE2b-256 | 2cb9140a07c7d592cc8dd9af796124ade791681a802c697434390d5603d7c6c3 |
Close
Hashes for polywrap_msgpack-0.1.0a30-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bff6546ac0915e01d6bbedec35980e3a3b07124672392527f9b445a0a2e6963e |
|
MD5 | 61104174d99d41a204976ad0339f4c00 |
|
BLAKE2b-256 | 93786e46867169401aea7d0461e40f62375dd080157eb005e16a892b5753eb1d |