Files
whisperbox-transcribe/app/config.py
2022-12-27 11:35:08 +01:00

19 lines
370 B
Python

import os
from pydantic import BaseSettings
class Settings(BaseSettings):
DATABASE_URI: str
ENVIRONMENT: str
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
if "ENVIRONMENT" in os.environ and os.environ["ENVIRONMENT"] == "test":
settings = Settings(_env_file=".env.test") # type: ignore
else:
settings = Settings()