classPackFormat#

class PackFormat#

Reads one archive format. Subclass it and register it to add another.

name#

The format’s name.

Type:

ClassVar[str]

index_file#

The file in the archive that identifies this format.

Type:

ClassVar[str]

abstractmethod parse(
index: dict[str, Any],
path: Path,
) → Modpack#

Build a Modpack from the archive’s decoded index file.

Parameters:
  • index (dict[str, Any]) – The decoded index file.

  • path (Path) – The archive.

Returns:

The modpack.

Raises:

PackError – The index is invalid.

Return type:

Modpack