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.0a18.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81aa6c2ae507f35667849c2c9a36beb0311685c5e206659587d35ef89e94fab9 |
|
MD5 | 9f71f0df993b3c9def1075d9aac89b48 |
|
BLAKE2b-256 | a17619c899b673980f2389ef7ab381820d7628e9618cc37ab96a41f614ccf3bb |
Close
Hashes for polywrap_msgpack-0.1.0a18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50e7366a7812695e49cd51bd7fbce366bf63b29b8cd29a7fc39c5d01b635e846 |
|
MD5 | f4fbde0907311957a7a3e09f57178909 |
|
BLAKE2b-256 | 1a4603014a1feb9399eb441580bf78073dc4d207e6eb57b5e02380392243a9a0 |