sync & async Crypto Pay API client.
Project description
aiosend
aiosend is a syncronous & 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_polling()
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
aiosend-2.1.2.tar.gz
(187.8 kB
view details)
Built Distribution
aiosend-2.1.2-py3-none-any.whl
(52.1 kB
view details)
File details
Details for the file aiosend-2.1.2.tar.gz
.
File metadata
- Download URL: aiosend-2.1.2.tar.gz
- Upload date:
- Size: 187.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
fea6032c6a1469f8423270c61e0f83167fc523eab802f0fdeea421add7267449
|
|
MD5 |
5c5d834387983f4d41c55352c46f1701
|
|
BLAKE2b-256 |
0e484a41e7e1efc0e4d81c56f7d2309b5973ffcb120e4fa45c00f6cd4425f04e
|
Provenance
The following attestation bundles were made for aiosend-2.1.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-2.1.2.tar.gz
-
Subject digest:
fea6032c6a1469f8423270c61e0f83167fc523eab802f0fdeea421add7267449
- Sigstore transparency entry: 240235370
- Sigstore integration time:
-
Permalink:
vovchic17/aiosend@56ce3d04beb919cd81cdb554dc477f78db15c2d4
-
Branch / Tag:
refs/tags/v2.1.2
- Owner: https://github.com/vovchic17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
deploy.yml@56ce3d04beb919cd81cdb554dc477f78db15c2d4
-
Trigger Event:
push
-
Statement type:
File details
Details for the file aiosend-2.1.2-py3-none-any.whl
.
File metadata
- Download URL: aiosend-2.1.2-py3-none-any.whl
- Upload date:
- Size: 52.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
8a5babd2b354d78a540d43dd6ed810f5c03651f5a1e934be7bb19a5529ae44c6
|
|
MD5 |
ffd32bd18fe2e33ce70a16b5122f8a35
|
|
BLAKE2b-256 |
f91bfad12b92e7d448017993e75659a21bffdc3a0c47a87080b8b44b36427e8d
|
Provenance
The following attestation bundles were made for aiosend-2.1.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-2.1.2-py3-none-any.whl
-
Subject digest:
8a5babd2b354d78a540d43dd6ed810f5c03651f5a1e934be7bb19a5529ae44c6
- Sigstore transparency entry: 240235384
- Sigstore integration time:
-
Permalink:
vovchic17/aiosend@56ce3d04beb919cd81cdb554dc477f78db15c2d4
-
Branch / Tag:
refs/tags/v2.1.2
- Owner: https://github.com/vovchic17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
deploy.yml@56ce3d04beb919cd81cdb554dc477f78db15c2d4
-
Trigger Event:
push
-
Statement type: