Simple AniList API wrapper to fetch media data
- Supports both sync and async.
- Provides easy access to almost every field present in AniList's
Media
type. - Only supports querying the
Media
type
pyanilist
is available on PyPI, so you can simply use pip to install it.
pip install pyanilist
-
AniList()
- Synchronous class-
search()
- Search a mediafrom 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 IDfrom pyanilist import AniList media = AniList().get(21459) print(media.title.english) """ My Hero Academia """ print(media.site_url) """ https://anilist.co/anime/21459 """ print(media.episodes) """ 13 """
-
-
AsyncAniList()
- Asynchronous class-
search()
- Search a mediaimport 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 IDimport asyncio from pyanilist import AsyncAniList media = asyncio.run(AsyncAniList().get(21459)) print(media.title.english) """ My Hero Academia """ print(media.site_url) """ https://anilist.co/anime/21459 """ print(media.episodes) """ 13 """
-
Checkout the complete documentation here.
Distributed under the Unlicense License. See UNLICENSE for more information.