Files
whisperbox-transcribe/app/shared/settings.py
2023-06-29 09:13:11 +02:00

22 lines
415 B
Python

import sys
from pydantic import BaseSettings
class Settings(BaseSettings):
API_SECRET: str
DATABASE_URI: str
ENVIRONMENT: str
TASK_SOFT_TIME_LIMIT: int = 3 * 60 * 60
TASK_HARD_TIME_LIMIT: int = 4 * 60 * 60
# derived settings
BROKER_URL: str
if "pytest" in sys.modules:
settings = Settings(_env_file=".env.test") # type: ignore
else:
settings = Settings() # type: ignore