Skip to content

Commit

Permalink
quart benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Aug 15, 2020
1 parent 6fafab3 commit c4ff5ae
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app_quart.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from os import environ

from quart import Quart
from async_db import get_row

app = Quart("python-web-perf")


@app.route("/test")
async def test(request):
a, b = await get_row()
return {"a": str(a).zfill(10), "b": b}
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ falcon~=2.0.0
sanic~=19.12.2
bottle~=0.12.18
daphne~=2.5.0
Quart==0.13.0
requests-2.24.0
1 change: 1 addition & 0 deletions run-benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
('aiohttp', 1),
('daphne-starlette', 1),
('sanic-own', 1),
('uvicorn-quart', 1),
('uvicorn-sanic', 1),
('uvicorn-starlette', 1),
]
Expand Down
3 changes: 3 additions & 0 deletions serve-uvicorn-quart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

uvicorn --port 8001 --workers $PWPWORKERS app_quart:app

0 comments on commit c4ff5ae

Please sign in to comment.