intern_assignment / app /core /config.py
Battlecon's picture
Initial clean deployment commit
05cb41b
Raw
History Blame Contribute Delete
533 Bytes
import os
from dotenv import load_dotenv
# Load variables from the .env file
load_dotenv()
class Settings:
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
# Defaults to local MongoDB if no URI is provided in .env
MONGO_URI = os.getenv("MONGO_URI", "mongodb+srv://sudhanp2004:root@cluster0.wsmrt.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0")
DB_NAME = "plum_opd_db"
settings = Settings()
if not settings.GEMINI_API_KEY:
raise ValueError("GEMINI_API_KEY is missing. Please add it to your .env file.")