CryptoPayAPI-0.0.3
توضیحات
Simple libary for https://t.me/CryptoBot
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | CryptoPayAPI-0.0.3 |
| نام | CryptoPayAPI |
| نسخه کتابخانه | 0.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | aweone |
| ایمیل نویسنده | aweonegithub@gmail.com |
| آدرس صفحه اصلی | https://github.com/aweone/CryptoPayAPI |
| آدرس اینترنتی | https://pypi.org/project/CryptoPayAPI/ |
| مجوز | MIT License |
# CryptoPayAPI
Simple library for https://t.me/CryptoBot
### Installation
```
$ pip install CryptoPayAPI
```
### Usage
#### Asynchronous
```Python
from CryptoPayAPI.AioCryptoPay import AioCryptoPay
from CryptoPayAPI.types import Asset
import asyncio
async def main():
#create session
cryptopay = AioCryptoPay(token="token")
#get balance wallets
await cryptopay.get_balance()
#create invoice
invoice = await cryptopay.create_invoice(asset=Asset.BTC, amount=10)
print(invoice.pay_url)
#get list of inovices
invoices = await cryptopay.get_invoices(asset=Asset.TON)
#close session
await cryptopay.close()
asyncio.run(main())
```
#### Synchronous
```Python
from CryptoPayAPI.CryptoPay import CryptoPay
from CryptoPayAPI.types import Asset
# create session
cryptopay = CryptoPay(token="token")
# get balance wallets
cryptopay.get_balance()
# create invoice
invoice = cryptopay.create_invoice(asset=Asset.BTC, amount=10)
print(invoice.pay_url)
# get list of inovices
invoices = cryptopay.get_invoices(asset=Asset.TON)
```
### Docs
The library is fully compatible with the official api - https://help.crypt.bot/crypto-pay-api
### Donation
BTC - bc1qltq6d7lzprr9hhpya4pptwj3997gpwkzhulksh
ETH - 0x6727e912855A289A340Ba1213E1038AdB0E3CDb9
USDT (TRC20) - TH5JtPd7siwCb4AnHyGniMz52gtysY3zEJ
نیازمندی
| مقدار | نام |
|---|---|
| ~=3.8.1 | aiohttp |
| ~=0.23.0 | httpx |
نحوه نصب
نصب پکیج whl CryptoPayAPI-0.0.3:
pip install CryptoPayAPI-0.0.3.whl
نصب پکیج tar.gz CryptoPayAPI-0.0.3:
pip install CryptoPayAPI-0.0.3.tar.gz