51 lines
780 B
Python
51 lines
780 B
Python
from typing import Literal
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env")
|
|
|
|
MODE: Literal["DEV", "TEST", "PROD"]
|
|
|
|
DB_USER: str
|
|
DB_PASS: str
|
|
DB_HOST: str
|
|
DB_PORT: str
|
|
DB_NAME: str
|
|
|
|
TEST_DB_HOST: str
|
|
TEST_DB_PORT: str
|
|
TEST_DB_USER: str
|
|
TEST_DB_PASS: str
|
|
TEST_DB_NAME: str
|
|
|
|
SECRET_KEY: str
|
|
ALGORITHM: str
|
|
|
|
REDIS_HOST: str
|
|
REDIS_PORT: int
|
|
REDIS_DB: int
|
|
|
|
MONGO_HOST: str
|
|
MONGO_PORT: int
|
|
|
|
SMTP_HOST: str
|
|
SMTP_PORT: int
|
|
SMTP_USER: str
|
|
SMTP_PASS: str
|
|
|
|
IMAGE_UPLOAD_SERVER: str
|
|
|
|
INVITATION_LINK_HOST: str
|
|
INVITATION_LINK_TOKEN_KEY: bytes
|
|
|
|
SENTRY_DSN: str
|
|
|
|
ADMIN_USER: int
|
|
ADMIN_USER_ID: int
|
|
REGISTRATED_USER: int
|
|
VERIFICATED_USER: int
|
|
|
|
|
|
settings = Settings()
|