binary serialization for python objects