diff --git a/backend/config/config.py b/backend/config/config.py index eaac93b..a8aec25 100644 --- a/backend/config/config.py +++ b/backend/config/config.py @@ -1,17 +1,16 @@ from beanie import init_beanie from motor.motor_asyncio import AsyncIOMotorClient -from pydantic import BaseSettings -from typing import Literal +from pydantic import BaseSettings, Field from models.request import Request class Settings(BaseSettings): - DATABASE_URL: str - AZURE_KEY: str - AZURE_ENDPOINT: str - AZURE_LOCATION: str - ENV: Literal["dev", "prod"] + DATABASE_URL: str = Field(..., env="DATABASE_URL") + AZURE_KEY: str = Field(..., env="AZURE_KEY") + AZURE_ENDPOINT: str = Field(..., env="AZURE_ENDPOINT") + AZURE_LOCATION: str = Field(..., env="AZURE_LOCATION") + ENV: str = Field(..., env="ENV") class Config: env_file = ".env"