refactor: restructure project layout

This commit is contained in:
Felix Spöttel
2023-01-07 11:35:31 +01:00
parent e41c07fd4b
commit 4fa1d5c0da
26 changed files with 75 additions and 50 deletions

16
app/shared/config.py Normal file
View File

@@ -0,0 +1,16 @@
import os
from pydantic import BaseSettings
class Settings(BaseSettings):
API_SECRET: str
DATABASE_URI: str
ENVIRONMENT: str
REDIS_URI: str
if "ENVIRONMENT" in os.environ and os.environ["ENVIRONMENT"] == "test":
settings = Settings(_env_file=".env.test") # type: ignore
else:
settings = Settings()