Coverage for docs_src / path_params / tutorial003_py310.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.3, created at 2026-02-12 18:15 +0000

1from fastapi import FastAPI 1abcd

2 

3app = FastAPI() 1abcd

4 

5 

6@app.get("/users/me") 1abcd

7async def read_user_me(): 1abcd

8 return {"user_id": "the current user"} 1efg

9 

10 

11@app.get("/users/{user_id}") 1abcd

12async def read_user(user_id: str): 1abcd

13 return {"user_id": user_id} 1efg