Files
drivers_bot/app/core/config.py
2026-05-12 04:36:30 +09:00

26 lines
671 B
Python

from functools import lru_cache
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
database_url: str = "postgresql+asyncpg://drivers:drivers@localhost:5432/drivers"
bot_token: str = ""
bot_username: str = ""
api_base_url: str = "http://localhost:8000"
webapp_url: str = "http://localhost:8000"
app_host: str = "0.0.0.0"
app_port: int = 8000
app_env: str = "production"
vapid_public_key: str = ""
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
@lru_cache
def get_settings() -> Settings:
return Settings()
settings = get_settings()