from urllib.parse import quote_plus from pydantic_settings import BaseSettings class Settings(BaseSettings): DB_HOST: str = "localhost" DB_PORT: int = 3306 DB_USER: str = "root" DB_PASS: str = "" DB_NAME: str = "" DB_ECHO: bool = False SECRET_KEY: str = "change-me-to-a-random-secret-key" ALGORITHM: str = "HS256" ACCESS_TOKEN_EXPIRE_MINUTES: int = 1440 GOOGLE_CLIENT_ID: str = "" RESEND_API_KEY: str = "" EMAIL_FROM: str = "noreply@profitra.id" FRONTEND_URL: str = "http://localhost:3000" @property def DATABASE_URL(self) -> str: return f"mysql+pymysql://{self.DB_USER}:{quote_plus(self.DB_PASS)}@{self.DB_HOST}:{self.DB_PORT}/{self.DB_NAME}" class Config: env_file = ".env" settings = Settings()