animedex.backends.kitsu
High-level Kitsu Python API.
Wraps the eight most-used anonymous JSON:API endpoints on
kitsu.io/api/edge with typed BackendRichModel-backed
return shapes.
Kitsu serves both anime and manga catalogues plus a streaming-link
rail and a cross-source mapping table (anilist / mal / anidb / kitsu).
The mapping endpoint is the cheapest way to convert an upstream ID
to its peers, so a downstream pipeline can fan out to any other
backend without reading the same ID from each upstream in turn.
show
-
animedex.backends.kitsu.show(id: int, *, config: Config | None = None, **kw) → KitsuAnime[source]
Fetch one anime by its Kitsu numeric ID via /anime/{id}.
- Parameters:
id (int) – Kitsu anime ID (the int that appears in
kitsu.io/anime/<slug> URLs after the slug
resolves; numeric only).
- Returns:
Typed anime resource, lossless against the upstream
JSON:API data block.
- Return type:
KitsuAnime
search
-
animedex.backends.kitsu.search(q: str, *, limit: int = 10, page: int = 0, config: Config | None = None, **kw) → List[KitsuAnime][source]
Free-text anime search via /anime?filter[text]=<q>.
- Parameters:
-
- Returns:
List of typed anime resources.
- Return type:
list[KitsuAnime]
mappings
-
animedex.backends.kitsu.mappings(id: int, *, config: Config | None = None, **kw) → List[KitsuMapping][source]
Cross-source ID map for an anime via /anime/{id}/mappings.
Each row carries an externalSite (e.g. "myanimelist/anime",
"anilist/anime", "anidb", "thetvdb/series") and an
externalId so a downstream pipeline can fan out across
upstream catalogues.
- Parameters:
id (int) – Kitsu anime ID.
- Returns:
List of typed mapping resources.
- Return type:
list[KitsuMapping]
trending
-
animedex.backends.kitsu.trending(*, limit: int = 10, config: Config | None = None, **kw) → List[KitsuAnime][source]
The /trending/anime rail, evaluated server-side.
- Parameters:
limit (int) – Max rows to return (defaults to 10).
- Returns:
List of typed anime resources.
- Return type:
list[KitsuAnime]
manga_show
-
animedex.backends.kitsu.manga_show(id: int, *, config: Config | None = None, **kw) → KitsuManga[source]
Fetch one manga by its Kitsu numeric ID via /manga/{id}.
- Parameters:
id (int) – Kitsu manga ID.
- Returns:
Typed manga resource.
- Return type:
KitsuManga
manga_search
-
animedex.backends.kitsu.manga_search(q: str, *, limit: int = 10, page: int = 0, config: Config | None = None, **kw) → List[KitsuManga][source]
Free-text manga search via /manga?filter[text]=<q>.
- Parameters:
-
- Returns:
List of typed manga resources.
- Return type:
list[KitsuManga]
categories
-
animedex.backends.kitsu.categories(*, limit: int = 20, config: Config | None = None, **kw) → List[KitsuCategory][source]
Top-level Kitsu categories via /categories.
- Parameters:
limit (int) – page[limit].
- Returns:
List of typed category resources.
- Return type:
list[KitsuCategory]
anime_genres
-
animedex.backends.kitsu.anime_genres(id: int, *, config: Config | None = None, **kw) → List[KitsuGenre][source]
Genres tagged on one anime via /anime/{id}/genres.
anime_categories
-
animedex.backends.kitsu.anime_categories(id: int, *, config: Config | None = None, **kw) → List[KitsuCategory][source]
Categories tagged on one anime via /anime/{id}/categories.
manga_genres
-
animedex.backends.kitsu.manga_genres(id: int, *, config: Config | None = None, **kw) → List[KitsuGenre][source]
Genres tagged on one manga via /manga/{id}/genres.
person
-
animedex.backends.kitsu.person(id: int, *, config: Config | None = None, **kw) → KitsuPerson[source]
One person (VA / staff) by Kitsu ID via /people/{id}.
genres
-
animedex.backends.kitsu.genres(*, limit: int = 20, config: Config | None = None, **kw) → List[KitsuGenre][source]
All genres (legacy taxonomy; the richer one is categories).
user
-
animedex.backends.kitsu.user(id: int, *, config: Config | None = None, **kw) → KitsuUser[source]
One user’s public profile via /users/{id}.
Public fields only; the upstream silently strips private ones
when no auth is presented.
selftest
-
animedex.backends.kitsu.selftest() → bool[source]
Smoke-test the public Kitsu Python API (signatures only, no
network).
- Returns:
True on success.
- Return type:
bool