serialize: Support serialization of “simple” types

serialize: Support serialization of “simple” types

Provide object serialization and deserialization for simple Python objects. In this case, simple means numbers (int, float, numpy arrays), strings, bytes, booleans, and non-recursive tuples, lists, sets, and dictionaries. Recursive data-structures are not checked for and thus can cause an infinite loop. Arbitrary Python objects are not allowed.

Version 3 of the protocol supports instances of the following types:

bool; int; float; complex; numpy ndarray; str; bytes; bytearray; type(None); set; frozenset; dict; collectionsOrderedDict, and deque; datetime’s datetime, timezone; and timedelta; PIL.Image.Image; tinyarray, ndarray_int, ndarray_float, ndarray_complex

pickle_deserialize(stream)

Experimental API . Recover object from a binary stream