v0.3.x · pyrogram_patch

Configuration

pyrogram_patch reads settings from environment variables via Pydantic Settings. All variables are optional with sensible defaults.

Environment Variables

VariableDefaultDescription
PYROGRAM_PATCH_CB_FALLBACK_MESSAGE""Default text sent when a callback handler has no explicit answer
PYROGRAM_PATCH_LOG_LEVELWARNINGLog level for the pyrogram_patch logger

Accessing Config in Code

from pyrogram_patch.config import settings

print(settings.cb_fallback_message)
print(settings.log_level)

.env File

.env
PYROGRAM_PATCH_CB_FALLBACK_MESSAGE=Processing...
PYROGRAM_PATCH_LOG_LEVEL=DEBUG