Skip to content

Enums

Category

Bases: Enum

Represents the categories to which a torrent on Nyaa belongs. This enum supports case-insensitive lookup by member name, value, or ID.

Examples:

>>> Category("ANIME_RAW")
<Category.ANIME_RAW: 'Anime - Raw'>
>>> Category("Literature - English-translated")
<Category.LITERATURE_ENGLISH_TRANSLATED: 'Literature - English-translated'>
>>> Category("2_1")
<Category.AUDIO_LOSSLESS: 'Audio - Lossless'>

ANIME_ENGLISH_TRANSLATED

ANIME_MUSIC_VIDEO

ANIME_NON_ENGLISH_TRANSLATED

ANIME_RAW

AUDIO_LOSSLESS

AUDIO_LOSSY

LITERATURE_ENGLISH_TRANSLATED

LITERATURE_NON_ENGLISH_TRANSLATED

LITERATURE_RAW

LIVE_ACTION_ENGLISH_TRANSLATED

LIVE_ACTION_IDOL_PROMOTIONAL_VIDEO

LIVE_ACTION_NON_ENGLISH_TRANSLATED

LIVE_ACTION_RAW

PICTURES_GRAPHICS

PICTURES_PHOTOS

SOFTWARE_APPLICATIONS

SOFTWARE_GAMES

id: CategoryID

Returns the ID of the category.

Examples:

>>> Category.ANIME_ENGLISH_TRANSLATED.id == "1_2"
True

parent: ParentCategory

Returns the corresponding ParentCategory for this category.

Examples:

>>> Category.ANIME_ENGLISH_TRANSLATED.parent == ParentCategory.ANIME
True

ParentCategory

Bases: Enum

Represents the top-level categories on Nyaa. This enum supports case-insensitive lookup by member name, value, or ID.

Examples:

>>> ParentCategory("anime")
<ParentCategory.ANIME: 'Anime'>
>>> ParentCategory("Live_Action")
<ParentCategory.LIVE_ACTION: 'Live Action'>
>>> ParentCategory("3_0")
<ParentCategory.LITERATURE: 'Literature'>

ALL

ANIME

AUDIO

LITERATURE

LIVE_ACTION

PICTURES

SOFTWARE

id: ParentCategoryID

Returns the ID of the category.

Examples:

>>> ParentCategory.ANIME.id == "1_0"
True
>>> ParentCategory.ALL.id == "0_0"
True

SortBy

Bases: DoubleSidedStrEnum

COMMENTS

DATETIME

DOWNLOADS

LEECHERS

SEEDERS

SIZE

Order

Bases: DoubleSidedStrEnum

ASCENDING

DESCENDING

Filter

Bases: IntEnum

NO_FILTER

NO_REMAKES

TRUSTED_ONLY