scribase
Two-minute manual setup

Add a backend to a Python app

A Python app uses supabase-py, which works with Scribase unchanged. Create the project in the console, copy two values, and generate TypedDict shapes for your tables.

1.Create the backend

Sign up in the console. Your first project is created automatically and the "Your backend is live" screen shows the Project URL and the publishable key with one-click copy.

2.Install the package

The package is named supabase on PyPI (supabase-py).

bash
pip install supabase

3.Create your first table

Open your project in the console, go to Editor, then SQL, and run this. Or ask your coding agent: with the Scribase MCP server connected it applies the same SQL as a migration. Row-level security is on, so the public key can only read what the policy allows.

sql
create table public.todos (
  id bigint generated always as identity primary key,
  title text not null,
  done boolean not null default false,
  created_at timestamptz not null default now()
);

alter table public.todos enable row level security;

create policy "todos are readable" on public.todos
  for select to anon, authenticated using (true);

insert into public.todos (title) values ('Ship the backend'), ('Tell a friend');

4.Generate TypedDict shapes

One Row, Insert and Update shape per table, from the live schema. Re-run after schema changes.

bash
scribase gen types <org> <project> production --lang python --out database_types.py

5.Query with the shapes

The shapes check your code in the editor; the values are plain dicts.

python
import os
from supabase import create_client
from database_types import TodosRow

client = create_client(os.environ["SUPABASE_URL"], os.environ["SUPABASE_ANON_KEY"])
todos: list[TodosRow] = client.table("todos").select("*").execute().data
Let your agent do it

Paste this into Claude Code, Cursor or Codex

The agent runs init, asks you to approve once in the browser, creates the table and wires up the first screen.

Python setup promptprompt
Add a Scribase backend to this Python project.
1. `pip install supabase` and read SUPABASE_URL and SUPABASE_ANON_KEY from the environment (.env, never committed).
2. Create a `todos` table with row-level security on and a read policy using the Scribase MCP server or a SQL migration.
3. Run `scribase gen types <org> <project> production --lang python --out database_types.py` and type the query results with TodosRow.

Connect the MCP server first so the agent can run SQL safely: setup for Claude Code, Codex or Cursor.

FAQ

Common questions

Can a server use the secret key?

Yes, on a server only: it bypasses row-level security, so it never goes into a browser, an app or a notebook you share.

Your Python backend, live in a minute

$25 a month per project, flat. Sign up with one click; the $1 card check is credited to your first invoice.

Start now