Skip to main content

A Python HTTP superframework

Project description

uapi

Build status codecov Code style


uapi is a high-level, extremely fast Python microframework for writing HTTP APIs, either synchronously or asynchronously.

from asyncio import run
from uapi.starlette import App

app = App()

@app.get("/")
async def index() -> str:
    return "Index"

run(app.run())

Documentation is available at https://uapi-docs.readthedocs.io/en/latest/.

uapi uses a lower-level HTTP framework to run. Currently supported frameworks are aiohttp, Flask, Quart, and Starlette. An uapi app can be easily integrated into an existing project based on one of these frameworks, and a pure uapi project can be easily switched between them when needed.

uapi supports OpenAPI out of the box.

from uapi.flask import App

app = App()

@app.get("/")
def index() -> str:
    return "Index"

app.serve_openapi()
app.serve_elements()

run(app.run())  # Now open http://localhost:8000/elements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uapi-22.1.0.tar.gz (20.9 kB view hashes)

Uploaded Source

Built Distribution

uapi-22.1.0-py3-none-any.whl (30.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page