Async crypto pay api wrapper for t.me/cryptobot
Project description
async-crypto-pay-api
Async Crypto Pay API wrapper for Telegram Crypto Bot written in Python 3.10+.
Requirements
- Python 3.10 or higher
- Valid Crypto Bot API token (get one here)
Installation
pip install async-crypto-pay-api
Example
from asyncio import run
from async_crypto_pay_api import CryptoPayApi
from async_crypto_pay_api.models import CurrencyType, FiatAsset
crypto = CryptoPayApi("{token}")
async def main() -> None:
# Context manager handles connection lifecycle
async with crypto:
app_info = await crypto.get_me()
print(app_info.model_dump_json(indent=4))
# Create payment invoice
invoice = await crypto.create_invoice(
currency_type=CurrencyType.FIAT,
fiat=FiatAsset.USD,
amount=100,
)
print(f"Invoice URL: {invoice.bot_invoice_url}")
run(main())
License
This project is licensed under the GNU Lesser General Public License v3.0 only. See LICENSE for details.
Contributing
Contributions are welcome! Please open an issue or submit a PR for:
- Bug fixes
- New features
- Documentation improvements
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
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 async_crypto_pay_api-1.2.0.tar.gz.
File metadata
- Download URL: async_crypto_pay_api-1.2.0.tar.gz
- Upload date:
- Size: 61.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f43730462bcae012c7f1b1d9dde8d0f5ec79eb3dce31e75bf457b2bc69dc114f
|
|
| MD5 |
c2dc5a4f5d62ac066ea52e3583600deb
|
|
| BLAKE2b-256 |
c187ba746305abe3869837c3779fcd524316de8489f0ea33333c55ef4790c1f1
|
File details
Details for the file async_crypto_pay_api-1.2.0-py3-none-any.whl.
File metadata
- Download URL: async_crypto_pay_api-1.2.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39e436bce29f291c07955b9878272b008ffab11761fce4fbc09de0aece7e6dab
|
|
| MD5 |
c7276dc22b5f3080bd9a8f9957f2e799
|
|
| BLAKE2b-256 |
e4df802f99868cc82908758d3888a0e5b477c4f62cef1acbfb09517a267b0b4b
|