From 09be5d5969463f3466594d5c58c67bf95aff9f49 Mon Sep 17 00:00:00 2001 From: Nyan404 Date: Tue, 25 Aug 2026 04:19:12 +0300 Subject: [PATCH] docs: document sheets export helpers --- app/belki/google_sheets_export.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/belki/google_sheets_export.py b/app/belki/google_sheets_export.py index 5c52b57..d43b59c 100644 --- a/app/belki/google_sheets_export.py +++ b/app/belki/google_sheets_export.py @@ -22,6 +22,7 @@ class GoogleSheetsExportConfig: @classmethod def from_environment(cls) -> "GoogleSheetsExportConfig": + """Считывает флаг, URL webhook-а и токен из окружения приложения.""" return cls( enabled=os.getenv("BELKI_GOOGLE_EXPORT_ENABLED", "0") == "1", url=os.getenv("BELKI_GOOGLE_EXPORT_URL", "").strip(), @@ -30,6 +31,7 @@ class GoogleSheetsExportConfig: @property def ready(self) -> bool: + """Проверяет, что экспорт включён и настроен на HTTPS-адрес с hostname.""" parsed = urlparse(self.url) return self.enabled and parsed.scheme == "https" and bool(parsed.hostname) @@ -38,6 +40,7 @@ class GoogleSheetsExportService: """Доставляет outbox-события; при выключенной интеграции ничего не делает.""" def __init__(self, store: ApplicationStore, config: GoogleSheetsExportConfig | None = None) -> None: + """Связывает сервис доставки с хранилищем заявок и конфигурацией.""" self.store = store self.config = config or GoogleSheetsExportConfig.from_environment()