Skip to main content

asyncio_payok

Quickstart

Here's a quick example of using asyncio_payok to get your current balance:

import asyncio
from asyncio_payok import PayOk

async def main():
    client = PayOk('your_api_id', 'your_api_key', 'your_secret_key', 'your_shop_id')
    balance = await client.get_balance()
    print(balance)

asyncio.run(main())

Features

  • Asynchronous requests
  • Easy to use with Python's asyncio
  • Support for payment creation, balance checks, transaction retrieval, and payouts

Usage

Initializing the Client

Create an instance of the PayOk client with your API credentials:

from asyncio_payok import PayOk

client = PayOk(api_id='your_api_id', api_key='your_api_key', secret_key='your_secret_key', shop='your_shop_id')

Get Balance

Retrieve your current balance as follows:

balance = await client.get_balance()

Create Payment

Initiate a payment with the required details:

payment = await client.create_payment(amount='10.00', currency='USD', description='Payment Description', ...)

Transaction History

Fetch the transaction history by payment ID or offset:

transactions = await client.get_transactions(payment_id='123', offset=10)

Create Payout

Send a payout to a specified recipient:

payout = await client.create_payout(amount='10.00', receiver='receiver_info', ...)

Handling Exceptions

Handle API and network exceptions gracefully:

try:
    balance = await client.get_balance()
except Exception as e:
    print(f'Error occurred: {e}')

Dependencies

  • Python 3.6 or higher
  • aiohttp

Contributing

Contributions are welcome! Please open a pull request or issue to propose changes or additions.

License

This project is licensed under the MIT License.

Metadata

Release files for asyncio-payok 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asyncio-payok 1.0.0
File Size Uploaded Provenance
asyncio_payok-1.0.0.tar.gz 6.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for asyncio-payok 1.0.0
File Interpreter ABI Platform
asyncio_payok-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / asyncio_payok-1.0.0.tar.gz

Download URL asyncio_payok-1.0.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4a408b8aac2897476e59b7c17d6e27ffa7669456c5bdd764802b1740318ebcf9
BLAKE2b-256 checksum
How to use checksums
82e542c7b146ef87757c03243fb4cd309d0c6ea6833e1170920ec3635dc0d9fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.6

Release files / asyncio_payok-1.0.0-py3-none-any.whl

Download URL asyncio_payok-1.0.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1eb72fea4a85826c92fa94916905c642216d1f7cbfdd0c09455cb49a884fc65f
BLAKE2b-256 checksum
How to use checksums
273876fc899b0caf3b0928ab73636632284f2c8e1b7f1c2ab01cac3f073606b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.6

Security for asyncio-payok 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page