Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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.

Files for asyncKirara, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size asyncKirara-1.1.0.tar.gz (5.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page