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.0a31.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c152d34ee3494a74df39ccb121fb0258ef8414d2b5f6d686dca18e02d736b1d9 |
|
MD5 | 545006e3e989268c4b7767e82a7dd566 |
|
BLAKE2b-256 | fe441cf61853e6c58ec488e67067aa2de177f1259f1003663fad82ae388b7a75 |
Close
Hashes for polywrap_msgpack-0.1.0a31-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f95141f1fc839ecb6a64a4043f6ef3b94a11605cc445da749b631991c450d61c |
|
MD5 | 63c1d0ae8593e1faefe0977f3572f4e6 |
|
BLAKE2b-256 | d96eebcdb4b395b23d152c3f53814de123cf02d07af0fe697956a1ad8b79cc33 |