Skip to content

An asynchronous way to fetch data from nitrotype.

License

Notifications You must be signed in to change notification settings

axemalt/asyncnt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AsyncNT

An asynchronous way to fetch data from nitrotype.

Features

  • Asyncio support
  • Access to the Nitro Type API
  • Rate limit of 10 requests per second
  • Cache to speed up requests

Installation

pip install asyncnt

Basic Usage

import asyncio
import asyncnt


async def main():
    #create a session
    async with asyncnt.Session() as session:
        #get a Racer object
        racer = await session.get_racer("travis")
        #print races the racer has
        print(racer.races)

        #get a Team object
        team = await session.get_team("NT")
        #print team's daily speed
        print(team.daily_speed)

Check out the docs for more information.

Lisence

MIT