AAIO API for Python 3
About
This library is a wrapper for the https://aaio.so API from enthusiast. All methods are described and all types are explicitly defined. Methods that create requests to aaio.so return a pydantic's models for each response. Please write about all problems related to the library to issues
API is up-to-date as of 06 September 2024.
- PyPl - https://pypi.org/project/aaio/
- Github - https://github.com/kewldan/AAIO
- Docs - https://kewldan.ru/projects/aaio
- Demo - https://t.me/aaio_demo_bot
- Requirements: Python >= 3.7
- Added to AAIO SDKs
Features
- It's completely asynchronous
- You can use multiple clients to work with multiple users or shops
- All methods for working with API are implemented
- The library returns strictly typed for responses from APIs
- For each method, docstrings are used
- The library handle {type: error} responses and throws AAIOBadRequest exception
- Our library was the first to be added to the official AAIO wiki
- Modern, strict code for Python 3.7
Library Installation
- Install via pip:
pip install aaio - Download sources -
git clone https://github.com/kewldan/AAIO
Getting Started
Get user balance
import asyncio
from aaio import AAIO
async def main():
client = AAIO('MERCHANT ID', 'SECRET KEY', 'API KEY')
balances = await client.get_balances()
print(balances) # type='success' code=None message=None balance=625.85 referral=172.96 hold=0.0
asyncio.run(main())
Create payment URL for customer
import asyncio
from aaio import AAIO
async def main():
client = AAIO('MERCHANT ID', 'SECRET KEY', api_key='API KEY')
# New way to create payments
payment_url = await client.get_pay_url(100, 'my_order_id', 'My order description', 'qiwi', 'support@aaio.so',
'referral code', currency='USD',
language='en')
print(payment_url) # Prints payment url for customer
# DEPRECATED METHOD
payment_url = client.create_payment(100, 'my_order_id', 'My order description', 'qiwi', 'support@aaio.so',
'referral code', currency='USD',
language='en')
print(payment_url)
###################
asyncio.run(main())
Create payoff
import asyncio
from aaio import AAIO
async def main():
client = AAIO('MERCHANT ID', 'SECRET KEY', api_key='API KEY')
payoff = await client.create_payoff('qiwi', 100.35, '79998887766', 'my_payoff_id')
print(payoff.status) # in_progress
asyncio.run(main())
Contact
- E-Mail - kewldanil1@gmail.com
- Telegram - @kewldan
License
Metadata
Release files for aaio 1.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aaio-1.4.2.tar.gz | 87.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aaio-1.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 99.1 kB
Release files / aaio-1.4.2.tar.gz
| Download URL | aaio-1.4.2.tar.gz |
|---|---|
| Size | 87.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf351122d4a57dbd022ba7ea92df95b35b4df40a5fb39cd9a2731d77cb1d0f4d
|
|
BLAKE2b-256 checksum How to use checksums |
10f2a47fa6b7bf10d2cd7b8ad874a337b2fb4f704da29e1bc5e76c7c6e9a9a92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / aaio-1.4.2-py3-none-any.whl
| Download URL | aaio-1.4.2-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19477f5dc8756cd872a08a604f80da96c7e1ec974cc3e41fd3460e13183bbcd0
|
|
BLAKE2b-256 checksum How to use checksums |
8b9138d91081509e48f73d3e3311df999a2f6239ba66aac9410c6271642959c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|