pickle

Create portable serialized representations of Python objects.

See module cPickle for a (much) faster implementation. See module copy_reg for a mechanism for registering custom picklers. See module pickletools source for extensive comments.

Classes:

Pickler Unpickler

Functions:

dump(object, file) dumps(object) -> string load(file) -> object loads(string) -> object

Misc variables:

__version__ format_version compatible_formats

Functions

StringIO StringIO([s]) – Return a StringIO-like stream for reading or writing
decode_long(data) Decode a long from a two’s complement little-endian binary string.
dump(obj, file[, protocol])
dumps(obj[, protocol])
encode_long(x) Encode a long to a two’s complement little-endian binary string.
load(file)
loads(str)
mloads(string) Convert the string to a value.
whichmodule(func, funcname) Figure out the module in which a function occurs.

Classes

BooleanType alias of bool
BufferType alias of buffer
BuiltinFunctionType alias of builtin_function_or_method
BuiltinMethodType alias of builtin_function_or_method
ClassType alias of classobj
CodeType alias of code
ComplexType alias of complex
DictProxyType alias of dictproxy
DictType alias of dict
DictionaryType alias of dict
EllipsisType alias of ellipsis
FileType alias of file
FloatType alias of float
FrameType alias of frame
FunctionType alias of function
GeneratorType alias of generator
GetSetDescriptorType alias of getset_descriptor
InstanceType alias of instance
IntType alias of int
LambdaType alias of function
ListType alias of list
LongType alias of long
MemberDescriptorType alias of member_descriptor
MethodType alias of instancemethod
ModuleType alias of module
NoneType
NotImplementedType
ObjectType alias of object
Pickler(file[, protocol])
SliceType alias of slice
StringType alias of str
TracebackType alias of traceback
TupleType alias of tuple
TypeType alias of type
UnboundMethodType alias of instancemethod
UnicodeType alias of unicode
Unpickler(file)
XRangeType alias of xrange

Exceptions

PickleError A common base class for the other pickling exceptions.
PicklingError This exception is raised when an unpicklable object is passed to the dump() method.
UnpicklingError This exception is raised when there is a problem unpickling an object, such as a security violation.