semvec/pypi-packages huggingface dataset:
mulenpay-api 1.0.12
Прием платежей и выплаты через Mulen Pay
Requires Python: >=3.8
Keywords: payment Mulen Pay wallex

# MulenPay API Client

## Описание

Асинхронный Python-клиент для работы с API MulenPay. Подходит для управления платежами и подписками.

## Установка

```bash
pip install pydantic==2.9.2
pip install httpx==0.27.2
pip install mulenpay-api
```

Использование
Настройка клиента
Для начала работы создайте экземпляр Payment или Subscribe, указав ваш api_key и secret_key.

```python
from mulenpay_api import Payment
from mulenpay_api.subscribe import Subscribe

api_key = 'ВАШ_API_KEY'
secret_key = 'ВАШ_SECRET_KEY'

payment = Payment(api_key=api_key, secret_key=secret_key)
subscribe = Subscribe(api_key=api_key)
```
# **Работа с платежами**

Создание платежа
```python
import asyncio

async def create_payment():
    response = await payment.create_payment(payment.CreatePayment(
        currency="rub",
        amount="1000.50",
        uuid="invoice_123",
        shopId=5,
        description="Покупка булочек",
        subscribe=None,
        holdTime=None
    ))
    print(response)

if __name__ == '__main__':
    asyncio.run(create_payment())
```
Получение списка платежей
```python
async def get_list():
    response = await payment.get_payment_list()
    print(response)

if __name__ == '__main__':
    asyncio.run(get_list())
```
Получение платежа по ID
```python
async def get_by_id():
    response = await payment.get_payment_by_id(5)
    print(response)

if __name__ == '__main__':
    asyncio.run(get_by_id())
```
Подтверждение платежа
```python
async def confirm_payment():
    response = await payment.confirm_payment(5)
    print(response)

if __name__ == '__main__':
    asyncio.run(confirm_payment())
```
Отмена платежа
```python
async def cancel_payment():
    response = await payment.cancel_payment(5)
    print(response)

if __name__ == '__main__':
    asyncio.run(cancel_payment())
```
Возврат платежа
```python
async def refund_payment():
    response = await payment.refund_payment(5)
    print(response)

if __name__ == '__main__':
    asyncio.run(refund_payment())
```
# **Работа с подписками**
Получение списка подписок
```python
async def get_subscription_list():
    response = await subscribe.get_subscription_list()
    print(response)

if __name__ == '__main__':
    asyncio.run(get_subscription_list())
```
Удаление подписки по ID
```python
async def delete_subscription():
    response = await subscribe.delete_subscription_by_id(5)
    print(response)

if __name__ == '__main__':
    asyncio.run(delete_subscription())
```
# Требования
-Python 3.7+

-Установленная библиотека mulenpay-api
mia-accounting 1.6.1
A Flask accounting module.
Requires Python: >=3.12
Keywords: mia, accounting, flask

===============
Mia! Accounting
===============


Description
===========

*Mia! Accounting* is an accounting module for Flask_ applications.
It is designed both for mobile and desktop environments.  It
implements `double-entry bookkeeping`_.  It generates the following
accounting reports:

* Trial balance
* Income statement
* Balance sheet

In addition, *Mia! Accounting* tracks offsets for unpaid payables and
receivables.


Live Demonstration and Test Site
================================

There is a `live demonstration`_ for *Mia! Accounting*.  It runs the
same code as the `test site`_ in the `source distribution`_.  It is
the simplest website that works with *Mia! Accounting*.  It is also
used in the automatic tests.

If you do not have a running Flask application or do not know how to
start one, you may start with the test site.


Installation
============

Install *Mia! Accounting* with ``pip``:

::

    pip install mia-accounting

You may also download from the `PyPI project page`_ or the
`release page`_ on the `Git repository`_.


Documentation
=============

Refer to the `documentation on Read the Docs`_.


Change Log
==========

Refer to the `change log`_.


Copyright
=========

 Copyright (c) 2023-2024 imacat.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.


Authors
=======

| imacat
| imacat@mail.imacat.idv.tw
| 2023/1/27


.. _Flask: https://flask.palletsprojects.com
.. _double-entry bookkeeping: https://en.wikipedia.org/wiki/Double-entry_bookkeeping
.. _live demonstration: https://accounting.imacat.idv.tw
.. _test site: https://github.com/imacat/mia-accounting/tree/main/tests/test_site
.. _source distribution: https://pypi.org/project/mia-accounting/#files
.. _PyPI project page: https://pypi.org/project/mia-accounting
.. _release page: https://github.com/imacat/mia-accounting/releases
.. _Git repository: https://github.com/imacat/mia-accounting
.. _documentation on Read the Docs: https://mia-accounting.readthedocs.io
.. _change log: https://mia-accounting.readthedocs.io/en/latest/changelog.html