September 2026
1051 pages
35h 4m
English
The pickle module provides functionality for serializing objects. Serialization means that a bytes object is created that stores all the information of the object so that it can be reconstructed later by a process referred to as deserializing.
Especially for storing Python instances into files or for transferring them, such as via a network connection, pickle is well suited. The following data types can be serialized or deserialized using pickle:
None, True, False
Numeric data types (int, float, complex, bool)
str, bytes
Sequential data types (tuple, list), sets (set, frozenset), and dictionaries (dict), so long as all their elements can also be serialized by pickle
Global functions
Built-in ...
Read now
Unlock full access