Simple AniList API wrapper to fetch media data
Project description
Simple AniList API wrapper to fetch media data
Table Of Contents
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.
pip install pyanilist
Usage
-
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 """
-
Docs
Checkout the complete documentation here.
License
Distributed under the Unlicense License. See UNLICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyanilist-0.4.1.tar.gz
(16.6 kB
view hashes)
Built Distribution
pyanilist-0.4.1-py3-none-any.whl
(20.8 kB
view hashes)
Close
Hashes for pyanilist-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50453ab5fe8b6c1f31cd64834423dca33abac50f5243b9fd94587710693d3fd3 |
|
MD5 | 120f328778ab76a70a2bdfac8110ac93 |
|
BLAKE2b-256 | 56d0c7db30dcf992e53fe6c8df8f564ae2675e27c74feb8eb8faef92d35ec594 |