semvec/pypi-packages huggingface dataset:
uma-auth-api 0.0.11
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.
License: Apache-2.0
Keywords: OpenAPI UMA Auth API

# 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.8.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)