Start of python serialization.