A Python HTTP superframework
Project description
uapi
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
Release history Release notifications | RSS feed
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)
Built Distribution
uapi-22.1.0-py3-none-any.whl
(30.3 kB
view hashes)