Skip to main content

Async AAIO api wrapper for python

Project description

AAIO API for Python 3

AAIO Official documentation

About

This library is a wrapper for the https://aaio.io API from enthusiasts. All methods are described and all types are explicitly defined. The library does not handle any exceptions, so be careful. Methods that create requests to aaio.io return an unprocessed server response in JSON format (Parsing JSON on the library side). A new session is used for each request. (Maybe will be revised in future). Please write about all problems related to the library in issues. API is up-to-date as of 25 August 2023.

Library Installation

  • Install via pip: pip install aaio
  • Download sources - git clone https://github.com/kewldan/AAIO

Getting Started

Get user balance

import asyncio

import aaio


async def main():
    client = aaio.AAIO('MERCHANT ID', 'SECRET KEY', 'API KEY')
    balances = await client.get_balances()
    #  balances = {
    #      "type": "success",
    #      "balance": 50.43, // Текущий доступный баланс
    #      "referal": 0, // Текущий реферальный баланс
    #      "hold": 1.57 // Текущий замороженный баланс
    #  }
    balance = balances['balance']
    print(balance)  # 50.43


asyncio.run(main())

Create payment URL for customer

import aaio

client = aaio.AAIO('MERCHANT ID', 'SECRET KEY', 'API KEY')
payment_url = client.create_payment(100, 'my_order_id', 'My order description', 'qiwi', 'support@aaio.io',
                                    'referral code', currency='USD',
                                    language='en')  # Not send request, just build a URL from parameters!
print(payment_url)  # Prints payment url for customer

Contact

E-Mail - kewldanil1@gmail.com Telegram - @kewldan

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

aaio-1.0.5.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

aaio-1.0.5-py3-none-any.whl (5.6 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