todoapp-rx2ww5/app/core/config.py
2025-05-24 15:14:55 +00:00

21 lines
504 B
Python

from typing import List
from pydantic_settings import BaseSettings
from pathlib import Path
class Settings(BaseSettings):
API_V1_STR: str = "/api/v1"
PROJECT_NAME: str = "Todo App"
ALLOWED_ORIGINS: List[str] = ["*"]
# Database settings
DB_DIR = Path("/app") / "storage" / "db"
DB_DIR.mkdir(parents=True, exist_ok=True)
DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
class Config:
env_file = ".env"
case_sensitive = True
settings = Settings()