Models
AiringSchedule
Bases: ParentModel
Media Airing Schedule.
airing_at
class-attribute
instance-attribute
The time the episode airs at.
time_until_airing
class-attribute
instance-attribute
time_until_airing: timedelta | None = None
The time delta until the episode starts airing.
Character
Bases: ParentModel
A character that features in an anime or manga.
age
class-attribute
instance-attribute
age: str | None = None
The character's age. Note this is a string, not an int, it may contain further text and additional ages.
blood_type
class-attribute
instance-attribute
blood_type: str | None = None
The character's blood type.
date_of_birth
class-attribute
instance-attribute
The character's birth date.
description
class-attribute
instance-attribute
description: str | None = None
A general description of the character.
favourites
class-attribute
instance-attribute
favourites: int | None = None
The amount of user's who have favourited the character.
gender
class-attribute
instance-attribute
gender: str | None = None
The character's gender. Usually Male, Female, or Non-binary but can be any string.
name
class-attribute
instance-attribute
name: CharacterName = CharacterName()
The names of the character.
role
class-attribute
instance-attribute
role: CharacterRole | None = None
The character's role in the media.
site_url
class-attribute
instance-attribute
site_url: HttpUrl | None = None
The url for the character page on the AniList website.
CharacterImage
CharacterName
Bases: ParentModel
The names of the character.
alternative
class-attribute
instance-attribute
Other names the character might be referred to as.
alternative_spoiler
class-attribute
instance-attribute
Other names the character might be referred to as but are spoilers.
full
class-attribute
instance-attribute
full: str | None = None
The character's first and last name.
native
class-attribute
instance-attribute
native: str | None = None
The character's full name in their native language.
FuzzyDate
Bases: ParentModel
Naive date object that allows for incomplete date values (fuzzy).
iso_format
iso_format() -> str
Return the date formatted as an ISO 8601 string.
If year, month, and day are available, the format is "YYYY-MM-DD". If only year and month are available, the format is "YYYY-MM". If only year is available, the format is "YYYY". If no information is available, an empty string is returned.
Source code in src/pyanilist/_models.py
to_int
to_int() -> int
Return an 8 digit long date integer (YYYYMMDD). Unknown dates represented by 0. For example, 2016 is 20160000 and May 1976 is 19760500.
Source code in src/pyanilist/_models.py
Media
Bases: ParentModel
Anime or Manga.
average_score
class-attribute
instance-attribute
average_score: int | None = None
A weighted average score of all the user's scores of the media.
banner_image
class-attribute
instance-attribute
banner_image: HttpUrl | None = None
The banner image of the media.
chapters
class-attribute
instance-attribute
chapters: int | None = None
The amount of chapters the manga has when complete.
country_of_origin
class-attribute
instance-attribute
country_of_origin: CountryAlpha2 | None = None
Where the media was created. (ISO 3166-1 alpha-2).
cover_image
class-attribute
instance-attribute
cover_image: MediaCoverImage = MediaCoverImage()
The cover images of the media.
description
class-attribute
instance-attribute
description: str | None = None
Short description of the media's story and characters.
duration
class-attribute
instance-attribute
duration: int | None = None
The general length of each anime episode in minutes.
end_date
class-attribute
instance-attribute
The last official release date of the media.
episodes
class-attribute
instance-attribute
episodes: int | None = None
The amount of episodes the anime has when complete.
external_links
class-attribute
instance-attribute
external_links: tuple[MediaExternalLink, ...] = tuple()
External links to another site related to the media.
favourites
class-attribute
instance-attribute
favourites: int | None = None
The amount of user's who have favourited the media.
format
class-attribute
instance-attribute
format: MediaFormat | None = None
The format the media was released in.
genres
class-attribute
instance-attribute
The genres of the media.
hashtag
class-attribute
instance-attribute
hashtag: str | None = None
Official Twitter hashtags for the media.
is_adult
class-attribute
instance-attribute
is_adult: bool | None = None
If the media is intended only for 18+ adult audiences.
is_licensed
class-attribute
instance-attribute
is_licensed: bool | None = None
If the media is officially licensed or a self-published doujin release.
is_locked
class-attribute
instance-attribute
is_locked: bool | None = None
Locked media may not be added to lists our favorited. This may be due to the entry pending for deletion or other reasons.
mean_score
class-attribute
instance-attribute
mean_score: int | None = None
Mean score of all the user's scores of the media.
next_airing_episode
class-attribute
instance-attribute
next_airing_episode: AiringSchedule = AiringSchedule()
The media's next episode airing schedule.
popularity
class-attribute
instance-attribute
popularity: int | None = None
The number of users with the media on their list.
rankings
class-attribute
instance-attribute
The ranking of the media in a particular time span and format compared to other media.
season
class-attribute
instance-attribute
season: MediaSeason | None = None
The season the media was initially released in.
season_year
class-attribute
instance-attribute
season_year: int | None = None
The season year the media was initially released in.
source
class-attribute
instance-attribute
source: MediaSource | None = None
Source type the media was adapted from.
start_date
class-attribute
instance-attribute
The first official release date of the media.
status
class-attribute
instance-attribute
status: MediaStatus | None = None
The current releasing status of the media.
streaming_episodes
class-attribute
instance-attribute
streaming_episodes: tuple[MediaStreamingEpisode, ...] = tuple()
Data and links to legal streaming episodes on external sites.
synonyms
class-attribute
instance-attribute
Alternative titles of the media.
tags
class-attribute
instance-attribute
List of tags that describes elements and themes of the media.
title
class-attribute
instance-attribute
title: MediaTitle = MediaTitle()
The official titles of the media in various languages.
trailer
class-attribute
instance-attribute
trailer: MediaTrailer = MediaTrailer()
Media trailer or advertisement.
trending
class-attribute
instance-attribute
trending: int | None = None
The amount of related activity in the past hour.
type
class-attribute
instance-attribute
type: MediaType | None = None
The type of the media; anime or manga.
updated_at
class-attribute
instance-attribute
When the media's data was last updated.
volumes
class-attribute
instance-attribute
volumes: int | None = None
The amount of volumes the manga has when complete.
MediaCoverImage
Bases: ParentModel
The cover images of the media.
color
class-attribute
instance-attribute
color: Color | None = None
Average #hex color of cover image
extra_large
class-attribute
instance-attribute
extra_large: HttpUrl | None = None
The cover image url of the media at its largest size. If this size isn't available, large will be provided instead.
large
class-attribute
instance-attribute
large: HttpUrl | None = None
The cover image url of the media at a large size
medium
class-attribute
instance-attribute
medium: HttpUrl | None = None
The cover image url of the media at medium size
MediaExternalLink
Bases: ParentModel
An external link to another site related to the media or staff member.
icon
class-attribute
instance-attribute
icon: HttpUrl | None = None
The icon image url of the site. Not available for all links. Transparent PNG 64x64.
is_disabled
class-attribute
instance-attribute
is_disabled: bool | None = None
Indicates if the link is currently disabled.
language
class-attribute
instance-attribute
language: str | None = None
Language the site content is in. See Staff language field for values.
notes
class-attribute
instance-attribute
notes: str | None = None
Additional notes about the link or its relevance.
type
class-attribute
instance-attribute
type: ExternalLinkType | None = None
Type of the external link.
url
class-attribute
instance-attribute
url: HttpUrl | None = None
The url of the external link or base url of link source.
MediaRank
Bases: ParentModel
The ranking of a media in a particular time span and format compared to other media.
all_time
class-attribute
instance-attribute
all_time: bool | None = None
If the ranking is based on all time instead of a season/year.
context
class-attribute
instance-attribute
context: str | None = None
String that gives context to the ranking type and time span.
format
class-attribute
instance-attribute
format: MediaFormat | None = None
The format the media is ranked within.
season
class-attribute
instance-attribute
season: MediaSeason | None = None
The season the media is ranked within.
year
class-attribute
instance-attribute
year: int | None = None
The year the media is ranked within.
MediaStreamingEpisode
MediaTag
Bases: ParentModel
A tag that describes a theme or element of the media.
category
class-attribute
instance-attribute
category: str | None = None
The categories of tags this tag belongs to.
description
class-attribute
instance-attribute
description: str | None = None
A general description of the tag.
is_adult
class-attribute
instance-attribute
is_adult: bool | None = None
If the tag is only for adult 18+ media.
is_general_spoiler
class-attribute
instance-attribute
is_general_spoiler: bool | None = None
If the tag could be a spoiler for any media.
is_media_spoiler
class-attribute
instance-attribute
is_media_spoiler: bool | None = None
If the tag is a spoiler for this media.
rank
class-attribute
instance-attribute
rank: int | None = None
The relevance ranking of the tag out of the 100 for this media.
user_id
class-attribute
instance-attribute
user_id: int | None = None
The user who submitted the tag.
MediaTitle
MediaTrailer
Bases: ParentModel
Media trailer or advertisement.
RelatedMedia
Bases: Media
Subclass of Media
with an additional relation_type
property.
relation_type
class-attribute
instance-attribute
relation_type: MediaRelation | None = None
The type of relation to the parent media.
Staff
Bases: ParentModel
Voice actors or production staff.
date_of_birth
class-attribute
instance-attribute
The staff's date of birth.
date_of_death
class-attribute
instance-attribute
The staff's date of death.
description
class-attribute
instance-attribute
description: str | None = None
A general description of the staff member.
favourites
class-attribute
instance-attribute
favourites: int | None = None
The amount of user's who have favourited the staff member.
gender
class-attribute
instance-attribute
gender: str | None = None
The staff's gender. Usually Male, Female, or Non-binary but can be any string.
home_town
class-attribute
instance-attribute
home_town: str | None = None
The persons birthplace or hometown.
language_v2
class-attribute
instance-attribute
language_v2: str | None = None
The primary language of the staff member. Current values: Japanese, English, Korean, Italian, Spanish, Portuguese, French, German, Hebrew, Hungarian, Chinese, Arabic, Filipino, Catalan, Finnish, Turkish, Dutch, Swedish, Thai, Tagalog, Malaysian, Indonesian, Vietnamese, Nepali, Hindi, Urdu.
name
class-attribute
instance-attribute
The names of the staff member.
primary_occupations
class-attribute
instance-attribute
The person's primary occupations.
role
class-attribute
instance-attribute
role: str | None = None
The role of the staff member in the production of the media.
site_url
class-attribute
instance-attribute
site_url: HttpUrl | None = None
The url for the staff page on the AniList website.
years_active
class-attribute
instance-attribute
years_active: YearsActive = YearsActive()
(start_year, end_year) (If the 2nd value is not present staff is still active).
StaffImage
StaffName
Bases: ParentModel
The names of the staff member.
alternative
class-attribute
instance-attribute
Other names the staff member might be referred to as (pen names).
native
class-attribute
instance-attribute
native: str | None = None
The person's full name in their native language.
Studio
Bases: ParentModel
Animation or production company.
favourites
class-attribute
instance-attribute
favourites: int | None = None
The amount of user's who have favourited the studio.
is_animation_studio
class-attribute
instance-attribute
is_animation_studio: bool | None = None
If the studio is an animation studio or a different kind of company.
is_main
class-attribute
instance-attribute
is_main: bool | None = None
If the studio is the main animation studio of the anime.
site_url
class-attribute
instance-attribute
site_url: HttpUrl | None = None
The url for the studio page on the AniList website.