mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-01-19 21:37:31 +08:00
18 lines
347 B
Python
18 lines
347 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() |