2025-06-10 12:02:57 +08:00

27 lines
785 B
Python

import os
import secrets
class Config:
# MongoDB Atlas connection string: set it in your environment variables
MONGO_URI: str = os.environ.get("MONGO_URI", "mongodb://localhost:27017/surfsmart")
# Flask secret key for sessions and JWT (use a secure value in production)
SECRET_KEY: str = os.environ.get("SECRET_KEY", secrets.token_hex(32))
# JWT configuration
JWT_ALGORITHM: str = "HS256"
JWT_EXP_DELTA_HOURS: int = 2
# TODO make this name selectable
GEMINI_MODEL_NAME = 'gemini-1.5-pro-latest'
# For celery
CELERY_BROKER_URL = os.environ.get("CELERY_BROKER_URL", "redis://localhost:6379/0")
CELERY_RESULT_BACKEND = os.environ.get("CELERY_RESULT_BACKEND", "redis://localhost:6379/0")
config = {
"default": Config()
}