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.0a33.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 082042bd02844437abc3f8be90e8a7a6ebf889d9f7e2d2d3ef5fd45f2a5c863e |
|
MD5 | 6a1458a2528e22c051e4f930e1253a5d |
|
BLAKE2b-256 | d1bb4c8eacdf61d3704153bbd457a10f11b301664339507519f9b914294c26ad |
Close
Hashes for polywrap_msgpack-0.1.0a33-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78ce2ab4bb8358bd5acc1729bc93156980691bce66c663fcb93bc6a872ad583a |
|
MD5 | 57b6d3c8b200798585a47cec3bd92be2 |
|
BLAKE2b-256 | e4e65f2da1057849e4d435907053d90222ed1d5ea2aeb8a128467b5edeb5f476 |