mangoes.utils.persist module

Utility functions to save mangoes objects

mangoes.utils.persist.save(obj, attributes_to_persist, path, metadata=None)

Save the object at the given path

Parameters
obj

object to persists

attributes_to_persist: list

list o the names of the attributes of the object to persist

path: str

path to a folder or an archive where the object will be stored

metadata: dict

metadata to store in a .metadata file with the objects

Returns
str

path to a folder or an archive

mangoes.utils.persist.load(cls, attributes_to_persist, path)

Load an object from the given path

Parameters
path: str

path to a folder or an archive

Returns
object of type cls