Paykassa.pro asyncio python client
Project description
aiopaykassa
paykassa.pro Api Python Async Library
Wrapper for Paykassa.pro API and SCI methods
API example:
from aiopaykassa.clients import PayKassaApi
api = PayKassaApi(api_id=<your_api_id>, api_key=<your_api_key>, shop=<your_merchant_id>) # test_mode=True for testing
async def print_bitcoin_btc_balance():
balance = await api.get_shop_balance()
print(balance.bitcoin_btc)
def main():
loop = asyncio.get_event_loop()
loop.run_until_complete(print_bitcoin_btc_balance())
SCI example:
import decimal
from aiopaykassa.clients import PayKassaSci
from aiopaykassa.types import NewOrder
sci = PayKassaSci(sci_id=<your_merchant_id>, sci_key=<your_merchant_password>) # test_mode=True for testing
async def create_order_btc(order_id: int, amount: decimal.Decimal, comment: str) -> NewOrder:
new_order = await sci.create_order(
order_id=order_id,
amount=amount,
currency=Currency.BTC,
system=System.BITCOIN,
comment=comment
)
return new_order
def main():
loop = asyncio.get_event_loop()
loop.run_until_complete(create_order_btc(1, decimal.Decimal(0.00001), "test"))
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
aiopaykassa-0.0.1a3.tar.gz
(8.9 kB
view details)
Built Distribution
File details
Details for the file aiopaykassa-0.0.1a3.tar.gz
.
File metadata
- Download URL: aiopaykassa-0.0.1a3.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.2 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5543f89c7299f965b81894e6b104eccadfee2803ca05f7f1ad8bc08168e7960 |
|
MD5 | 3353c595ab12bb77df61284299187ad8 |
|
BLAKE2b-256 | de09d8c24b12a5d513ae48b64c6bc5b5fa908ce58f1409ba654b40e8eeb2ebaf |
File details
Details for the file aiopaykassa-0.0.1a3-py3-none-any.whl
.
File metadata
- Download URL: aiopaykassa-0.0.1a3-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.2 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 789ae3cea61c1ab7345f2bbae80e9b4bd9bbc089e0ddec8e575b1202a2b4b786 |
|
MD5 | 242a2576d81ce826cb364685c9154b45 |
|
BLAKE2b-256 | 346c3b64e564e13cc17c55f1014183b220e2ecf9cc194cfbefb761baee2222d5 |