Skip to main content

A simple async python wrapper for the kitsu.io API.

Project description

Kitsu.py

PyPI

A simple async python wrapper for the Kitsu.io API.

Key Features

  • Simple and modern Pythonic API using async/await
  • Fully type checked

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

Getting started

Search for an anime:

import kitsu
import asyncio

client = kitsu.Client()

async def main():
    data = await client.search_anime("jujutsu kaisen", limit=1)
    
    print("Canonical Title: " + data.canonical_title)
    print("Average Rating: " + str(data.average_rating))
    
    # 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

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-0.1.1.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

kitsu.py-0.1.1-py3-none-any.whl (8.6 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