plumpy.mixins module¶
-
class
plumpy.mixins.
ContextMixin
(*args: Any, **kwargs: Any)[source]¶ Bases:
plumpy.persistence.Savable
Add a context to a Process. The contents of the context will be saved in the instance state unlike standard instance variables.
-
property
ctx
¶
-
load_instance_state
(saved_state: MutableMapping[str, Any], load_context: plumpy.persistence.LoadSaveContext) → None[source]¶
-
save_instance_state
(out_state: MutableMapping[str, Any], save_context: Optional[plumpy.persistence.LoadSaveContext]) → None[source]¶ Add the instance state to
out_state
. .. important:The instance state will contain a pointer to the ``ctx``, and so should be deep copied or serialised before persisting.
-
property