Coverage for docs_src/sub_applications/tutorial001.py: 100%
10 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 FastAPI 1abcde
3app = FastAPI() 1abcde
6@app.get("/app") 1abcde
7def read_main(): 1abcde
8 return {"message": "Hello World from main app"} 1abcde
11subapi = FastAPI() 1abcde
14@subapi.get("/sub") 1abcde
15def read_sub(): 1abcde
16 return {"message": "Hello World from sub API"} 1abcde
19app.mount("/subapi", subapi) 1abcde