uapi
uapi is an elegant, high-level, extremely low-overhead Python microframework for writing HTTP APIs, either synchronously or asynchronously.
uapi uses a lower-level HTTP framework to run. Currently supported frameworks are aiohttp, Django, 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.
Using uapi enables you to:
- write either async or sync styles of handlers, depending on the underlying framework used.
- use and customize a function composition (dependency injection) system, based on incant.
- automatically serialize and deserialize data through attrs and cattrs.
- generate and use OpenAPI descriptions of your endpoints.
- optionally type-check your handlers with Mypy.
- write and use reusable and powerful middleware, which integrates into the OpenAPI schema.
- integrate with existing apps based on Django, Starlette, Flask, Quart or aiohttp.
Here's a simple taste (install Flask and gunicorn first):
from uapi.flask import App
app = App()
@app.get("/")
def index() -> str:
return "Index"
app.serve_openapi()
app.serve_elements()
app.run(__name__) # Now open http://localhost:8000/elements
Project Information
License
uapi is written by Tin Tvrtković and distributed under the terms of the Apache-2.0 license.
Metadata
Release files for uapi 23.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| uapi-23.3.0.tar.gz | 340.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uapi-23.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 387.9 kB
Release files / uapi-23.3.0.tar.gz
| Download URL | uapi-23.3.0.tar.gz |
|---|---|
| Size | 340.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a75ce2adb30d9839993c556b24fb6f15ef000878470b16dfd61cf1a2a559ea8
|
|
BLAKE2b-256 checksum How to use checksums |
471db8965bf974c6b286e26c1167612cc58db95dc7859c6d3d2a48f25bc698b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / uapi-23.3.0-py3-none-any.whl
| Download URL | uapi-23.3.0-py3-none-any.whl |
|---|---|
| Size | 47.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0380f10560757407e1f25daca495d01e38497b3904fc84fdc7de7d5866604ea7
|
|
BLAKE2b-256 checksum How to use checksums |
e7be9e0eafd19a1398f26a6cb26f4ff9512e8e7577d3b4a68966d7ad06fd06ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for uapi 23.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.