Skip to main content

Library for api.botstat.io

Project description

aiobotstat

Mini library for BotStat API.

Current API version: 0.1

Install

  • Git: pip install git+https://github.com/viuipan/aiobotstat.git

  • PyPi: pip install aiobotstat

Example:

import asyncio

from aiobotstat import BotStatAPI

BOT_TOKEN = ''
FILE_PATH = ''
BOT_USERNAME = ''

api = BotStatAPI(BOT_TOKEN)


async def main():
    bot_info = await api.get_bot_info(username=BOT_USERNAME)
    print(bot_info)

    task = await api.create_task(file=FILE_PATH)
    print(task)

    status = await api.get_task_status(task_id=task.id)
    print(status)

    cancel_result = await api.cancel_task(task_id=task.id)
    print(f'Cancel result is {cancel_result}')


asyncio.run(main())

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

aiobotstat-0.1.3.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

aiobotstat-0.1.3-py3-none-any.whl (7.3 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