pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
552 B
23 lines
552 B
from fastapi import Depends, FastAPI
|
|
|
|
from .dependencies import get_query_token, get_token_header
|
|
from .internal import admin
|
|
from .routers import items, users
|
|
|
|
app = FastAPI(dependencies=[Depends(get_query_token)])
|
|
|
|
|
|
app.include_router(users.router)
|
|
app.include_router(items.router)
|
|
app.include_router(
|
|
admin.router,
|
|
prefix="/admin",
|
|
tags=["admin"],
|
|
dependencies=[Depends(get_token_header)],
|
|
responses={418: {"description": "I'm a teapot"}},
|
|
)
|
|
|
|
|
|
@app.get("/")
|
|
async def root():
|
|
return {"message": "Hello Bigger Applications!"}
|
|
|