Initial commit with the basics

This commit is contained in:
Scott Idem
2020-09-14 12:41:02 -04:00
parent bd7f33fbbf
commit eeedc2ad6f
16 changed files with 823 additions and 36 deletions

View File

@@ -0,0 +1,18 @@
from fastapi import APIRouter
router = APIRouter()
@router.get("/users/", tags=["users"])
async def read_users():
return [{"username": "Foo"}, {"username": "Bar"}]
@router.get("/users/me", tags=["users"])
async def read_user_me():
return {"username": "fakecurrentuser"}
@router.get("/users/{username}", tags=["users"])
async def read_user(username: str):
return {"username": username}