4.2.1. Persistence package Submodules Persistence.Savable module

class Persistence.Savable.Savable[source]

Bases: Serializable.Serializable

An object that can be saved and loaded in the file system.

classmethod load(base_path, file_name, object_class)[source]

Recreate an object from the file

  • base_path (str) – The path of the directory containing the file.
  • file_name (str) – The name of the file to load.
  • object_class (class) – The class of the object to recreate.
save(base_path, file_name)[source]

Save the object in the file system. Persistence.Serializable module

class Persistence.Serializable.Serializable[source]

Bases: object

static deserialize(serial)[source]
serialize()[source] Persistence.Utils module

class Persistence.Utils.Utils[source]

Bases: object

Useful functions.

static valid_name(s)[source]

Transform a string in order to get a valid filename

This method may produce invalid filenames such as ”.” Module contents