☰
Debian Codegraph
@
0.141.1-2
0.141.1-1
0.135.3-1
/
/
docs_src
/
behind_a_proxy
/
tutorial002_py310.py
☽
☼
docs_src/behind_a_proxy/tutorial002_py310.py
code
plain
raw
Expat
(c) 2018 Sebastián RamÃrez
debian/copyright
1
from fastapi import FastAPI, Request
2
3
app = FastAPI(root_path="/api/v1")
4
5
6
@app.get("/app")
7
def read_main(request: Request):
8
return {"message": "Hello World", "root_path": request.scope.get("root_path")}