Sheet

class Sheet(sheet_name, connection, folder_id=None)

An async wrapper around a Google Spreadsheet.

The connection is opened lazily — no network call is made until the first async method is called.

Parameters:
  • sheet_name (str) – The exact title of the spreadsheet as it appears in Google Drive.

  • connection (Connection) – An authenticated Connection instance.

  • folder_id (str | None) – Optional Drive folder ID to scope the search.

Methods

async Sheet.open()

Opens the remote spreadsheet. Called automatically by all other methods — only call this explicitly if you want to pre-warm the connection.

await sheet.open()
async Sheet.get_tab(tab_name) Tab

Returns the worksheet named tab_name as a Tab.

Parameters:

tab_name (str) – The exact name of the worksheet tab.

Returns:

The matching worksheet.

Return type:

Tab

tab = await sheet.get_tab("Sheet1")
async Sheet.tabs(exclude_hidden=False) list[Tab]

Returns all worksheet tabs in the spreadsheet.

Parameters:

exclude_hidden (bool) – When True, hidden tabs are omitted.

Returns:

All visible (or all) tabs.

Return type:

list[Tab]

all_tabs     = await sheet.tabs()
visible_tabs = await sheet.tabs(exclude_hidden=True)