2025-05-17 02:53:13 +00:00

29 lines
669 B
Python

from pathlib import Path
from typing import List
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
# Project settings
PROJECT_NAME: str = "Simple TODO Application"
PROJECT_DESCRIPTION: str = "A simple TODO application built with FastAPI and SQLite"
PROJECT_VERSION: str = "0.1.0"
# API settings
API_PREFIX: str = "/api"
CORS_ORIGINS: List[str] = ["*"]
# Database settings
DB_DIR: Path = Path("/app") / "storage" / "db"
class Config:
env_file = ".env"
case_sensitive = True
settings = Settings()
# Ensure database directory exists
settings.DB_DIR.mkdir(parents=True, exist_ok=True)