35 lines
694 B
Python
Executable File
35 lines
694 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 = 4
|
|
|
|
DATABASE_URL: str
|
|
REDIS_URL: str
|
|
REDIS_USERNAME: str
|
|
REDIS_PASSWORD: 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() |