Skip to main content

extrasheet

File-based Google Sheets representation library for LLM agents.

Overview

extrasheet pulls a spreadsheet into a small set of TSV and JSON files that are easier for humans and agents to inspect than raw Google Sheets API responses. The current on-disk format uses:

  • spreadsheet.json for spreadsheet metadata, sheet list, previews, and truncation hints
  • data.tsv for cell values
  • formula.json for formulas
  • format.json for cell formatting, merges, notes, and rich text runs
  • Separate feature files such as charts.json, filters.json, pivot-tables.json, and data-validation.json
  • Optional per-sheet comments.json files for Google Drive comments

Some pulled files are informational only today and are not diffed or pushed back. See docs/gaps.md.

Python Usage

import asyncio
from extrasheet import GoogleSheetsTransport, SheetsClient


async def main() -> None:
    transport = GoogleSheetsTransport(access_token="your_token")
    client = SheetsClient(transport)

    try:
        await client.pull(
            "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
            "./output",
            max_rows=100,
            save_raw=True,
        )
    finally:
        await transport.close()


asyncio.run(main())

Typical output:

./output/<spreadsheet_id>/
  spreadsheet.json
  theme.json                     # optional, informational
  named_ranges.json              # optional, editable
  developer_metadata.json        # optional, informational
  data_sources.json              # optional, informational
  <sheet_folder>/
    data.tsv
    formula.json
    format.json                  # optional
    dimension.json               # optional
    charts.json                  # optional
    pivot-tables.json            # optional
    tables.json                  # optional
    filters.json                 # optional
    banded-ranges.json           # optional
    data-validation.json         # optional
    slicers.json                 # optional
    data-source-tables.json      # optional
    protection.json              # optional, informational
    comments.json                # optional, replies/resolve only
  .raw/
    metadata.json                # optional, saved unless save_raw=False
    data.json
  .pristine/
    spreadsheet.zip

CLI Usage

extrasheet is the library package. The CLI lives in extrasuite:

extrasuite sheet pull <url> [output_dir]
extrasuite sheet diff <folder>
extrasuite sheet push <folder>
extrasuite sheet batchUpdate <url> <requests.json>

Inside this repo you can run the local CLI with:

uv run --project client extrasuite sheet pull <url>

Notes

  • pull always fetches metadata first, then grid data with the requested row limit.
  • comments.json is fetched separately through the Drive API and written per sheet when comments exist.
  • .pristine/spreadsheet.zip is the baseline used by diff and push.
  • After any successful push, re-pull before editing again. .pristine is not updated in place.

Documentation

Development

cd extrasheet
uv sync --all-extras
uv run pytest tests/ -v
uv run ruff check .
uv run ruff format .
uv run mypy src/extrasheet

License

MIT License - see LICENSE.

Metadata

Release files for extrasheet 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for extrasheet 0.3.1
File Size Uploaded Provenance
extrasheet-0.3.1.tar.gz 190.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for extrasheet 0.3.1
File Interpreter ABI Platform
extrasheet-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 304.2 kB

Release files / extrasheet-0.3.1.tar.gz

Download URL extrasheet-0.3.1.tar.gz
Size 190.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b6adbe657cff92fde18f58fe371c5d509986b100bdafa5c322b34f09c76e111f
BLAKE2b-256 checksum
How to use checksums
6bdb6559ef215d2bd44af4e72ab7a42dffe972e86465e9832d7824866fd8bdb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.

Transparency log

Release files / extrasheet-0.3.1-py3-none-any.whl

Download URL extrasheet-0.3.1-py3-none-any.whl
Size 113.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d413fc495b1e4ae874613d35fe03a55eab2678c5829677fbb6c2f5da294fbba
BLAKE2b-256 checksum
How to use checksums
2fe96e72b9178f96857dab9acd07507bbf000dda69c740d754c403bf31c007be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.

Transparency log

Security for extrasheet 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for extrasheet-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page