File-based Google Sheets representation library for LLM agents
Project description
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.jsonfor spreadsheet metadata, sheet list, previews, and truncation hintsdata.tsvfor cell valuesformula.jsonfor formulasformat.jsonfor cell formatting, merges, notes, and rich text runs- Separate feature files such as
charts.json,filters.json,pivot-tables.json, anddata-validation.json - Optional per-sheet
comments.jsonfiles 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
pullalways fetches metadata first, then grid data with the requested row limit.comments.jsonis fetched separately through the Drive API and written per sheet when comments exist..pristine/spreadsheet.zipis the baseline used bydiffandpush.- After any successful
push, re-pull before editing again..pristineis not updated in place.
Documentation
- docs/on-disk-format.md - Current file layout and field reference
- docs/architecture.md - Implementation overview
- docs/diff-push-spec.md - What diff/push actually honors
- docs/gaps.md - Current pull-only and partially supported areas
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file extrasheet-0.3.1.tar.gz.
File metadata
- Download URL: extrasheet-0.3.1.tar.gz
- Upload date:
- Size: 190.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6adbe657cff92fde18f58fe371c5d509986b100bdafa5c322b34f09c76e111f
|
|
| MD5 |
39bce419705b78f80b51f93d225725d9
|
|
| BLAKE2b-256 |
6bdb6559ef215d2bd44af4e72ab7a42dffe972e86465e9832d7824866fd8bdb2
|
Provenance
The following attestation bundles were made for extrasheet-0.3.1.tar.gz:
Publisher:
publish-extrasheet.yml on think41/extrasuite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extrasheet-0.3.1.tar.gz -
Subject digest:
b6adbe657cff92fde18f58fe371c5d509986b100bdafa5c322b34f09c76e111f - Sigstore transparency entry: 1187932979
- Sigstore integration time:
-
Permalink:
think41/extrasuite@5dbd83deef4990c8e21af51f67d5c72007d4a60b -
Branch / Tag:
refs/tags/extrasheet-v0.3.1 - Owner: https://github.com/think41
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-extrasheet.yml@5dbd83deef4990c8e21af51f67d5c72007d4a60b -
Trigger Event:
push
-
Statement type:
File details
Details for the file extrasheet-0.3.1-py3-none-any.whl.
File metadata
- Download URL: extrasheet-0.3.1-py3-none-any.whl
- Upload date:
- Size: 113.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d413fc495b1e4ae874613d35fe03a55eab2678c5829677fbb6c2f5da294fbba
|
|
| MD5 |
e53c73c793617887028f89e2ffff13a1
|
|
| BLAKE2b-256 |
2fe96e72b9178f96857dab9acd07507bbf000dda69c740d754c403bf31c007be
|
Provenance
The following attestation bundles were made for extrasheet-0.3.1-py3-none-any.whl:
Publisher:
publish-extrasheet.yml on think41/extrasuite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extrasheet-0.3.1-py3-none-any.whl -
Subject digest:
6d413fc495b1e4ae874613d35fe03a55eab2678c5829677fbb6c2f5da294fbba - Sigstore transparency entry: 1187932989
- Sigstore integration time:
-
Permalink:
think41/extrasuite@5dbd83deef4990c8e21af51f67d5c72007d4a60b -
Branch / Tag:
refs/tags/extrasheet-v0.3.1 - Owner: https://github.com/think41
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-extrasheet.yml@5dbd83deef4990c8e21af51f67d5c72007d4a60b -
Trigger Event:
push
-
Statement type: