Models
Modfile
A single file entry within a modpack.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
Remote download URL for the file. |
filename |
str
|
Bare filename (no directory component) used when writing to disk. |
size |
int
|
Expected file size in bytes, as declared in the modpack index. |
hash |
str | None
|
Optional expected hex digest. Verified after download; raises
:exc: |
hash_type |
Literal['sha512', 'sha1'] | None
|
The type of said hash, e.g: |
optional |
bool
|
Whether this mod is optional. |
side |
Literal['client', 'server', 'both']
|
Whether the mod is client-side, server-side, or both. |
Source code in packlayer/domain/models.py
Override
A non-mod file to be written into the instance directory after installation.
Overrides cover anything outside mods/ — configs, scripts, resource packs,
shader settings, etc. The content is either bundled inline (data) or fetched
from a remote URL (url); exactly one should be set.
Attributes:
| Name | Type | Description |
|---|---|---|
path |
str
|
Destination path relative to the instance root (e.g. |
side |
Literal['client', 'server', 'both']
|
Which side this override applies to. Overrides incompatible with the
chosen :class: |
data |
bytes | None
|
Raw file contents to write directly to disk. Set by resolvers that
bundle overrides inside the package itself (e.g. |
url |
str | None
|
Remote URL to fetch the file from. Set by resolvers where override
files are hosted separately (e.g. FTB). Mutually exclusive with |
Source code in packlayer/domain/models.py
Modpack
A resolved modpack ready for installation.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Human-readable display name of the modpack. |
version |
str
|
Version identifier string (e.g. |
minecraft_version |
str
|
The Minecraft version this modpack targets (e.g. |
files |
tuple[ModFile, ...]
|
Immutable sequence of [ |
overrides |
tuple[Override, ...]
|
Immutable sequence of [ |
Source code in packlayer/domain/models.py
ModpackVersion
Metadata for a single releasable version of a modpack.
Returned by [list_versions][packlayer.PacklayerClient.list_versions]. Use
version_number to pin a specific release when calling
[resolve][packlayer.PacklayerClient.resolve].
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Opaque provider-assigned identifier for this version. |
version_number |
str
|
Human-readable version string (e.g. |
name |
str
|
Display name of the release (may differ from |
loaders |
tuple[str, ...]
|
Mod loaders this version supports (e.g. |
game_versions |
tuple[str, ...]
|
Minecraft versions this release is compatible with
(e.g. |
date_published |
str
|
ISO 8601 timestamp of when this version was published
(e.g. |
Source code in packlayer/domain/models.py
InstallOptions
Controls which files are downloaded during installation.
Attributes:
| Name | Type | Description |
|---|---|---|
include_optional |
bool
|
If |
side |
Literal['client', 'server', 'both']
|
Which side to install for. Files incompatible with the chosen side
are skipped. Defaults to |