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.0a28.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a73a4d0c4f820509e992abec326e1203519e880837c07eef84a2f5e600c82b5 |
|
MD5 | 76e15a9edf230deea3183fd372d197ee |
|
BLAKE2b-256 | b77da5dd7acb69d4ec70ff7506df3f42df1c50d4471d3c7c88b47c8f42396414 |
Close
Hashes for polywrap_msgpack-0.1.0a28-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cfae5da732c219648b391ed3835715c03f510bd7d96045916f1d1f0e42a38a4 |
|
MD5 | eee25190977d16a67809de61662c6de2 |
|
BLAKE2b-256 | 3b2c5a49aed2270f2a1cb7d5291e1dc19b79adae870ed07462b786e44584bca0 |