GSAB
Python · CLI · Open source

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.5.0MIT licensedPython 3.9+
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())
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.5.0 today, and what's coming next.

Shipped · v0.5.0

Available now

  • Friction-free auth (drive.file) + CLI
  • Schemas, validation & field encryption
  • Async CRUD with rich filters
  • Type-correct server-side query() — Google Visualization
  • pandas to_dataframe / from_dataframe + bulk_insert
  • Native in-sheet charts via chart()
  • LLM-friendly errors + retry/backoff
  • OS-keychain token storage
On the way

Coming next

  • MCP server — use your sheets from Claude
  • Terminal UI (TUI)
  • Real-time / reactive mode
  • Server-side date filters
  • 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