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.2.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file aiobotstat-0.1.2.tar.gz.

File metadata

  • Download URL: aiobotstat-0.1.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for aiobotstat-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f802deda720de0be2600b036584b996ac121ed126eed3a754c4e13e1b5ac6cb4
MD5 f10e3c7b4e6de7e442e59d9756c31cde
BLAKE2b-256 e60425213ee3008bcc989837bf8aaa49055dd36dbb5f66903d585c549ec90929

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page