Coverage for docs_src/bigger_applications/app_an_py39/main.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-08-08 03:53 +0000

1from fastapi import Depends, FastAPI 1abcd

2 

3from .dependencies import get_query_token, get_token_header 1abcd

4from .internal import admin 1abcd

5from .routers import items, users 1abcd

6 

7app = FastAPI(dependencies=[Depends(get_query_token)]) 1abcd

8 

9 

10app.include_router(users.router) 1abcd

11app.include_router(items.router) 1abcd

12app.include_router( 1abcd

13 admin.router, 

14 prefix="/admin", 

15 tags=["admin"], 

16 dependencies=[Depends(get_token_header)], 

17 responses={418: {"description": "I'm a teapot"}}, 

18) 

19 

20 

21@app.get("/") 1abcd

22async def root(): 1abcd

23 return {"message": "Hello Bigger Applications!"} 1abcd