pickle.dumps(obj) -> bytesReturn the pickled representation of an object as a bytes object.
pickle.loads(b: bytes)Return the unpickled object from a bytes object.
The following types can be pickled:
Cyclic and shared references are preserved: list, dict and instances of
python classes are memoized before their contents are written, so an object
graph containing reference cycles round-trips correctly and object identity
is retained. A cycle that passes only through a tuple or through a
__reduce__ result is not supported.
The following magic methods are available:
__getnewargs____getstate____setstate____reduce__