feat: initial project setup

This commit is contained in:
Felix Spöttel
2022-12-27 11:35:08 +01:00
parent 8be010f434
commit 4f7cd063f1
27 changed files with 801 additions and 0 deletions

18
app/config.py Normal file
View File

@@ -0,0 +1,18 @@
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()