A library to use the MyAnimeList API more easily.
Project description
myanimelistpy
A library to use the MyAnimeList API more easily.
Installing
pip install myanimelistpy
or
# Linux/macOS
python3 -m pip install -U myanimelistpy
# Windows
py -m pip install -U myanimelistpy
Examples
Anime List
Basic example:
from myanimelistpy.myanimelist import MyAnimeList
CLIENT_ID = "YOUR_MY_ANIME_LIST_CLIENT_ID"
if __name__ == "__main__":
my_anime_list = MyAnimeList(client_id=CLIENT_ID)
anime_list = my_anime_list.getAnimeList(
anime_name = "Hunter x Hunter",
limit = 4
)
for anime in anime_list:
print(f"Id: {anime.getId()}")
print(f"Title: {anime.getTitle()}")
print(f"Main Picture (medium): {anime.getMainPicture().getMedium()}\n")
Output
Id: 11061
Title: Hunter x Hunter (2011)
Main Picture (medium): https://api-cdn.myanimelist.net/images/anime/1337/99013.jpg
Id: 136
Title: Hunter x Hunter
Main Picture (medium): https://api-cdn.myanimelist.net/images/anime/8/19473.jpg
Request with fields:
from myanimelistpy.myanimelist import MyAnimeList
CLIENT_ID = "YOUR_MY_ANIME_LIST_CLIENT_ID"
if __name__ == "__main__":
my_anime_list = MyAnimeList(client_id=CLIENT_ID)
anime_list = my_anime_list.getAnimeList(
anime_name = "Hunter x Hunter",
limit = 2,
fields = ["rank", "status"]
)
for anime in anime_list:
print(f"Id: {anime.getId()}")
print(f"Title: {anime.getTitle()}")
print(f"Main Picture (medium): {anime.getMainPicture().getMedium()}")
print(f"Rank: {anime.getRank()}")
print(f"Status: {anime.getStatus()}\n")
Output
Id: 11061
Title: Hunter x Hunter (2011)
Main Picture (medium): https://api-cdn.myanimelist.net/images/anime/1337/99013.jpg
Rank: 9
Status: Finished airing
Id: 136
Title: Hunter x Hunter
Main Picture (medium): https://api-cdn.myanimelist.net/images/anime/8/19473.jpg
Rank: 165
Status: Finished airing
Creator
Allan Capistrano |
Support
Please star this repository if this project is useful or helped you.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for myanimelistpy-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d143fb7866d20d0c4b517a528a2609d8e8879f536eacb50a59ee566847924cd2 |
|
MD5 | 7c0743d9b45c5cc7fa1630ae115e12b8 |
|
BLAKE2b-256 | c531818cd242fcb0d23235a5f16e81614a519b517745fc2619e975322db11c47 |