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.0a27.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00ba2e74329c9b97c158ef96d711d171a1edc550e67c9f0321054cd97ccc8c8f |
|
MD5 | a74e8445e173bb73ac89ea677eaa9ad8 |
|
BLAKE2b-256 | 753f4fda8ae0c04dc030c2a0f0b3a098e6586c4ed552cdd1bc8a9572605ed19e |
Close
Hashes for polywrap_msgpack-0.1.0a27-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 487548ab7c0eb97658d849df7afa291a807efbb4310dcbc4cdbee850f5af365e |
|
MD5 | 267e16e32b704f763ae3c7bcaa88be7a |
|
BLAKE2b-256 | 2378942b2ac34e1e8b3e0d1b4f4affc4f3998894b9ae546a65bac545aa82881f |