u-msgpack-python is a lightweight MessagePack serializer and deserializer module written entirely in pure Python. It is compatible with both Python 2 and 3, as well as CPython and PyPy implementations, and fully complies with the latest MessagePack specification, including support for binary, UTF-8 string, application-defined ext, and timestamp types. The current version is 2.8.0, with releases occurring a few times per year to maintain compliance and add features.
pip install u-msgpack-pythonVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to pack Python objects into MessagePack bytes and unpack them. It also shows an example of streaming serialization and deserialization using file-like objects for multiple MessagePack objects.
Explicitly choose `u-msgpack-python` for a pure Python solution or `msgpack` for C extensions. Review the documentation for the chosen library to understand its specific behavior, especially concerning string/binary types and old MessagePack specification compatibility.
Set `umsgpack.compatibility = True` before packing/unpacking if you need to serialize both unicode strings and bytes into the old 'raw' type, or deserialize 'raw' into bytes. Be aware this is a global module setting.
Only use `force_float_precision='single'` when explicitly intending to reduce float precision for storage efficiency, and understand the implications. Otherwise, omit this option to retain default precision.
No dependency data recorded yet.