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.0a21.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e9b655093f29d09065af52d8b45e9bd54d1bbf9fc221cb80a5fd4fe36a76e97 |
|
MD5 | 6300b5848fafcb992467c055875ad1a2 |
|
BLAKE2b-256 | 747027c08738023b1393724b5bbd04b9ec1a16b39db5faa93de0bc49c2db39a2 |
Close
Hashes for polywrap_msgpack-0.1.0a21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f076e80a58a8be0df087761fbed3fe0d21ec24996b4c2851b55c39186965b0a4 |
|
MD5 | 037b87564fba773286f718d9b89f880d |
|
BLAKE2b-256 | bd09c4e641912a95c70cf38ad6a34ec3b119954fb2c0156877387e852d85dad1 |