kitsu-py

A Simple & Lightweight Asynchronous Python Wrapper for Kitsu's Manga & Anime API.


Keywords
kitsu, async, py, api, wrapper, anime, api-wrapper, asyncio, kitsu-api, kitsu-io, manga, python, python3
License
MIT
Install
pip install kitsu-py==1.1.2

Documentation

Kitsu.py

Python API wrapper for kitsu.io
A Simple & Lightweight Asynchronous Python Wrapper for Kitsu’s Manga & Anime API.

Features

  • Simple and Modern — Simple and Modern Pythonic API using async/await.
  • Typed — Fully typed to provide a smooth experience while programming.
  • Features — Get information about Categories, Episodes, Streaming Links and a lot more!
  • Custom Search — Find any Anime/Manga using Filters or Trending Animes & Mangas.

Requirements

Python 3.8+

Installing

To install the library, run the following commands:

# Linux/MacOS
python3 -m pip install -U kitsu.py

# Windows
py -3 -m pip install -U kitsu.py

Example

Search for an anime:

import kitsu
import asyncio

client = kitsu.Client()

async def main():
    # Search a specific anime with the name
    anime = await client.search_anime("jujutsu kaisen", limit=1)
    
    print("Canonical Title: " + anime.canonical_title)
    print("Average Rating: " + str(anime.average_rating))
    
    # This returns a list of 5 animes in the spring season 2022
    animes_in_spring = await client.search_anime(limit=5, season_year=2022, season='spring')
    
    print(*[a.title for a in animes_in_spring], sep=", ")
    
    # Close the internal aiohttp ClientSession
    await client.close()

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

This prints:

Canonical Title: Jujutsu Kaisen
Average Rating: 85.98
That Time I Got Reincarnated as a Slime: Ramiris to the Rescue, Blue Thermal, Q&A=E, Smol Adventures, Estab-Life: Great Escape

You can find more examples in the examples directory.

License

This project is distributed under the MIT license.