Metadata-Version: 2.1
Name: pyaiolava
Version: 0.1.1
Summary: Simple and convenient asynchronous library for working with the Business Lava API.
Home-page: https://github.com/kesevone/aiolava
Author: kesevone
Author-email: kesevone@gmail.com
Project-URL: Official documentation, https://dev.lava.ru/
Keywords: lava aiolava lavaapi pyaiolava businesslava
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.9.3
Requires-Dist: pydantic>=2.6.4

![alt text](https://telegra.ph/file/ab8d0def9474a9ee31bfb.png)

# :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 will be implemented under the Lava Payoff API.

## :arrow_heading_down: Installation (pip or git)
```
pip install pyaiolava
```
```
git clone git+https://github.com/kesevone/pyaiolava
```

## :page_facing_up: Simple usage
```python
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.
