Entry
SeaDexEntry
SeaDexEntry(
base_url: str = "https://releases.moe",
client: Client | None = None,
)
Client to interact with SeaDex entries.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
base_url
|
str
|
The base URL of SeaDex, used for constructing API queries. |
'https://releases.moe'
|
client
|
Client
|
An httpx.Client instance used to make requests to SeaDex. |
None
|
Examples:
with SeaDexEntry() as entry:
tamako = entry.from_title("tamako love story")
for torrent in tamako.torrents:
if torrent.is_best and torrent.tracker.is_public():
print(torrent.release_group)
#> LYS1TH3A
#> Okay-Subs
Source code in src/seadex/_entry.py
close
from_filename
from_filename(filename: StrPath) -> Iterator[EntryRecord]
Yield entries that contain a torrent with the specified filename.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename
|
StrPath
|
The filename to search for. |
required |
Yields:
Type | Description |
---|---|
EntryRecord
|
The retrieved entry. |
Source code in src/seadex/_entry.py
from_filter
from_filter(filter: str) -> Iterator[EntryRecord]
Yield entries from SeaDex that match the given filter expression.
Refer to the filter
argument in the PocketBase API documentation
for details on constructing valid filter expressions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filter
|
str
|
The filter expression. |
required |
Yields:
Type | Description |
---|---|
EntryRecord
|
The retrieved entry. |
Raises:
Type | Description |
---|---|
TypeError
|
If |
Source code in src/seadex/_entry.py
from_id
from_id(id: int | str) -> EntryRecord
Retrieve an entry by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
int | str
|
The ID of the entry. Can be an AniList ID (integer) or a SeaDex database ID (string). |
required |
Returns:
Type | Description |
---|---|
EntryRecord
|
The retrieved entry. |
Raises:
Type | Description |
---|---|
EntryNotFoundError
|
If no entry is found for the provided ID. |
Source code in src/seadex/_entry.py
from_infohash
from_infohash(infohash: str) -> Iterator[EntryRecord]
Yield entries that contain a torrent with the specified infohash.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
infohash
|
str
|
The infohash to search for. |
required |
Yields:
Type | Description |
---|---|
EntryRecord
|
The retrieved entry. |
Raises:
Type | Description |
---|---|
TypeError
|
If |
ValueError
|
If |
Source code in src/seadex/_entry.py
from_title
from_title(title: str) -> EntryRecord
Retrieve an entry by its anime title.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title
|
str
|
The title of the anime to search for. |
required |
Returns:
Type | Description |
---|---|
EntryRecord
|
The retrieved entry. |
Raises:
Type | Description |
---|---|
EntryNotFoundError
|
If no entry is found for the provided title. |
Source code in src/seadex/_entry.py
iterator
iterator() -> Iterator[EntryRecord]
Lazily iterate over all the entries in SeaDex.
Yields:
Type | Description |
---|---|
EntryRecord
|
The retrieved entry. |