kumquat
Simple asynchronous web framework, based on uvicorn.
Installation
Stable:
pip install kumquat
Unstable:
pip install https://github.com/kesha1225/Kumquat/archive/master.zip --upgrade
Usage
You can see more examples here.
from kumquat.application import Kumquat
from kumquat.response import TextResponse, JsonResponse, HTMLResponse
from kumquat.request import Request
from kumquat.response import SimpleResponse, TemplateResponse
import logging
logging.basicConfig(level="INFO")
app = Kumquat()
app.app_name = "KumquatApp"
@app.index()
async def index(request: Request, response: SimpleResponse):
response.status_code = 418
response.set_headers({"shue": "ppsh"})
return HTMLResponse("<h1>hello</h1>")
@app.get("/<name>/<age>")
async def some_json_route(request: Request, response: SimpleResponse):
name = request.path_dict["name"]
age = request.path_dict["age"]
return {"user": {"name": name, "age": age}}
app.run() # you can use ngrok - app.ngrok_run()
Metadata
Release files for kumquat 0.0.2
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 | |
|---|---|---|---|---|
| kumquat-0.0.2.tar.gz | 5.1 kB | Without provenance | Details |
Release files / kumquat-0.0.2.tar.gz
| Download URL | kumquat-0.0.2.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90ae11773a07dbc7102b507f192bd0d11ab47318a588b52027e3ddfe00b9a633
|
|
BLAKE2b-256 checksum How to use checksums |
a1d72aa80369ede2d98b7db63738b4ef18bfd536583f50342ad22af959c69bfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.41.1 CPython/3.7.3
|
Security for kumquat 0.0.2
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.