Google Sheets as a Backend — a database-like interface for Google Sheets.
Project description
GSAB — Google Sheets as a Backend
A database-like interface for Google Sheets — schemas, validation, field encryption, async CRUD, server-side queries, and a friction-free CLI. Sign in once; no Google Cloud setup required.
🌐 gsab.ajmalaksar.com · 📖 Docs · 🗺️ Roadmap
Install
pip install gsab # core
pip install "gsab[pandas]" # + DataFrame support
Get started
gsab auth login # browser sign-in (drive.file scope) — that's the whole setup
Then define a schema and read/write your sheet. Full usage, examples and the API → the documentation.
Features
- Friction-free auth —
gsab auth loginopens a browser and uses the minimaldrive.filescope. No Cloud project, no JSON keys. DIY modes cover existing sheets, your own OAuth client, gcloud, and service accounts. - Schemas & validation — typed fields, rules and uniqueness, enforced on every write.
- Field encryption — flag a field
encrypted=Trueand it's sealed before it reaches the sheet. - Async CRUD + rich filters —
insert / read / update / deletewith$gt / $in / $contains / $regexand more. - Server-side queries —
query()runs the Google Visualization query language (filter, sort, aggregate) on Google's side, not in Python. Values come back type-correct. - pandas bridge —
to_dataframe()/from_dataframe()andbulk_insert()for the whole analytics ecosystem. - Native charts —
chart()embeds a Google chart in the sheet; or handto_dataframe()to matplotlib/Plotly. - Actionable errors — Google API errors become clear GSAB exceptions with retry/backoff and token refresh — readable by humans and LLM agents.
- Secure tokens — stored in your OS keychain (keyring), with a 0600-file fallback.
Roadmap
Shipped (v0.3.2): auth + CLI · schemas, validation & encryption · async CRUD · type-correct server-side query · pandas bridge + bulk insert · native in-sheet charts · LLM-friendly errors + retry/backoff · keychain storage.
Coming next: MCP server (use your sheets from Claude) · terminal UI · real-time / reactive mode · server-side date filters · one-click hosted sign-in.
Live roadmap → gsab.ajmalaksar.com/#roadmap.
Releases
Versioned with SemVer; see CHANGELOG.md. Tagged releases (vX.Y.Z) publish to PyPI automatically via GitHub Actions.
License
MIT — see LICENSE.md. GSAB is an independent project, not affiliated with Google LLC.
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 gsab-0.3.2.tar.gz.
File metadata
- Download URL: gsab-0.3.2.tar.gz
- Upload date:
- Size: 37.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7ff99a1d195294b5a7526a7de5198b788620be9f2e30961ec6a21b5c04ef130
|
|
| MD5 |
08b2670af61d098337789bfec05aa35f
|
|
| BLAKE2b-256 |
14a3adf7481af0ac9bb10eb39adb5d9b2885185234da08b1da49e3f24f7b8fbd
|
Provenance
The following attestation bundles were made for gsab-0.3.2.tar.gz:
Publisher:
publish.yml on ajmalaksar25/gsab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gsab-0.3.2.tar.gz -
Subject digest:
c7ff99a1d195294b5a7526a7de5198b788620be9f2e30961ec6a21b5c04ef130 - Sigstore transparency entry: 1930665520
- Sigstore integration time:
-
Permalink:
ajmalaksar25/gsab@5add1f5f27e187e0c5c96a084b92d79b55d8aa6d -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/ajmalaksar25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5add1f5f27e187e0c5c96a084b92d79b55d8aa6d -
Trigger Event:
push
-
Statement type:
File details
Details for the file gsab-0.3.2-py3-none-any.whl.
File metadata
- Download URL: gsab-0.3.2-py3-none-any.whl
- Upload date:
- Size: 32.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cf1b19b08705e9446a9b7cd21153044c3fb293de50e362119b3cd2ba74ae191
|
|
| MD5 |
c859b2b3fb4208041d2aed84d851458b
|
|
| BLAKE2b-256 |
2fee04d8f42dc0fc71f5ad4ea0e5882bba5bf6c416e4b977048719ec7541921c
|
Provenance
The following attestation bundles were made for gsab-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on ajmalaksar25/gsab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gsab-0.3.2-py3-none-any.whl -
Subject digest:
9cf1b19b08705e9446a9b7cd21153044c3fb293de50e362119b3cd2ba74ae191 - Sigstore transparency entry: 1930665617
- Sigstore integration time:
-
Permalink:
ajmalaksar25/gsab@5add1f5f27e187e0c5c96a084b92d79b55d8aa6d -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/ajmalaksar25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5add1f5f27e187e0c5c96a084b92d79b55d8aa6d -
Trigger Event:
push
-
Statement type: