aiosend
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())
Metadata
Release files for aiosend 3.0.8.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiosend-3.0.8.post1.tar.gz | 968.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiosend-3.0.8.post1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.0 MB
Release files / aiosend-3.0.8.post1.tar.gz
| Download URL | aiosend-3.0.8.post1.tar.gz |
|---|---|
| Size | 968.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddcfc0bb0289a861c3aefd572fb6da076aa26cb709ce0fb3f89078039a7a1392
|
|
BLAKE2b-256 checksum How to use checksums |
5e28f5a307b83307d4133ae180bd501a738c74705c39e61f13a2129f2ec57883
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / aiosend-3.0.8.post1-py3-none-any.whl
| Download URL | aiosend-3.0.8.post1-py3-none-any.whl |
|---|---|
| Size | 65.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2180e06c0d779f89488199234af9325c8afc26428ef33991ba2186907a5b7465
|
|
BLAKE2b-256 checksum How to use checksums |
8a90d436851140cbb22bd918397201bf331d959c811e3fc98e074291dad6b71b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|