About Dill

dill extends python’s pickle module for serializing and de-serializing
python objects to the majority of the built-in python types. Serialization
is the process of converting an object to a byte stream, and the inverse
of which is converting a byte stream back to on python object hierarchy.

dill provides the user the same interface as the pickle module, and
also includes some additional features. In addition to pickling python
objects, dill provides the ability to save the state of an interpreter
session in a single command. Hence, it would be feasable to save a
interpreter session, close the interpreter, ship the pickled file to
another computer, open a new interpreter, unpickle the session and
thus continue from the ‘saved’ state of the original interpreter
session.

dill can be used to store python objects to a file, but the primary
usage is to send python objects across the network as a byte stream.
dill is quite flexible, and allows arbitrary user defined classes
and functions to be serialized. Thus dill is not intended to be
secure against erroneously or maliciously constructed data. It is
left to the user to decide whether the data they unpickle is from
a trustworthy source.

More Information

Probably the best way to get started is to look at the tests that are
provided within dill. See dill.tests for a set of scripts that demonstrate
how dill can serialize different python objects. Since dill conforms
to the pickle interface, the examples and documentation at
http://docs.python.org/library/pickle.html also apply to dill if one will
import dill as pickle. The source code is also generally well
documented, so further questions may be resolved by inspecting the code
itself. Please also feel free to submit a ticket on github, or ask a
question on stackoverflow (@Mike McKerns).

dill is an active research tool. There are a growing number of publications
and presentations that discuss real-world examples and new features of dill
in greater detail than presented in the user’s guide. If you would like to
share how you use dill in your work, please post a link or send an email
(to mmckerns at uqfoundation dot org).

Citation

If you use dill to do research that leads to publication, we ask that you
acknowledge use of dill by citing the following in your publication: