Simple Anilist API wrapper to fetch media data
Project description
pyanilist
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.3.1.tar.gz
(15.2 kB
view hashes)
Built Distribution
pyanilist-0.3.1-py3-none-any.whl
(18.8 kB
view hashes)
Close
Hashes for pyanilist-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cff7170cfcc63b0c61e1514fad7751cb2171aff6edc206fa13e48227dceac54 |
|
MD5 | dc64f322e98e9ccc549137913e611f62 |
|
BLAKE2b-256 | d15fd8e624b504e4d039fed76c7fea65d0519f548c0ead629e65732e37c59a22 |