17 lines
433 B
Python
17 lines
433 B
Python
from pathlib import Path
|
|
from pydantic_settings import BaseSettings
|
|
|
|
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
PROJECT_NAME: str = "Todo Application"
|
|
API_V1_STR: str = "/api/v1"
|
|
|
|
# Database
|
|
DB_DIR = BASE_DIR.parent / "storage" / "db"
|
|
DB_DIR.mkdir(parents=True, exist_ok=True)
|
|
SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
|
|
|
|
|
|
settings = Settings() |