chore: rename config.py => settings.py

This commit is contained in:
Felix Spöttel
2023-02-08 16:23:51 +01:00
parent 27b6f8eb8f
commit f02fb9d1c7
6 changed files with 5 additions and 5 deletions

20
app/shared/settings.py Normal file
View File

@@ -0,0 +1,20 @@
import sys
from pydantic import BaseSettings
class Settings(BaseSettings):
API_SECRET: str
DATABASE_URI: str
ENVIRONMENT: str
# derived settings
BROKER_URL: str
if "pytest" in sys.modules:
settings = Settings(
_env_file=".env.test", _env_file_encoding="utf-8"
) # type: ignore
else:
settings = Settings()