Skip to content

google_tasks

google_tasks

Google Tasks connector — tasks due today, overdue, and recently completed.

Uses OAuth2 tokens via the shared Google OAuth helper module.

Classes

GoogleTasksConnector

GoogleTasksConnector(*, credentials_path: str = '')

Bases: BaseConnector

Sync tasks from Google Tasks.

Source code in src/openjarvis/connectors/google_tasks.py
def __init__(self, *, credentials_path: str = "") -> None:
    self._credentials_path = Path(
        resolve_google_credentials(credentials_path or _DEFAULT_CREDENTIALS_PATH)
    )
    self._status = SyncStatus()
Functions
is_connected
is_connected() -> bool

Return True if the credentials file has a real access token.

File existence alone is not enough — the shared google.json may contain only client_id/client_secret without OAuth tokens.

Source code in src/openjarvis/connectors/google_tasks.py
def is_connected(self) -> bool:
    """Return ``True`` if the credentials file has a real access token.

    File existence alone is not enough — the shared ``google.json``
    may contain only client_id/client_secret without OAuth tokens.
    """
    tokens = load_tokens(str(self._credentials_path))
    if tokens is None:
        return False
    return bool(tokens.get("access_token") or tokens.get("token"))

Functions