Neda/Back/core/config.py

33 lines
642 B
Python
Executable File

from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
APP_NAME: str = "NEDA"
DEBUG: bool = False
SECRET_KEY: str
ACCESS_TOKEN_EXPIRE_DAYS: int = 1
REFRESH_TOKEN_EXPIRE_WEEKS: int = 12
ALGORITHM: str = "HS256"
SECRET_PASS_LENGTH: int
DATABASE_URL: str
REDIS_URL: str
LIVEKIT_API_KEY: str
LIVEKIT_API_SECRET: str
LIVEKIT_HOST: str
class Config:
env_file = ".env"
case_sensitive = True
extra = "ignore"
@lru_cache
def get_settings() -> Settings:
return Settings() # type: ignore
settings = get_settings()