29 lines
696 B
Python
29 lines
696 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings."""
|
|
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
env_file_encoding="utf-8",
|
|
env_ignore_empty=True,
|
|
extra="ignore",
|
|
)
|
|
|
|
HOST: str = "localhost"
|
|
PORT: int = 8000
|
|
RELOAD: bool = True
|
|
LOG_LEVEL: str = "info"
|
|
|
|
LOG_FILE: str = "logs/app.log"
|
|
LOG_MAX_SIZE: int = 10 * 1024 * 1024
|
|
LOG_BACKUP_COUNT: int = 5
|
|
LOG_FORMAT: str = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
|
|
DATABASE_URL: str = "sqlite+aiosqlite:///data/soundboard.db"
|
|
DATABASE_ECHO: bool = False
|
|
|
|
|
|
settings = Settings()
|