A lightweight API for gathering anime schedules from MyAnimeList or anime news and announcements from LiveChart.
To install the library:
pip install -U ani-sched
To import the library:
from ani_sched import *
To call the API, you need to create an object.
from ani_sched import AniSched
api = AniSched()
fall_2022 = api.get_sched(year=2022, season='fall') # gets the animes of Fall 2022
print(fall_2022["TV (New)"][6]["title"]) # prints the title of the 7th most popular TV anime of Fall 2022
# output: "Bocchi the Rock!"
anime = api.search_anime("bocchi the rocks")
print(anime)
# [['Bocchi the Rock!', 'https://myanimelist.net/anime/47917/Bocchi_the_Rock'], ['Bocchi the Rock! Movie', 'https://myanimelist.net/anime/55357/Bocchi_the_Rock_Movie'], ['Burn the Witch', 'https://myanimelist.net/anime/41468/Burn_the_Witch'], ['Highschool of the Dead', 'https://myanimelist.net/anime/8074/Highschool_of_the_Dead'], ['Bakumatsu Rock', 'https://myanimelist.net/anime/23037/Bakumatsu_Rock']]