Skip to main content

Async wrapper for Traffy API

Project description

TraffyAPI

Asynchronous Python wrapper for the Traffy API.
This library is designed to simplify integration with Traffy task-based systems, especially for Telegram bots and automation platforms.

Features

  • Check if a task is completed
  • Fully asynchronous using aiohttp
  • Easy to use, with resource_id set once in the client

Installation

Install directly from GitHub:

pip install git+https://github.com/laymi0/traffy.git

Usage

import asyncio
from traffyapi import TraffyAPI

async def main():
    api = TraffyAPI("your_resource_id")

    # Get available tasks for a user
    tasks = await api.get_tasks("123456789")
    print("Tasks:", tasks)

    # Check if a task was completed
    result = await api.check_task("123456789", task_id="task_id_here")
    print("Check result:", result)

    await api.close()

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

traffyapi-0.1.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

traffyapi-0.1.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file traffyapi-0.1.0.tar.gz.

File metadata

  • Download URL: traffyapi-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for traffyapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 50d53e4f0402e17bad26b817e90540b32b51481e14ed78753927d77092dd426f
MD5 9674ac6aae98ed8f1d84be6706a3892f
BLAKE2b-256 a33b6781a79c103288a8e305eba2f9b5d040757c5af5e874329552f66f0bde2f

See more details on using hashes here.

File details

Details for the file traffyapi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: traffyapi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for traffyapi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 768dc3153131b4841c728abe00d66e2ac21b8488279590d71e56728e98c8a65f
MD5 6742ec54cfb2ce4f1c60e10c32050d48
BLAKE2b-256 785a82e510eaadd38630ca4bc08f5993b1cf54c1de5515ea5614056fdc2d185a

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