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.0a17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f6e9eab886efe9097403ce3d4210ba306a28cc4c5a24e1abdea6ddc8705b210 |
|
MD5 | a6f795e1de190168771b66392a6f0eef |
|
BLAKE2b-256 | f069b843f9f377bbfdd4ae66e1666bc1f6f8fa2a3b88e8daea10bb8b9a6501d5 |
Close
Hashes for polywrap_msgpack-0.1.0a17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71272bac88323c93cbbb50fccaaf2782fa661d8c9c755f5f000298ab69cfd56d |
|
MD5 | 034aa2a03a8ef3bec82dbc1be9a23911 |
|
BLAKE2b-256 | 1084425068d35c0a38be9ecba7a79af0fa07a0f6d7310edcda10ed456689ba64 |