sync & async Crypto Pay API client.
Project description
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())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiosend-3.0.2.tar.gz.
File metadata
- Download URL: aiosend-3.0.2.tar.gz
- Upload date:
- Size: 196.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97b66286d367c89b79fa66ec6033593e52a1baafad6e4406294d9e8740cb8b65
|
|
| MD5 |
a9b5c3d0728386eee97c1361be17ec8f
|
|
| BLAKE2b-256 |
1aaa60d7a412dce79633b1742281b3d683df2dff048ebb21656cb3927db3195c
|
Provenance
The following attestation bundles were made for aiosend-3.0.2.tar.gz:
Publisher:
deploy.yml on vovchic17/aiosend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiosend-3.0.2.tar.gz -
Subject digest:
97b66286d367c89b79fa66ec6033593e52a1baafad6e4406294d9e8740cb8b65 - Sigstore transparency entry: 584403188
- Sigstore integration time:
-
Permalink:
vovchic17/aiosend@5e3254aef4716e696bddf57bcc5b6ac590cfdf57 -
Branch / Tag:
refs/tags/v3.0.2 - Owner: https://github.com/vovchic17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@5e3254aef4716e696bddf57bcc5b6ac590cfdf57 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aiosend-3.0.2-py3-none-any.whl.
File metadata
- Download URL: aiosend-3.0.2-py3-none-any.whl
- Upload date:
- Size: 59.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7365de0dab181270131d29de1411ce896ac726722adc5d21fe768e322f14be56
|
|
| MD5 |
1aa19d2a0d5d6a5056bc0442cf60282d
|
|
| BLAKE2b-256 |
502120d6a294a2d982e83391b9485ae900b48deb9b8eb5d9ea26d5337364492d
|
Provenance
The following attestation bundles were made for aiosend-3.0.2-py3-none-any.whl:
Publisher:
deploy.yml on vovchic17/aiosend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiosend-3.0.2-py3-none-any.whl -
Subject digest:
7365de0dab181270131d29de1411ce896ac726722adc5d21fe768e322f14be56 - Sigstore transparency entry: 584403195
- Sigstore integration time:
-
Permalink:
vovchic17/aiosend@5e3254aef4716e696bddf57bcc5b6ac590cfdf57 -
Branch / Tag:
refs/tags/v3.0.2 - Owner: https://github.com/vovchic17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@5e3254aef4716e696bddf57bcc5b6ac590cfdf57 -
Trigger Event:
push
-
Statement type: