Files

23 lines
543 B
Python

from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
app_name: str = "Messenger API"
app_env: str = "lab"
database_url: str = (
"postgresql+psycopg://messenger:messenger@localhost:5432/messenger"
)
session_ttl_seconds: int = 3600
cache_url: str = "redis://localhost:6379/0"
message_cache_ttl_seconds: int = 60
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8",
extra="ignore",
)
settings = Settings()