sheets#

Google Sheets tools for LangChain.

Classes

sheets.base.SheetsBaseTool

Base class for Google Sheets tools.

sheets.enums.DateTimeRenderOption(value)

Google Sheets date/time render options.

sheets.enums.FilterConditionType(value)

Filter condition types for Google Sheets data filters.

sheets.enums.MajorDimension(value)

Google Sheets major dimension options.

sheets.enums.ValueRenderOption(value)

Google Sheets value render options.

sheets.get_spreadsheet_info.GetSpreadsheetInfoSchema

Input schema for GetSpreadsheetInfo.

sheets.get_spreadsheet_info.SheetsGetSpreadsheetInfoTool

Tool that retrieves comprehensive metadata information from Google Sheets. This tool provides detailed metadata extraction capabilities from Google Sheets, allowing you to understand spreadsheet structure, sheet properties, named ranges, and other organizational information. It's essential for exploring spreadsheet contents before reading data and understanding the overall structure. Instantiate: .. code-block:: python from langchain_google_community.sheets import SheetsGetSpreadsheetInfoTool tool = SheetsGetSpreadsheetInfoTool( api_key="your_api_key", include_grid_data=False, include_formatting=False, include_validation=False, ) Invoke directly: .. code-block:: python result = tool.run( { "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms", "include_grid_data": False, "fields": "properties,sheets.properties", } ) Invoke with agent: .. code-block:: python agent.invoke({"input": "Get information about the spreadsheet structure"}) :returns: - Spreadsheet properties: Title, locale, timezone, etc. - Sheet information: Names, IDs, dimensions, properties - Named ranges: Defined ranges and their locations - Grid data: Detailed cell information (optional) - Metadata: Processing information and data structure :rtype: JSON string containing.

sheets.read_sheet_tools.BaseReadTool

Base class for Google Sheets read operations.

sheets.read_sheet_tools.BatchReadSheetDataSchema

Input schema for BatchReadSheetData.

sheets.read_sheet_tools.DataFilterSchema

Schema for data filter criteria.

sheets.read_sheet_tools.FilteredReadSheetDataSchema

Input schema for FilteredReadSheetData.

sheets.read_sheet_tools.ReadBaseSchema

Base schema for all read operations.

sheets.read_sheet_tools.ReadSheetDataSchema

Input schema for ReadSheetData.

sheets.read_sheet_tools.SheetsBatchReadDataTool

Tool that reads data from multiple ranges in Google Sheets efficiently.

sheets.read_sheet_tools.SheetsFilteredReadDataTool

Tool that reads data from Google Sheets with advanced filtering capabilities.

sheets.read_sheet_tools.SheetsReadDataTool

Tool that reads data from a single range in Google Sheets.

sheets.toolkit.SheetsToolkit

Toolkit for interacting with Google Sheets.

Functions

sheets.utils.build_sheets_service([...])

Build a Google Sheets service with OAuth2 credentials (full access).

sheets.utils.build_sheets_service_with_api_key(api_key)

Build a Google Sheets service with API key (read-only access).

sheets.utils.validate_range_name(range_name)

Validate and normalize a range name.

sheets.utils.validate_spreadsheet_id(...)

Validate and normalize a Google Spreadsheet ID.