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.0a20.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9005ec3b6b3a7b6738e8bf7afb02880d685ff9c9676e8b938d7c394d1297dc45 |
|
MD5 | d6cfce054f1991021d23751091bed97c |
|
BLAKE2b-256 | 48b0a37c249e4b4e90f01820fc0633159dfff3fd3f3668beace95e50422cb2fc |
Close
Hashes for polywrap_msgpack-0.1.0a20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d891fbb6dc86eb9f38dd4c66ef27f54fc545137ed1636522e628231bf121a9ee |
|
MD5 | 69092abff0623ae355c553646c107890 |
|
BLAKE2b-256 | a18a8d5c1bea88149bb037c70b42ecc9752bff951557c3cd6e10d1efd50a3ca8 |