Sync fastapi docs from 11614be9 on 2026-03-11
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from functools import lru_cache
|
||||
|
||||
from fastapi import Depends, FastAPI
|
||||
|
||||
from .config import Settings
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings():
|
||||
return Settings()
|
||||
|
||||
|
||||
@app.get("/info")
|
||||
async def info(settings: Settings = Depends(get_settings)):
|
||||
return {
|
||||
"app_name": settings.app_name,
|
||||
"admin_email": settings.admin_email,
|
||||
"items_per_user": settings.items_per_user,
|
||||
}
|
||||
Reference in New Issue
Block a user