mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-01-24 07:53:17 +08:00
17 lines
346 B
Python
17 lines
346 B
Python
import logging
|
|
from functools import lru_cache
|
|
|
|
from pydantic_settings import BaseSettings
|
|
|
|
log = logging.getLogger("uvicorn")
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
environment: str = "dev"
|
|
testing: bool = 0
|
|
|
|
|
|
@lru_cache()
|
|
def get_settings() -> BaseSettings:
|
|
log.info("Loading config settings from the environment...")
|
|
return Settings() |