Coverage for docs_src/bigger_applications/app_an/routers/users.py: 100%
11 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
1from fastapi import APIRouter 1abcde
3router = APIRouter() 1abcde
6@router.get("/users/", tags=["users"]) 1abcde
7async def read_users(): 1abcde
8 return [{"username": "Rick"}, {"username": "Morty"}] 1abcde
11@router.get("/users/me", tags=["users"]) 1abcde
12async def read_user_me(): 1abcde
13 return {"username": "fakecurrentuser"} 1abcde
16@router.get("/users/{username}", tags=["users"]) 1abcde
17async def read_user(username: str): 1abcde
18 return {"username": username} 1abcde