import os from pathlib import Path from pydantic_settings import BaseSettings class Settings(BaseSettings): PROJECT_NAME: str = "Bible Quiz App API" API_V1_STR: str = "/api/v1" # Database settings DB_DIR: Path = Path("/app") / "storage" / "db" # Secret key for tokens SECRET_KEY: str = os.environ.get("SECRET_KEY", "insecuresecretkey") # Token expiration time in minutes ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 7 # 7 days class Config: env_file = ".env" env_file_encoding = "utf-8" settings = Settings() # Ensure database directory exists settings.DB_DIR.mkdir(parents=True, exist_ok=True)