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.0a26.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ef682e1b0f2522e9526ea5c52d43682524105e3a6b9d9b764db98447f608250 |
|
MD5 | 0f4eb8caad803dcc5cd3c83f92cb20e1 |
|
BLAKE2b-256 | 1f2077e1ecb67abb38ea0115db2ae3282fe8537f5808703e0c09b2b046351aba |
Close
Hashes for polywrap_msgpack-0.1.0a26-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97b4517b28b55e81712d5c8f5813f39df668ed6d1be04a446a238adc9f814dcb |
|
MD5 | 9e8f7e19e5ba05277617809a68cdb1d1 |
|
BLAKE2b-256 | 030de3f0084808a62f1107edbe84843ffb86c341cb3f50f95cc140b231c62c0b |