Async client for lava.ru business-API
Project description
LavaBusiness
Asynchronous client for Lava.ru Business-API
Асинхронный клиент для работы с Lava.ru Бизнес-API
Examples
Creating invoice
import asyncio
from LavaBusiness import AioLava
SECRET_KEY = ""
PROJECT_ID = ""
api = AioLava(SECRET_KEY, PROJECT_ID)
async def main():
invoice = await api.create_invoice(100)
print(f'Payment url: {invoice.url}')
print(f'Invoice ID: {invoice.invoice_id}')
asyncio.run(main())
Checking invoice status
import asyncio
from LavaBusiness import AioLava
SECRET_KEY = ""
PROJECT_ID = ""
api = AioLava(SECRET_KEY, PROJECT_ID)
async def main():
INVOICE_ID = ""
invoice = await api.invoice_status(INVOICE_ID)
if invoice.status == 'success':
print('Invoice paid')
elif invoice.status == 'expired':
print('Invoice expired')
else:
print('Waiting for payment')
asyncio.run(main())
More examples: examples/
Detailed docs: https://lavabusiness.readthedocs.io/en/latest/
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
lavabusiness-2.0.0.tar.gz
(12.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lavabusiness-2.0.0.tar.gz.
File metadata
- Download URL: lavabusiness-2.0.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29160b217beda1a77fbf51aeacfedd2f9bed3b49181e0f41c25b86b4ec9dc4b1
|
|
| MD5 |
441f788d33aceb43eb6873472887ac9c
|
|
| BLAKE2b-256 |
1289747593c4e1fe466de144e4bebf9218b75a9968f6664054d3a225bdbb4eed
|
File details
Details for the file lavabusiness-2.0.0-py3-none-any.whl.
File metadata
- Download URL: lavabusiness-2.0.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f03f1f8aa073167b2ffc315e0b41e48df1adf8749034b8db6cb8a6e685e42c0f
|
|
| MD5 |
262e2e6fc4d77d64621ef85830cbd934
|
|
| BLAKE2b-256 |
cd24afb7cc5f20959c28d1ee633aec09faba16da5e87a0cb5a7b817b88eaddda
|