Metadata-Version: 2.1
Name: uma-auth-api
Version: 0.0.2
Summary: This API allows you to authenticate with the UMA server to take actions on a user&#39;s wallet. It&#39;s the exposed communication layer between the NWC server and the main UMA server.
Author: Lightspark Group, Inc.
Author-email: info@lightspark.com
License: Apache-2.0
Project-URL: Documentation, https://docs.uma.me/
Project-URL: Source Code, https://github.com/uma-universal-money-address/uma-auth-api/
Keywords: OpenAPI UMA Auth API
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi[all]

# UMA Auth OpenAPI-generated Python Pydantic Models

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.1
- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.PythonFastAPIServerCodegen

## Requirements

Python >= 3.7

## Installation & Usage

To install the library, simply run:

```bash
pip install uma-auth-api
```

When handling a request, you can do something like:

```python
from uma_auth.models.pay_invoice_request import PayInvoiceRequest
from uma_auth.models.pay_invoice_response import PayInvoiceResponse

def handle_pay_invoice():
    try:
        request_data = PayInvoiceRequest.from_dict(request.get_json())
    except Exception as e:
        abort_with_error(400, f"Invalid request: {e}")

    invoice = request_data.invoice
    amount = request_data.amount

    # ... actually pay the invoice ...

    return PayInvoiceResponse(preimage=payment_result.preimage).to_dict()
```

Note that this library only contains request and response model types to help with type safety and encoding/decoding of requests and responses.
If you want something more custom for a specific API framework, you can generate your own code using the
[OpenAPI Generator CLI](https://openapi-generator.tech/docs/generators). There are generators for the following server frameworks:

- [aiohttp](https://openapi-generator.tech/docs/generators/python-aiohttp)
- [blueplanet](https://openapi-generator.tech/docs/generators/python-blueplanet)
- [fastapi](https://openapi-generator.tech/docs/generators/python-fastapi)
- [flask](https://openapi-generator.tech/docs/generators/python-flask)
