pytower.backup

class pytower.backup.BackupIndex(data=None)[source]

Data structure used internally to represent information about each backup

Parameters:

data (dict[str, Any] | None)

__init__(data=None)[source]
Parameters:

data (dict[str, Any] | None)

filename: str[source]
original_path: str[source]
pytower_version: str[source]
resources: dict[str, str][source]
to_dict()[source]
pytower.backup.fix_canvases(path, force_reupload=False, backend=<pytower.image_backends.catbox.CatboxBackend object>)[source]
Parameters:
pytower.backup.make_backup(save)[source]

Given a Suitebro save, creates a new backup

Parameters:

save (Suitebro) – Suitebro object to make a backup of

Return type:

str

Returns:

Path to backup directory, containing the save and its resource assets

pytower.backup.restore_backup(path, force_reupload=False, backend=<pytower.image_backends.catbox.CatboxBackend object>)[source]

Restores a backup from the backups folder

Parameters:
  • path (str) – Path to the backup

  • force_reupload (bool) – Whether to force reuploading files to backend

  • backend (ResourceBackend) – Backend to use (Catbox by default)