Skip to main content

sync & async Crypto Pay API client.

Project description

aiosend

Python Crypto Pay API Documentation Status Pydantic v2 Aiohttp uv Code linter: ruff Checked with mypy

aiosend is a synchronous & asynchronous Crypto Pay API client.

Official documentation

Telegram chat

Quick start

import asyncio
from aiosend import CryptoPay


async def main():
    cp = CryptoPay(token="TOKEN")
    app = await cp.get_me()
    print(app.name)  # Your App's Name


if __name__ == "__main__":
    asyncio.run(main())

aiogram 3.x integration example

import asyncio
from aiogram import Bot, Dispatcher
from aiosend import CryptoPay

cp = CryptoPay("TOKEN")
bot = Bot("TOKEN")
dp = Dispatcher()


@dp.message()
async def get_invoice(message):
    invoice = await cp.create_invoice(1, "USDT")
    await message.answer(f"pay: {invoice.bot_invoice_url}")
    invoice.poll(message=message)


@cp.invoice_paid()
async def handle_payment(invoice, message):
    await message.answer(f"invoice #{invoice.invoice_id} has been paid")


async def main():
    await asyncio.gather(
        dp.start_polling(bot),
        cp.start_polling(),
    )


if __name__ == "__main__":
    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

aiosend-3.0.6.tar.gz (199.5 kB view details)

Uploaded Source

Built Distribution

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

aiosend-3.0.6-py3-none-any.whl (61.0 kB view details)

Uploaded Python 3

File details

Details for the file aiosend-3.0.6.tar.gz.

File metadata

  • Download URL: aiosend-3.0.6.tar.gz
  • Upload date:
  • Size: 199.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aiosend-3.0.6.tar.gz
Algorithm Hash digest
SHA256 dc94b1f93b708153359f2077bfe78c42a34c831aee23a29f2bf6fca92df468d6
MD5 2c22c6ac569b0bfe8a9037800b741ad0
BLAKE2b-256 08c73d9aa8c5255d00beb5e8e8256220d3772f06cbe6764902efe3bd82146cf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiosend-3.0.6.tar.gz:

Publisher: deploy.yml on vovchic17/aiosend

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiosend-3.0.6-py3-none-any.whl.

File metadata

  • Download URL: aiosend-3.0.6-py3-none-any.whl
  • Upload date:
  • Size: 61.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aiosend-3.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 069f3e0b4dddcaa54c862736e7b94029803fdc24833d3297f04670a73ae9538b
MD5 603eb1deb99551778750c8f90720093b
BLAKE2b-256 5d1a280cff3c52989228eaa2cbf9252ee427565b5935df1a7a8c0372d0a85394

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiosend-3.0.6-py3-none-any.whl:

Publisher: deploy.yml on vovchic17/aiosend

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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