Support-BOT
This commit is contained in:
29
app/core/config.py
Normal file
29
app/core/config.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseSettings
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
TELEGRAM_TOKEN: str
|
||||
GROUP_ID: str
|
||||
WEBHOOK_DOMAIN: Optional[str]
|
||||
WEBHOOK_PATH: Optional[str]
|
||||
APP_HOST: str
|
||||
APP_PORT: int
|
||||
DATABASE_URL: str
|
||||
DB_HOST: str
|
||||
DB_PORT: str
|
||||
DB_USER: str = os.getenv('POSTGRES_USER')
|
||||
DB_PASSWORD: str = os.getenv('POSTGRES_PASSWORD')
|
||||
START_MESSAGE: str = os.getenv('START_MESSAGE')
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user