32 lines
720 B
Python
32 lines
720 B
Python
from pydantic_settings import BaseSettings
|
|
from functools import lru_cache
|
|
|
|
class Settings(BaseSettings):
|
|
# Database
|
|
DATABASE_URL: str = "postgresql://user:pass@localhost:5432/imagecreator"
|
|
|
|
# JWT
|
|
SECRET_KEY: str = "your-secret-key-change-in-production"
|
|
ALGORITHM: str = "HS256"
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
|
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
|
|
|
|
# CORS
|
|
CORS_ORIGINS: list[str] = ["http://localhost:3000"]
|
|
|
|
# LLM API Keys
|
|
GEMINI_API_KEY: str = ""
|
|
OPENAI_API_KEY: str = ""
|
|
|
|
# Image storage
|
|
IMAGE_STORAGE_PATH: str = "/app/uploads"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
|
|
@lru_cache()
|
|
def get_settings():
|
|
return Settings()
|
|
|
|
settings = get_settings()
|