Python's marshal module provides a serialization protocol for Python objects. It provides functionality for writing/reading Python objects in a binary format. This module is used by other Python components, for example, in .pyc files (pseudo-compiled Python code). But Python also has public API to access this serialization protocol.