📝 Update docs, add first tutorials

This commit is contained in:
Sebastián Ramírez
2018-12-14 14:27:02 +04:00
parent 400a4a99af
commit 093bb4cd19
90 changed files with 518 additions and 27 deletions

View File

@@ -0,0 +1,13 @@
from fastapi import FastAPI, Path
app = FastAPI()
@app.get("/items/{item_id}")
async def read_items(
*, item_id: int = Path(..., title="The ID of the item to get"), q: str
):
results = {"item_id": item_id}
if q:
results.update({"q": q})
return results