API Reference#
Client#
- class kitsu.Client(session: Optional[aiohttp.client.ClientSession] = None)[source]#
User client used to interact with the Kitsu API
- async get_anime(anime_id: int) kitsu.models.Anime [source]#
Fetch the information of an anime using its ID
- async search_anime(query: str = '', limit: int = 1, **filters) List[kitsu.models.Anime] [source]#
Search for an Anime with its name or filters
- async trending_anime() List[kitsu.models.Anime] [source]#
Fetch trending animes
- Return type
List[
Anime
]
- async get_manga(manga_id: int) kitsu.models.Manga [source]#
Fetch the information of a manga using its ID
- async search_manga(query: str = '', limit: int = 1, **filters) List[kitsu.models.Manga] [source]#
Search for a Manga with its Name or Filters
- async trending_manga() List[kitsu.models.Manga] [source]#
Fetch trending Mangas
- Return type
List[
Manga
]
API Models#
API Models are simply the raw JSON data wrapped in a class with attributes, properties and methods to obtain information.
Warning
🚧 This section is not complete yet. If you find any errors or have any suggestions please report them here
Anime#
- class kitsu.Anime[source]#
The information about an Anime wrapped in a class
- slug#
The name of the Anime with hyphens, It’s recommended to use title or canoncial_title instead. Example: cowboy-bebop
- Type
- age_rating#
The age rating for the Anime
- Type
Optional[Literal[“G”, “PG”, “R”, “R18”]]
- status#
The status of the anime
- Type
Optional[Literal[“current”, “finished”, “tba”, “unreleased”, “upcoming”]]
- subtype#
The subtype of the Anime
- Type
Optional[Literal[“ONA”, “OVA”, “TV”, “movie”, “music”, “special”]]
- subtype: Optional[Literal['ONA', 'OVA', 'TV', 'movie', 'music', 'special']]#
- property streaming_links: Optional[List[kitsu.models.StreamingLink]]#
The streaming links & information for the Anime
- Return type
Optional[List[
StreamingLink
]]
- property episodes: Optional[List[kitsu.models.Episode]]#
The episodes of the Anime
- Return type
Optional[List[
Episode
]]
- property episode_count: Optional[int]#
The number of episodes of this Anime
- Return type
Optional[int]
- property episode_length: Optional[int]#
The avg length of episodes of this Anime in minutes
- Return type
Optional[int]
- age_rating: Optional[Literal['G', 'PG', 'R', 'R18']]#
- property average_rating: Optional[float]#
The average rating of the Anime/Manga on Kitsu
- Return type
Optional[float]
- property categories: Optional[List[kitsu.models.Category]]#
The categories or genres of the Anime/Manga
- Return type
Optional[List[
Title
]]
- cover_image(_type: Optional[Literal['tiny', 'small', 'large', 'original']] = 'original') Optional[str] #
The cover image of the Anime/Manga
- Parameters
_type (Optional[Literal["tiny", "small", "medium", "large", "original"]], default: "original") – The size in which the image should be returned. The size will be orginal by default
- Returns
The URL of the image
- Return type
Optional[str]
- property created_at: Optional[datetime.datetime]#
When the Anime/Manga was added on Kitsu. (Use start_date instead)
- Return type
Optional[datetime]
- property end_date: Optional[datetime.datetime]#
The date on which the Anime/Manga ended.
- Return type
Optional[datetime]
- property favorites_count: Optional[int]#
The favorites count of the Anime/Manga on Kitsu
- Return type
Optional[int]
- property popularity_rank: Optional[int]#
The popularity rank of the Anime/Manga on Kitsu
- Return type
Optional[int]
- poster_image(_type: Optional[Literal['tiny', 'small', 'medium', 'large', 'original']] = 'original') Optional[str] #
The poster image of the Anime/Manga
- Parameters
_type (Optional[Literal["tiny", "small", "medium", "large", "original"]], default: "original") – The size in which the image should be returned. The size will be orginal by default
- Returns
The URL of the image
- Return type
Optional[str]
- property rating_rank: Optional[int]#
The rating rank of the Anime/Manga on Kitsu
- Return type
Optional[int]
- property start_date: Optional[datetime.datetime]#
The date on which the Anime/Manga started
- Return type
Optional[datetime]
- status: Optional[Literal['current', 'finished', 'tba', 'unreleased', 'upcoming']]#
- property title: Optional[kitsu.models.Title]#
The titles of the Anime/Manga in different languages. Other languages will be listed if they exist.
- Return type
Optional[
Title
]
- property updated_at: Optional[datetime.datetime]#
The last time Anime/Manga was updated on Kitsu.
- Return type
Optional[datetime]
Manga#
- class kitsu.Manga[source]#
The information about a Manga wrapped in a class
- slug#
The name of the Manga with hyphens, It’s recommended to use title or canoncial_title instead. Example: shingeki-no-kyojin
- Type
- age_rating#
The age rating for the Manga
- Type
Optional[Literal[“G”, “PG”, “R”, “R18”]]
- status#
The status of the Manga
- Type
Optional[Literal[“current”, “finished”, “tba”, “unreleased”, “upcoming”]]
- subtype#
The subtype of the Manga
- Type
Optional[Literal[“doujin”, “manga”, “manhua”, “manhwa”, “novel”, “oel”, “oneshot”]]
- subtype: Optional[Literal['doujin', 'manga', 'manhua', 'manhwa', 'novel', 'oel', 'oneshot']]#
- property chapter_count: Optional[int]#
The number of chapters in this Manga
- Return type
Optional[int]
- age_rating: Optional[Literal['G', 'PG', 'R', 'R18']]#
- property average_rating: Optional[float]#
The average rating of the Anime/Manga on Kitsu
- Return type
Optional[float]
- property categories: Optional[List[kitsu.models.Category]]#
The categories or genres of the Anime/Manga
- Return type
Optional[List[
Title
]]
- cover_image(_type: Optional[Literal['tiny', 'small', 'large', 'original']] = 'original') Optional[str] #
The cover image of the Anime/Manga
- Parameters
_type (Optional[Literal["tiny", "small", "medium", "large", "original"]], default: "original") – The size in which the image should be returned. The size will be orginal by default
- Returns
The URL of the image
- Return type
Optional[str]
- property created_at: Optional[datetime.datetime]#
When the Anime/Manga was added on Kitsu. (Use start_date instead)
- Return type
Optional[datetime]
- property end_date: Optional[datetime.datetime]#
The date on which the Anime/Manga ended.
- Return type
Optional[datetime]
- property favorites_count: Optional[int]#
The favorites count of the Anime/Manga on Kitsu
- Return type
Optional[int]
- property popularity_rank: Optional[int]#
The popularity rank of the Anime/Manga on Kitsu
- Return type
Optional[int]
- poster_image(_type: Optional[Literal['tiny', 'small', 'medium', 'large', 'original']] = 'original') Optional[str] #
The poster image of the Anime/Manga
- Parameters
_type (Optional[Literal["tiny", "small", "medium", "large", "original"]], default: "original") – The size in which the image should be returned. The size will be orginal by default
- Returns
The URL of the image
- Return type
Optional[str]
- property rating_rank: Optional[int]#
The rating rank of the Anime/Manga on Kitsu
- Return type
Optional[int]
- property start_date: Optional[datetime.datetime]#
The date on which the Anime/Manga started
- Return type
Optional[datetime]
- status: Optional[Literal['current', 'finished', 'tba', 'unreleased', 'upcoming']]#
- property title: Optional[kitsu.models.Title]#
The titles of the Anime/Manga in different languages. Other languages will be listed if they exist.
- Return type
Optional[
Title
]
- property updated_at: Optional[datetime.datetime]#
The last time Anime/Manga was updated on Kitsu.
- Return type
Optional[datetime]
Title#
Category#
- class kitsu.models.Category[source]#
Represents a category of an Anime/Manga
- property created_at: Optional[datetime.datetime]#
The time when this category was added on Kitsu
- Return type
Optional[datetime]
- property updated_at: Optional[datetime.datetime]#
The last time this category was updated on Kitsu
- Return type
Optional[datetime]
StreamingLink#
- class kitsu.models.StreamingLink[source]#
Represents the streaming link for an Anime
- property created_at: Optional[datetime.datetime]#
The time when this link was added on Kitsu
- Return type
Optional[datetime]
- property updated_at: Optional[datetime.datetime]#
The last time this streaming link was updated on Kitsu.
- Return type
Optional[datetime]
Episode#
- class kitsu.models.Episode[source]#
Represents an episode of an Anime
- property title: Optional[kitsu.models.Title]#
The titles of the episode in different languages. Other languages will be listed if they exist.
- Return type
Optional[
Title
]
- property created_at: Optional[datetime.datetime]#
When this episode was added on Kitsu
- Return type
Optional[datetime]
- property updated_at: Optional[datetime.datetime]#
The last time this episode was updated on Kitsu
- Return type
Optional[datetime]