跳转到主要内容

此API允许您使用UMA服务器进行身份验证,并对用户的钱包执行操作。它是NWC服务器和主要UMA服务器之间的公开通信层。

项目描述

UMA Auth OpenAPI生成的Python Pydantic模型

此Python包由OpenAPI Generator项目自动生成

  • API版本:0.1
  • 生成器版本:7.7.0
  • 构建包:org.openapitools.codegen.languages.PythonFastAPIServerCodegen

需求

Python >= 3.7

安装与使用

要安装库,只需运行

pip install uma-auth-api

处理请求时,您可以执行如下操作

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()

请注意,此库仅包含请求和响应模型类型,以帮助进行类型安全和请求/响应的编码/解码。如果您想为特定的API框架进行更多自定义,可以使用OpenAPI Generator CLI生成自己的代码。以下是一些服务器框架的生成器

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装软件包的信息。

源分布

uma_auth_api-0.0.10.tar.gz (19.9 kB 查看哈希值)

上传时间: 源码

构建分发

uma_auth_api-0.0.10-py3-none-any.whl (45.0 kB 查看哈希值)

上传时间: Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面