Skip to main content

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


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 hashes)

Uploaded Source

Built Distribution

aiopaykassa-0.0.1a3-py3-none-any.whl (18.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page