{"repo":"msgpack/msgpack-python","free":true,"listed":false,"github":"https://github.com/msgpack/msgpack-python","clone":"git clone https://github.com/msgpack/msgpack-python.git","description":"MessagePack serializer implementation for Python msgpack.org[Python]","language":"Python","stars":2101,"topics":["python","msgpack"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"MessagePack for Python What is this? MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON. But it's faster and smaller. This package provides CPython bindings for reading and writing MessagePack data. Install Pure Python implementation The extension module in msgpack ( msgpack. cmsgpack ) does not support PyPy. But msgpack provides a pure Python implementation ( msgpack.fallback ) for PyPy. Windows If you can't use a binary distribution, you need to install Visual Studio or the Windows SDK on Windows. Without the extension, the pure Python implementation on CPython runs slowly. How to use One-shot pack & unpack Use packb for packing and unpackb for unpacking. msgpack provides dumps and loads as aliases for compatibility with json and pickle . pack and dump pack to a file-like object. unpack and load unpack from a file-like object. Read the docstring for options. Streaming unpacking Unpacker is a \"streaming unpacker\". It unpacks multiple objects from one stream (or from bytes provided through its feed method). [!IMPORTANT] If Unpacker.unpack() stops with an exception other than OutOfData , that Unpacker cannot be reused. Create a new Unpacker when reading another stream. Packing/unpacking of custom data types It is also possible to pack/unpack custom data types. Here is an example for datetime.datetime . Unpacker 's object hook callback receives a dict; the object pairs hook callback may instead be used to receiv","default_branch":null,"files":null,"tree":[],"storefront":"/r/msgpack","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/msgpack/msgpack-python/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}