Skip to content

Support of pickle serialization of Cython objects in python API #10

@ghost

Description

Serialization is used to transfer objects between processes, nodes, or even between windows and linux. It is also widely used in parallel program design. However, the cython objects such as ct.Solution and ct.Reaction cannot be serialized due to lack of serialization support.

refer to https://snorfalorpagus.net/blog/2016/04/16/pickling-cython-classes/. It seems simple to support serialization in python using pickle.

I tried to use monkey patching to assign __reduce__() method to Reaction object, but it is forbidden by python. So I think it is better to be implemented in cython layer.

Think about this scenario: I can save the Solution object or even FreeFlame object to a *.pkl file in Linux and send it to someone or forum. The receiver can simply load it in Windows and help me to check what is going wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions