Skip to content

enums

Module for all enums related to the project.

AnimeListSortType

Bases: BaseEnum

Represents the different sort types of user anime list.

Source code in aniwrap/enums/user.py
class AnimeListSortType(BaseEnum):
    """Represents the different sort types of user anime list."""

    ListScore = "list_score"
    """Sorts the anime list in the descending order of score."""

    ListUpdatedAt = "list_updated_at"
    """Sorts the anime list in the descending order of last updated time."""

    AnimeTitle = "anime_title"
    """Sorts the anime list in the ascending order of anime title."""

    AnimeStartDate = "anime_start_date"
    """Sorts the anime list in the descending order of anime start date."""

AnimeStartDate class-attribute instance-attribute

AnimeStartDate = 'anime_start_date'

Sorts the anime list in the descending order of anime start date.

AnimeTitle class-attribute instance-attribute

AnimeTitle = 'anime_title'

Sorts the anime list in the ascending order of anime title.

ListScore class-attribute instance-attribute

ListScore = 'list_score'

Sorts the anime list in the descending order of score.

ListUpdatedAt class-attribute instance-attribute

ListUpdatedAt = 'list_updated_at'

Sorts the anime list in the descending order of last updated time.

AnimeRankingType

Bases: BaseEnum

Represents the anime ranking type.

Source code in aniwrap/enums/anime.py
class AnimeRankingType(BaseEnum):
    """Represents the anime ranking type."""

    All = "all"
    """Represents top anime series."""

    Airing = "airing"
    """Represents top airing anime."""

    Upcoming = "upcoming"
    """Represents top upcoming anime."""

    Tv = "tv"
    """Represents top TV anime series."""

    Ova = "ova"
    """Represents top anime OVA series."""

    Movie = "movie"
    """Represents top anime movies."""

    Special = "special"
    """Represents top anime specials."""

    ByPopularity = "bypopularity"
    """Represents top anime by popularity."""

    Favorite = "favorite"
    """Represents top favourited anime."""

Airing class-attribute instance-attribute

Airing = 'airing'

Represents top airing anime.

All class-attribute instance-attribute

All = 'all'

Represents top anime series.

ByPopularity class-attribute instance-attribute

ByPopularity = 'bypopularity'

Represents top anime by popularity.

Favorite class-attribute instance-attribute

Favorite = 'favorite'

Represents top favourited anime.

Movie class-attribute instance-attribute

Movie = 'movie'

Represents top anime movies.

Ova class-attribute instance-attribute

Ova = 'ova'

Represents top anime OVA series.

Special class-attribute instance-attribute

Special = 'special'

Represents top anime specials.

Tv class-attribute instance-attribute

Tv = 'tv'

Represents top TV anime series.

Upcoming class-attribute instance-attribute

Upcoming = 'upcoming'

Represents top upcoming anime.

AnimeRewatchValue

Bases: BaseEnum

Represents the anime rewatch value.

Source code in aniwrap/enums/user.py
class AnimeRewatchValue(BaseEnum):
    """Represents the anime rewatch value."""

    Empty = 0
    VeryLow = 1
    Low = 2
    Medium = 3
    High = 4
    VeryHigh = 5

AnimeSeason

Bases: BaseEnum

Represents anime Season.

Source code in aniwrap/enums/anime.py
class AnimeSeason(BaseEnum):
    """Represents anime Season."""

    Winter = "winter"
    """Represents winter - January, February, March months."""

    Spring = "spring"
    """Represents spring - April, May, June."""

    Summer = "summer"
    """Represents summer - July, August, September."""

    Fall = "fall"
    """Represents fall - October, November, December."""

Fall class-attribute instance-attribute

Fall = 'fall'

Represents fall - October, November, December.

Spring class-attribute instance-attribute

Spring = 'spring'

Represents spring - April, May, June.

Summer class-attribute instance-attribute

Summer = 'summer'

Represents summer - July, August, September.

Winter class-attribute instance-attribute

Winter = 'winter'

Represents winter - January, February, March months.

AnimeSortType

Bases: BaseEnum

Represents the type of ways anime result can be sorted.

Source code in aniwrap/enums/anime.py
class AnimeSortType(BaseEnum):
    """Represents the type of ways anime result can be sorted."""

    AnimeScore = "anime_score"
    """Sorts the anime result based on score of the anime on mal in descending order."""

    NumberOfUsers = "anime_num_list_users"
    """Sorts the anime result based on the number of users added the anime to their list on mal in descending order."""

AnimeScore class-attribute instance-attribute

AnimeScore = 'anime_score'

Sorts the anime result based on score of the anime on mal in descending order.

NumberOfUsers class-attribute instance-attribute

NumberOfUsers = 'anime_num_list_users'

Sorts the anime result based on the number of users added the anime to their list on mal in descending order.

AnimeStatus

Bases: BaseEnum

Represents all available Anime status.

Source code in aniwrap/enums/anime.py
class AnimeStatus(BaseEnum):
    """Represents all available Anime status."""

    Airing = "currently_airing"
    """Represents currently airing anime"""

    Finished = "finished_airing"
    """Represents anime that are finished airing."""

    NotAired = "not_yet_aired"
    """Represents anime that are yet to be aired."""

Airing class-attribute instance-attribute

Airing = 'currently_airing'

Represents currently airing anime

Finished class-attribute instance-attribute

Finished = 'finished_airing'

Represents anime that are finished airing.

NotAired class-attribute instance-attribute

NotAired = 'not_yet_aired'

Represents anime that are yet to be aired.

AnimeType

Bases: BaseEnum

Represents type of the Anime.

Source code in aniwrap/enums/anime.py
class AnimeType(BaseEnum):
    """Represents type of the Anime."""

    Movie = "movie"
    Ona = "ona"
    Ova = "ova"
    Special = "special"
    Tv = "tv"
    Unknown = "unknown"

AnimeWatchStatus

Bases: BaseEnum

Represents the status of anime in the user's anime list.

Source code in aniwrap/enums/user.py
class AnimeWatchStatus(BaseEnum):
    """Represents the status of anime in the user's anime list."""

    Watching = "watching"

    Completed = "completed"

    OnHold = "on_hold"

    Dropped = "dropped"

    PlanToWatch = "plan_to_watch"

BaseEnum

Bases: Enum

BaseEnum from which all the other enums inherit from.

Source code in aniwrap/enums/base.py
class BaseEnum(Enum):
    """BaseEnum from which all the other enums inherit from."""

    def __str__(self) -> str:
        return self.value

    @classmethod
    def from_str(cls: Type[T], value: str) -> T:
        """Generate the enum from the given string value.

        Args:
            value: The string value to generate from.

        Returns:
            The generated enum.
        """
        return cls(value)

    @classmethod
    def try_from_str(cls: Type[T], value: str) -> T | None:
        """Try to generate the enum from the given value.

        Args:
            value: the string value to generate the enum from.

        Returns:
            The generated enum or `None` if the value is not valid.
        """
        try:
            return cls(value)
        except ValueError:
            return None

from_str classmethod

from_str(value: str) -> T

Generate the enum from the given string value.

Parameters:

Name Type Description Default
value str

The string value to generate from.

required

Returns:

Type Description
T

The generated enum.

Source code in aniwrap/enums/base.py
@classmethod
def from_str(cls: Type[T], value: str) -> T:
    """Generate the enum from the given string value.

    Args:
        value: The string value to generate from.

    Returns:
        The generated enum.
    """
    return cls(value)

try_from_str classmethod

try_from_str(value: str) -> T | None

Try to generate the enum from the given value.

Parameters:

Name Type Description Default
value str

the string value to generate the enum from.

required

Returns:

Type Description
T | None

The generated enum or None if the value is not valid.

Source code in aniwrap/enums/base.py
@classmethod
def try_from_str(cls: Type[T], value: str) -> T | None:
    """Try to generate the enum from the given value.

    Args:
        value: the string value to generate the enum from.

    Returns:
        The generated enum or `None` if the value is not valid.
    """
    try:
        return cls(value)
    except ValueError:
        return None

ListPriority

Bases: BaseEnum

Represents the priority(?) of the anime/manga in the list.

Source code in aniwrap/enums/user.py
class ListPriority(BaseEnum):
    """Represents the priority(?) of the anime/manga in the list."""

    Low = 0
    Medium = 1
    High = 2

MangaListSortType

Bases: BaseEnum

Represents the different sort types of user manga list.

Source code in aniwrap/enums/user.py
class MangaListSortType(BaseEnum):
    """Represents the different sort types of user manga list."""

    ListScore = "list_score"
    """Sorts the manga list in the descending of the score."""

    ListUpdatedAt = "list_updated_at"
    """Sorts the manga list in the descending of the last updated time."""

    MangaTitle = "manga_title"
    """Sorts the manga list in the ascending of the manga title."""

    MangaStartDate = "manga_start_date"
    """Sorts the manga list in the descending of the manga start date."""

ListScore class-attribute instance-attribute

ListScore = 'list_score'

Sorts the manga list in the descending of the score.

ListUpdatedAt class-attribute instance-attribute

ListUpdatedAt = 'list_updated_at'

Sorts the manga list in the descending of the last updated time.

MangaStartDate class-attribute instance-attribute

MangaStartDate = 'manga_start_date'

Sorts the manga list in the descending of the manga start date.

MangaTitle class-attribute instance-attribute

MangaTitle = 'manga_title'

Sorts the manga list in the ascending of the manga title.

MangaRankingType

Bases: BaseEnum

Represents the manga ranking type.

Source code in aniwrap/enums/manga.py
class MangaRankingType(BaseEnum):
    """Represents the manga ranking type."""

    All = "all"
    """Represents top series - includes Manga, Novels, Manhwa etc."""

    Manga = "manga"
    """Represents top manga series."""

    Novels = "novels"
    """Represents top novels."""

    Oneshots = "oneshots"
    """Represents top one-shots."""

    Doujin = "doujin"
    """Represents top Doujinshi."""

    Manhwa = "manhwa"
    """Represents top Manhwa."""

    Manhua = "manhua"
    """Represents top Manhua."""

    ByPopularity = "bypopularity"
    """Represents top series by popularity."""

    Favorite = "favorite"
    """Represents top favourited series."""

All class-attribute instance-attribute

All = 'all'

Represents top series - includes Manga, Novels, Manhwa etc.

ByPopularity class-attribute instance-attribute

ByPopularity = 'bypopularity'

Represents top series by popularity.

Doujin class-attribute instance-attribute

Doujin = 'doujin'

Represents top Doujinshi.

Favorite class-attribute instance-attribute

Favorite = 'favorite'

Represents top favourited series.

Manga class-attribute instance-attribute

Manga = 'manga'

Represents top manga series.

Manhua class-attribute instance-attribute

Manhua = 'manhua'

Represents top Manhua.

Manhwa class-attribute instance-attribute

Manhwa = 'manhwa'

Represents top Manhwa.

Novels class-attribute instance-attribute

Novels = 'novels'

Represents top novels.

Oneshots class-attribute instance-attribute

Oneshots = 'oneshots'

Represents top one-shots.

MangaReadStatus

Bases: BaseEnum

Represents the status of the manga in user's list.

Source code in aniwrap/enums/user.py
class MangaReadStatus(BaseEnum):
    """Represents the status of the manga in user's list."""

    Reading = "reading"

    Completed = "completed"

    OnHold = "on_hold"

    Dropped = "dropped"

    PlanToRead = "plan_to_read"

MangaStatus

Bases: BaseEnum

Represents Manga status enum.

Source code in aniwrap/enums/manga.py
class MangaStatus(BaseEnum):
    """Represents Manga status enum."""

    Finished = "finished"
    NotPublished = "not_yet_published"
    Publishing = "currently_publishing"
    OnHiatus = "on_hiatus"
    Discontinued = "discontinued"

MangaType

Bases: BaseEnum

Represents Manga type enum.

Source code in aniwrap/enums/manga.py
class MangaType(BaseEnum):
    """Represents Manga type enum."""

    Doujinshi = "doujinshi"
    LightNovel = "light_novel"
    Manga = "manga"
    Manhua = "manhua"
    Manhwa = "manhwa"
    Novel = "novel"
    Oel = "oel"
    OneShot = "one_shot"
    Unknown = "unknown"

NSFWLevel

Bases: BaseEnum

Represents different NSFW levels.

Source code in aniwrap/enums/common.py
class NSFWLevel(BaseEnum):
    """Represents different NSFW levels."""

    Black = "black"
    Gray = "gray"
    White = "white"