mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-31 18:20:45 -05:00
* ✨ Update settings examples to use lru_cache * 📝 Update docs for Settings, using @lru_cache * 🎨 Update lru_cache colors to show difference in stored values
11 lines
195 B
Python
11 lines
195 B
Python
from pydantic import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
app_name: str = "Awesome API"
|
|
admin_email: str
|
|
items_per_user: int = 50
|
|
|
|
class Config:
|
|
env_file = ".env"
|