Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 1.28 KB

README.rst

File metadata and controls

45 lines (27 loc) · 1.28 KB

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