Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kitsu_py-1.1.2.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distribution

kitsu_py-1.1.2-py3-none-any.whl (12.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page