31 lines
924 B
Python
31 lines
924 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+srv://surfsmart_server:IVV0mzUcwoEqHjNV@projectdatacluster.ki0t3z8.mongodb.net/surfsmart?retryWrites=true&w=majority&appName=ProjectDataCluster"
|
|
)
|
|
|
|
# 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()
|
|
} |