openai-openapi-template / app /config /security_config.py
cevheri's picture
feat: conversation/completion_id api implementation completed
87dbdac
raw
history blame contribute delete
550 Bytes
from pydantic_settings import BaseSettings, SettingsConfigDict
from functools import lru_cache
class SecurityConfig(BaseSettings):
"""Security configuration to be set in env variables"""
model_config = SettingsConfigDict(
env_prefix="SECURITY_",
env_file=".env",
env_file_encoding="utf-8",
extra="ignore",
)
SECRET_KEY: str = "your-secret-key-here"
ENABLED: bool = True
DEFAULT_USERNAME: str = "admin"
@lru_cache()
def get_security_config() -> SecurityConfig:
return SecurityConfig()