Skip to main content

an async Python wrapper for the starlight.kirara API

Project description

Async-Kirara

An async port of pyKirara, that's about it

Usage

import asyncKirara
import asyncio

async def cards(loop):
    client = asyncKirara.Kirara()
    cards = await client.get_id('card_t', 'uzuki', card_rarity='ssr') # Get all SSR card IDS for Uzuki
    stuff = await client.get_cards(cards, en_translate=True) # Converts IDS into card objects

    for card in stuff: # Print the cards' attributes
        print('='*30)
        print(card.title)
        print(card.lead_skill.name)
        print(card.skill.name)
        print('\n')

    await client.close()

if __name__ == '__main__': # Async loop stuff
    loop = asyncio.get_event_loop()
    loop.run_until_complete(cards(loop))

Requirements

  • Python 3.6+ (Mabye I'll backport it to 3.5, if I feel like it)
  • aiohttp library

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

asyncKirara-1.0.0.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

asyncKirara-1.0.0-py3-none-any.whl (7.9 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