pickle.dump(object,file,protocol)
: serialize an objectpickle.load(file)
: de-serialize an objectpickle.dumps(object, protocol)
: serialize an object to bytespickle.loads(buffer)
: de-serialize an object from bytesobject
: the object which is to be stored |file
: the open file which will contain the objectprotocol
: the protocol used for pickling the object (optional parameter)buffer
: a bytes object that contains a serialized object|The following objects are picklable.
None
, True
, and False
tuple
s, list
s, set
s, and dict
s containing only picklable objects__dict__
or the result of calling __getstate__()
is picklable (see the official docs for details).