Files
whisperbox-transcribe/app/config.py
Felix Spöttel b3a38846ba feat: add job & artifact tables
* remove `accounts` table in favor of a simple API key auth
2023-01-05 12:03:41 +01:00

20 lines
390 B
Python

import os
from pydantic import BaseSettings
class Settings(BaseSettings):
DATABASE_URI: str
ENVIRONMENT: str
API_SECRET: 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()