mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 06:35:38 +01:00
34 lines
584 B
Python
34 lines
584 B
Python
from pydantic import BaseSettings
|
|
|
|
|
|
class EnvConfig(BaseSettings):
|
|
API_KEY: str
|
|
|
|
POSTGRES_USER: str
|
|
POSTGRES_PASSWORD: str
|
|
POSTGRES_HOST: str
|
|
POSTGRES_PORT: int
|
|
POSTGRES_DB: str
|
|
|
|
DOWNLOADER_API_KEY: str
|
|
DOWNLOADER_URL: str
|
|
|
|
LIBRARY_API_KEY: str
|
|
LIBRARY_URL: str
|
|
|
|
FILES_SERVER_API_KEY: str
|
|
FILES_SERVER_URL: str
|
|
|
|
REDIS_HOST: str
|
|
REDIS_PORT: int
|
|
REDIS_DB: int
|
|
|
|
SENTRY_DSN: str
|
|
|
|
|
|
env_config = EnvConfig() # type: ignore
|
|
|
|
REDIS_URL = (
|
|
f"redis://{env_config.REDIS_HOST}:{env_config.REDIS_PORT}/{env_config.REDIS_DB}"
|
|
)
|