Python has pickle and cPickle modules for Python object serialization. Both of these modules provide functionality to serialize/deserialize Python object hierarchy to convert to/from a byte stream:
- https://docs.python.org/library/pickle.html
The following provides similar interface: pickle(), unpickle() for serialization to/from XML
- http://code.activestate.com/recipes/355487/