Simple and convenient asynchronous library for working with the Business Lava API.
Project description
:a: Aiolava — a simple and convenient asynchronous library for working with the Business Lava API.
You will be able to create invoices with all the parameters that are available in the Lava API, as well as receive information about them after creation. Also, you can get information about the balance, and in the future, methods for the Payoff API, the Reccurent API will be implemented
:arrow_heading_down: Installation (git)
git clone git+https://github.com/kesevone/aiolava
:page_facing_up: Simple usage
import asyncio
from pyaiolava import BusinessAiolava
from pyaiolava.models import NewInvoiceModel
from pyaiolava.utils.generators import generate_payment_id
SHOP_ID = 'YOUR_SHOP_ID'
API_KEY = 'YOUR_API_KEY'
lava = BusinessAiolava(
api_key=API_KEY,
shop_id=SHOP_ID
)
async def main() -> None:
payment_id = generate_payment_id()
new_invoice: NewInvoiceModel = await lava.create_invoice(
payment_id=payment_id,
amount=150,
payment_methods=['sbp', 'card'],
custom_data='Test Custom Data'
)
print(new_invoice)
if __name__ == '__main__':
asyncio.run(main())
All data returned from the API is converted into a convenient Pydantic-model with clear parameter names.
:zap: TODO
- Implement methods for Payoff API
- Implement methods for Recurrent API
Thanks to REPTIS for providing Lava API tokens.
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
pyaiolava-0.1.2.tar.gz
(10.1 kB
view details)
File details
Details for the file pyaiolava-0.1.2.tar.gz.
File metadata
- Download URL: pyaiolava-0.1.2.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dcc74cf85a1c00ac4667cac742bd6bf61ffb8a16664568cda1b805fea42e0e4
|
|
| MD5 |
2bef7721d9268c39b83f46cffb2a0454
|
|
| BLAKE2b-256 |
8f4efee7a69d0d084234369b6a6d503700aedc3d1a8cfd6d683d6d9e18c57603
|