24 lines
667 B
Python
24 lines
667 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
from typing import Optional
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Конфигурация приложения"""
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
|
|
|
# PostgreSQL Target Connection (назначение для всех репликаций)
|
|
postgres_host: str
|
|
postgres_database: str
|
|
postgres_username: str
|
|
postgres_password: str
|
|
postgres_port: int = 5432
|
|
|
|
# Redis for Celery
|
|
redis_host: str = "localhost"
|
|
redis_port: int = 6379
|
|
|
|
# Other settings
|
|
api_key: Optional[str] = None
|
|
|
|
|
|
settings = Settings() |