19 lines
512 B
Python
19 lines
512 B
Python
from pathlib import Path
|
|
from typing import List, ClassVar
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class Settings(BaseModel):
|
|
PROJECT_NAME: str = "SimpleTodo API"
|
|
VERSION: str = "0.1.0"
|
|
DESCRIPTION: str = "A simple Todo API built with FastAPI and SQLite"
|
|
CORS_ORIGINS: List[str] = ["*"]
|
|
|
|
# Database settings
|
|
DB_DIR: ClassVar[Path] = Path("/app") / "storage" / "db"
|
|
DB_DIR.mkdir(parents=True, exist_ok=True)
|
|
DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
|
|
|
|
|
|
settings = Settings() |