mirror of
https://github.com/kevin-DL/fast_api_api_template.git
synced 2026-01-11 01:34:29 +00:00
20 lines
350 B
Python
20 lines
350 B
Python
from fastapi import FastAPI, APIRouter
|
|
|
|
from api.routes import items, auth, users
|
|
|
|
app = FastAPI()
|
|
|
|
api_router = APIRouter()
|
|
api_router.include_router(auth.router)
|
|
|
|
|
|
api_router.include_router(users.router)
|
|
api_router.include_router(items.router)
|
|
|
|
app.include_router(api_router)
|
|
|
|
|
|
@app.get("/")
|
|
async def root():
|
|
return {"message": "Hello World"}
|