doron-goldstein / Kadal

Async wrapper for the Anilist API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kadal

Kadal is an async wrapper for the Anilist API.

This wrapper is compatible with Python 3.5+. Kadal is compatible with python's standard asyncio or trio / curio through multio.

Documentation to be added soon.

This wrapper is aimed at ease of use and an object-oriented style, and stays as true as possible to the anilist API v2.

Installation

Kadal is available through pip:

pip install -U kadal

Example

import multio
import kadal

multio.init("curio")  # tell multio which async lib to use

async def main():
    k = kadal.Client()  # Create a new Client instance

    anime = await k.search_anime("rezero")  # search for an anime by title
    # alternatively, you can use an id with k.get_anime(id)

    print("Anime title: {}".format(anime.title))  # Print the title of the Anime

multio.run(main())  # run main using multio (in this case, directing to curio)

Prints:

Anime title: Re:Zero kara Hajimeru Isekai Seikatsu

About

Async wrapper for the Anilist API

License:MIT License


Languages

Language:Python 100.0%