Home
Simple AniList API wrapper to fetch media data
About
- Supports both sync and async.
- Provides easy access to almost every field present in AniList's
Media
type. - Only supports querying the
Media
type
Installation
pyanilist
is available on PyPI, so you can simply use pip to install it.
Usage
PyAniList offers two main classes:
-
AniList()
- Synchronous class-
search()
- Search a media-from pyanilist import AniList, MediaType media = AniList().search("Attack on Titan", type=MediaType.ANIME) print(media.title.romaji) """ Shingeki no Kyojin """ print(media.site_url) """ https://anilist.co/anime/16498 """ print(media.episodes) """ 25 """
get()
- Get a media by it's AniList ID
-
-
AsyncAniList()
- Asynchronous class-
search()
- Search a media-import asyncio from pyanilist import AsyncAniList, MediaType media = asyncio.run(AsyncAniList().search("Attack on Titan", type=MediaType.ANIME)) print(media.title.romaji) """ Shingeki no Kyojin """ print(media.site_url) """ https://anilist.co/anime/16498 """ print(media.episodes) """ 25 """
get()
- Get a media by it's AniList ID
-
License
Distributed under the Unlicense License. See UNLICENSE for more information.