Skip to main content

Google Sheets as a Backend — a database-like interface for Google Sheets.

Project description

GSAB — Google Sheets as a Backend

PyPI Python License: MIT Tests

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 authgsab auth login opens a browser and uses the minimal drive.file scope. 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=True and it's sealed before it reaches the sheet.
  • Async CRUD + rich filtersinsert / read / update / delete with $gt / $in / $contains / $regex and more.
  • Server-side queriesquery() runs the Google Visualization query language (filter, sort, aggregate) on Google's side, not in Python. Values come back type-correct.
  • pandas bridgeto_dataframe() / from_dataframe() and bulk_insert() for the whole analytics ecosystem.
  • Native chartschart() embeds a Google chart in the sheet; or hand to_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.1): 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

gsab-0.3.1.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gsab-0.3.1-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file gsab-0.3.1.tar.gz.

File metadata

  • Download URL: gsab-0.3.1.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gsab-0.3.1.tar.gz
Algorithm Hash digest
SHA256 bd815bc234187bc0d053ee067bb1b13199d7f9cca9af78ae72c40999c16f0eb6
MD5 7643838e7e9c5bf8871ff670cd77720b
BLAKE2b-256 0b2d205c4d92fac1d50153b3451e5e9d6d41b09f5a965fbaf3b95e044ac39a5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gsab-0.3.1.tar.gz:

Publisher: publish.yml on ajmalaksar25/gsab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gsab-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: gsab-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gsab-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 403e91b4d4877c04059971835e541808fa6de1237aa8abdfa75b1600bfb9796d
MD5 3689c28529738f4b2f7ef866586c9be1
BLAKE2b-256 6d7b5817fc852d1c599fc9c00fa7d60b0dfef00467ab0602d0dab816144240fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for gsab-0.3.1-py3-none-any.whl:

Publisher: publish.yml on ajmalaksar25/gsab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page