Cleanup and remove some deprecated code

This commit is contained in:
Adam Hopkins
2020-12-14 09:23:13 +02:00
parent fc4b7df088
commit 39fe6ea5b1
6 changed files with 19 additions and 110 deletions

View File

@@ -10,6 +10,7 @@ from pathlib import Path
from sanic import Sanic, response
app = Sanic(__name__)
@@ -42,7 +43,9 @@ async def handler_file(request):
@app.route("/file_stream")
async def handler_file_stream(request):
return await response.file_stream(Path("../") / "setup.py", chunk_size=1024)
return await response.file_stream(
Path("../") / "setup.py", chunk_size=1024
)
@app.route("/stream", stream=True)