19 lines
473 B
Python
19 lines
473 B
Python
from pydantic_settings import BaseSettings
|
|
from pathlib import Path
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
API_V1_STR: str = "/api/v1"
|
|
PROJECT_NAME: str = "GenericRestAPI"
|
|
PROJECT_DESCRIPTION: str = "A FastAPI-based REST API"
|
|
VERSION: str = "0.1.0"
|
|
|
|
# Database settings
|
|
DB_DIR: Path = Path("/app") / "storage" / "db"
|
|
SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
|
|
|
|
class Config:
|
|
case_sensitive = True
|
|
|
|
|
|
settings = Settings() |