Files
TGLotteryBot/backend/app/core/config.py
T
Stardream eace48732d
Build and Push Docker Images / build (push) Successful in 17s
Initial release
2026-06-02 12:02:02 +10:00

28 lines
599 B
Python

from functools import lru_cache
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
bot_token: str = ""
webhook_url: str = ""
webhook_path: str = "/webhook/telegram"
webhook_secret: str = ""
database_url: str = "postgresql+asyncpg://postgres:postgres@postgres:5432/tglotterybot"
mini_app_url: str = ""
avatar_cache_ttl: int = 3600
debug: bool = False
@lru_cache()
def get_settings() -> Settings:
return Settings()
settings = get_settings()