4.2.1. Persistence package

4.2.1.1. Submodules

4.2.1.2. 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

Parameters:
  • 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.

4.2.1.3. Persistence.Serializable module

class Persistence.Serializable.Serializable[source]

Bases: object

static deserialize(serial)[source]
serialize()[source]

4.2.1.4. 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 ”.”

4.2.1.5. Module contents