CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-pygsheets

tessl install tessl/pypi-pygsheets@2.0.0

Google Spreadsheets Python API v4

Agent Success

Agent success rate when using this tile

76%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.23x

Baseline

Agent success rate without this tile

62%

task.mdevals/scenario-8/

Spreadsheet Lifecycle Manager

A module that provisions, duplicates, catalogs, and tears down spreadsheets while returning clear metadata for each operation.

Capabilities

Provision spreadsheets

  • Creating a spreadsheet titled "Budget 2025" inside folder "folder-123" returns metadata whose title matches and URL includes the new spreadsheet id. @test
  • Creating a spreadsheet from template "tmpl-001" clones the template's sheets and records the template id in the returned metadata. @test

Duplicate spreadsheets

  • Duplicating spreadsheet "src-abc" as "Copy 1" produces a new spreadsheet id distinct from the source while preserving sheet order. @test

List spreadsheet summaries

  • Listing spreadsheets filtered by the prefix "Copy" returns entries containing id, title, and URL for created copies. @test

Remove spreadsheets

  • Removing spreadsheet "src-abc" reports success and the id no longer appears in subsequent listings. @test

Implementation

@generates

API

from dataclasses import dataclass
from typing import List, Optional

@dataclass
class SpreadsheetSummary:
    id: str
    title: str
    url: str
    template_source: Optional[str] = None


class SpreadsheetLifecycleManager:
    def create(self, title: str, folder_id: Optional[str] = None, template_id: Optional[str] = None) -> SpreadsheetSummary:
        """Create a spreadsheet, optionally in a folder or from a template."""

    def duplicate(self, source_id: str, new_title: str, destination_folder_id: Optional[str] = None) -> SpreadsheetSummary:
        """Copy an existing spreadsheet to a new one with a new title."""

    def list(self, title_prefix: Optional[str] = None) -> List[SpreadsheetSummary]:
        """List accessible spreadsheets, optionally filtered by title prefix."""

    def remove(self, spreadsheet_id: str) -> bool:
        """Delete a spreadsheet and return True if deletion was confirmed."""

Dependencies { .dependencies }

pygsheets { .dependency }

Google Sheets client for spreadsheet lifecycle operations.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pygsheets@2.0.x
tile.json