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-4/

Cell Annotation Utility

Populate individual spreadsheet cells with values, formulas, and annotations while preserving formatting intent.

Capabilities

Write literal values

  • When an assignment contains only an address and value, the matching cell in the first worksheet stores that value and persists it for later reads. @test

Store formulas

  • When an assignment includes a formula string, the cell stores that formula instead of a literal value and returns the recalculated result after the update. @test

Add notes and formatting

  • When an assignment includes a note, background color, or number format, the cell keeps its value, applies the provided note, sets the color, applies the number pattern, and leaves these changes saved. @test

Implementation

@generates

API

def apply_cell_annotations(client, spreadsheet_id: str, assignments: list[dict]) -> None:
    """
    Apply targeted updates to cells within the first worksheet of the spreadsheet.

    Parameters:
    client: An authenticated spreadsheet client from the dependency.
    spreadsheet_id: Identifier of the spreadsheet to modify.
    assignments: Items with:
      - address (str): A1-style cell label.
      - value (str|int|float|None): Literal value when no formula is provided.
      - formula (str|None): Formula string to store instead of a literal value.
      - note (str|None): Optional cell note to attach.
      - number_format (str|None): Named number format to apply for numeric values.
      - background (tuple[float, float, float]|None): RGB tuple for the cell background.
    The function must ensure value/format/note changes are persisted before returning.
    """

Dependencies { .dependencies }

pygsheets { .dependency }

Used to open spreadsheets and manipulate individual cells. @satisfied-by

Version

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