config.py 414 B

123456789101112131415161718192021222324
  1. from pydantic_settings import BaseSettings
  2. from functools import lru_cache
  3. class Settings(BaseSettings):
  4. PROJECT_NAME: str
  5. API_V1_STR: str
  6. MINIO_ENDPOINT: str
  7. MINIO_ACCESS_KEY: str
  8. MINIO_SECRET_KEY: str
  9. MINIO_BUCKET_NAME: str
  10. MINIO_SECURE: bool = False
  11. class Config:
  12. env_file = ".env"
  13. @lru_cache()
  14. def get_settings():
  15. return Settings()
  16. settings = get_settings()