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.0a34.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c373dc94ed04f64b9f9c889aa817e6eb6801501ac86a821ca5449a434e695e05 |
|
MD5 | 2b5e8b1f8a9c919e51d03d57ef3c439f |
|
BLAKE2b-256 | a1ade8bc34b07904c1df2b90ebe2173802f7d0f1d151cca69152c22e484f8d83 |
Close
Hashes for polywrap_msgpack-0.1.0a34-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9755b3f32efb5180961fb1b7d7ded94218790368457f78651b09a2a46aaec9f1 |
|
MD5 | a1b5b59b8d5bfeff903d24657f82a9e6 |
|
BLAKE2b-256 | 85201f466bfc02a7b5b9c3b27a0ae3cbf8b80fdf7a126ab8d3cfd4bde8907876 |