Debian Codegraph @

docs_src/path_params/tutorial003_py310.py

raw
1 from fastapi import FastAPI
2
3 app = FastAPI()
4
5
6 @app.get("/users/me")
7 async def read_user_me():
8 return {"user_id": "the current user"}
9
10
11 @app.get("/users/{user_id}")
12 async def read_user(user_id: str):
13 return {"user_id": user_id}