Coverage for docs_src/bigger_applications/app_an/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 1abcde

2 

3from .dependencies import get_query_token, get_token_header 1abcde

4from .internal import admin 1abcde

5from .routers import items, users 1abcde

6 

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

8 

9 

10app.include_router(users.router) 1abcde

11app.include_router(items.router) 1abcde

12app.include_router( 1abcde

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("/") 1abcde

22async def root(): 1abcde

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