GSAB

Google Sheets,
as your backend.

GSAB gives you a database-like interface over Google Sheets — schemas, validation, encryption and async CRUD. Sign in once; no Google Cloud setup required.

v0.10.0MIT licensedPython 3.9+
a real Google Sheet, connecting · 4 people · 3 active — play with it →
Two-minute start

From install to first row.

Install it, sign in, define a schema. That's the whole ceremony.

  1. 01

    Install

    pip install gsab — one dependency-light package.

  2. 02

    Sign in

    gsab auth login opens your browser. GSAB only touches the sheets it creates.

  3. 03

    Define & write

    Declare a typed schema and start inserting — validation included.

app.py
# pip install gsab   ·   gsab auth login
import asyncio
from gsab import SheetConnection, Schema, Field, FieldType, SheetManager

schema = Schema("users", [
    Field("id", FieldType.INTEGER, required=True, unique=True),
    Field("email", FieldType.STRING, required=True),
    Field("secret", FieldType.STRING, encrypted=True),
])

async def main():
    db = SheetManager(SheetConnection(), schema, encryption_key=KEY)
    await db.create_sheet("My App DB")
    await db.insert({"id": 101, "email": "ada@calc.org", "secret": "hunter2"})
    print(await db.read({"id": 101}))

asyncio.run(main())
Proof of concept

Your data, charted live.

Real, interactive charts — the data was written to a Google Sheet with GSAB, read back with to_dataframe(), and plotted with Plotly. No database, just a sheet.

Friction-free auth

Two ways in.

Pick the path that fits. The easy one needs nothing from Google Cloud; the DIY one hands you the keys.

Easy mode · default

Just sign in

One browser sign-in with the minimal drive.file scope — no Cloud project, no consent-screen wall. GSAB manages the sheets it creates for you.

$ gsab auth login
DIY mode

Bring your own

Reach your existing sheets or wire up your own credentials.

  • --full for access to all your sheets
  • --client-secrets for your own OAuth app
  • gcloud ADC & service accounts, auto-detected
Roadmap

Built in the open.

What ships in 0.10.0 today, and what's coming next.

Shipped · v0.10.0

Available now

  • Friction-free auth (drive.file) + CLI
  • Schemas, validation & field encryption
  • Async CRUD with rich filters
  • upsert() + enforced primary keys
  • Type-correct server-side query() — Google Visualization
  • Reactive watch() — live reads (Experimental)
  • One-call public sharing (reader/commenter/writer)
  • MCP server — use your sheets from any AI agent
  • Access control (AccessPolicy) + security CI
  • Access-control TUI (gsab tui) — manage access, watch live activity
  • pandas bridge + native in-sheet charts
  • LLM-friendly errors · installable agent skills
  • JavaScript client — gsab-js on npm: browser reads, React hook, Node CRUD (early)
On the way

Coming next

  • In-browser Google sign-in for the JS client
  • Rate-aware batching
  • Improved / pipe-friendly CLI
  • One-click hosted sign-in
Ship it

Your next backend is one sheet away.

Prototype, ship a side project, or back a small app — without standing up a database.

Read the docs