Files
grademaxxing/backend/config.py
2026-01-17 13:37:57 +01:00

24 lines
645 B
Python

from pydantic_settings import BaseSettings
from typing import List
class Settings(BaseSettings):
mongodb_url: str
database_name: str = "grademaxxing"
secret_key: str
algorithm: str = "HS256"
access_token_expire_minutes: int = 43200 # 30 days
vite_api_url: str = "http://localhost:8000/api"
cors_origins: str = "http://localhost:5173,http://localhost:8000,http://127.0.0.1:8000"
@property
def cors_origins_list(self) -> List[str]:
return [origin.strip() for origin in self.cors_origins.split(",")]
class Config:
env_file = ".env"
case_sensitive = False
settings = Settings()