Types
Base
Bases: Struct
Base class for AniList data structures.
from_dict
classmethod
Create an instance of this class from a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
dict[str, Any]
|
Dictionary representing the instance of this class. |
required |
Returns:
Type | Description |
---|---|
Self
|
An instance of this class. |
Source code in src/seadex/_types.py
from_json
classmethod
Create an instance of this class from JSON data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
str | bytes
|
JSON data representing the instance of this class. |
required |
Returns:
Type | Description |
---|---|
Self
|
An instance of this class. |
Source code in src/seadex/_types.py
to_dict
to_json
Serialize the instance of this class into a JSON string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
indent
|
int
|
Number of spaces for indentation. Set to 0 for a single line with spacing, or negative to minimize size by removing extra whitespace. |
2
|
Returns:
Type | Description |
---|---|
str
|
JSON string representing this class. |
Source code in src/seadex/_types.py
BackupFile
Bases: Base
Represents a backup file.
from_dict
classmethod
Create an instance of this class from a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
dict[str, Any]
|
Dictionary representing the instance of this class. |
required |
Returns:
Type | Description |
---|---|
Self
|
An instance of this class. |
Source code in src/seadex/_backup.py
EntryRecord
Bases: Base
Represents a single anime entry in SeaDex.
collection_name
instance-attribute
collection_name: str
The name of the collection the entry belongs to.
size
instance-attribute
size: int
The total size of the entry, calculated by summing the sizes of all files in all torrents.
theoretical_best
instance-attribute
theoretical_best: str | None
The theoretical best release for the entry, if known.
torrents
instance-attribute
torrents: tuple[TorrentRecord, ...]
A tuple of TorrentRecord
objects associated with the entry.
updated_at
instance-attribute
updated_at: datetime
The timestamp of when the entry was last updated.
from_dict
classmethod
Create an instance of this class from a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
dict[str, Any]
|
Dictionary representing the instance of this class. |
required |
Returns:
Type | Description |
---|---|
Self
|
An instance of this class. |
Source code in src/seadex/_types.py
TorrentRecord
Bases: Base
Represents a single torrent record within a SeaDex entry.
collection_id
instance-attribute
collection_id: str
The ID of the collection the torrent record belongs to.
collection_name
instance-attribute
collection_name: str
The name of the collection the torrent record belongs to.
created_at
instance-attribute
created_at: datetime
The timestamp of when the torrent record was created.
files
instance-attribute
A tuple of File
objects representing the files in the torrent.
infohash
instance-attribute
infohash: str | None
The infohash of the torrent if available, otherwise None
(private torrents).
is_dual_audio
instance-attribute
is_dual_audio: bool
Whether the torrent contains both Japanese and English audio tracks.
release_group
instance-attribute
release_group: str
The name of the group that released the torrent.
size
instance-attribute
size: int
The total size of the torrent, calculated by summing the sizes of all files.
updated_at
instance-attribute
updated_at: datetime
The timestamp of when the torrent record was last updated.
from_dict
classmethod
Create an instance of this class from a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
dict[str, Any]
|
Dictionary representing the instance of this class. |
required |
Returns:
Type | Description |
---|---|
Self
|
An instance of this class. |