todoapp-5jjxwx/app/core/config.py
2025-05-26 18:34:58 +00:00

22 lines
573 B
Python

from pathlib import Path
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
API_V1_STR: str = "/api/v1"
PROJECT_NAME: str = "Todo App API"
PROJECT_DESCRIPTION: str = "A simple Todo app API built with FastAPI and SQLite"
PROJECT_VERSION: str = "0.1.0"
# Database settings
DB_DIR = Path("/app") / "storage" / "db"
DB_DIR.mkdir(parents=True, exist_ok=True)
SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
class Config:
case_sensitive = True
env_file = ".env"
settings = Settings()