POST /api/v1/{collection} Collection-Centric APIs
Define a collection once and ship CRUD APIs with filtering, pagination, and validation already wired.
SnackBase is an open-source Python backend for multi-tenant products that need real controls. Rules compile to SQL, audit trails are immutable, fields can be encrypted, and tenants can deploy their own Python functions. Run it as a server or embed it in your own Python app.
import { SnackBaseClient } from '@snackbase/sdk';
const sb = new SnackBaseClient({
url: 'https://api.yourapp.com',
token: session.token,
});
// Collection-centric records API with automatic tenant scoping
const { items, total } = await sb.records.list('products', {
filter: { active: true },
sort: ['-created_at'],
perPage: 20,
});
// → { items: Product[], total: 847 }
const order = await sb.records.create('orders', {
product_id: items[0].id,
quantity: 3,
});
// → rules enforced + audit captured + webhooks fired
// Trigger a workflow manually
await sb.workflows.trigger('wf-order-processing', {
order_id: order.id,
});
// Invoke a tenant-deployed Python function
const result = await sb.functions.invoke('send-invoice'); POST /api/v1/{collection} Define a collection once and ship CRUD APIs with filtering, pagination, and validation already wired.
account_id /* auto scoped */ One physical table per collection, many tenant accounts, and automatic row-level isolation at every layer.
checksum + previous_hash Column-level audit events are append-only and hash-linked for traceability, GxP, and CFR-style workflows.
list_rule: "@owns_record()" Collection rules compile into SQL WHERE clauses for row-level and field-level access without policy boilerplate.
trigger → condition → action Webhooks, API-defined hooks, multi-step workflows, and custom endpoints — all configurable via API, no backend code.
/api/v1/x/{your-slug} Define serverless-like HTTP endpoints that execute action pipelines with query, aggregate, and transform steps.
on_record_before_create 33+ lifecycle events with priority ordering and abort support so you can extend behavior without forking core.
/api/v1/auth/* Email/password, OAuth, SAML, API keys, and multi-account users are built in for real production requirements.
/api/v1/f/{account}/{slug} Deploy multi-file Python handlers per tenant with versioned releases, isolated virtual environments, write-only secrets, and an in-browser editor.
encrypted: true Fernet-encrypt text and JSON fields at rest. Values stay redacted in normal responses and are revealed only to API keys with the records:secrets:read scope.
snackbase backup create Instance-level archives to local disk or S3 with cron schedules, retention, key-fingerprint checks on restore, and a CLI that works without a running server.
pip install snackbase Mount SnackBase inside your own Python app and call it in-process. Every request still passes routing, auth, collection permissions, and audit logging.
pip install snackapp A Python app framework with SnackBase embedded. Declare collections, write pages as Python modules, and run a multi-user app from one process.
sb.codelists.getValues() Operator-managed value lists with per-account overrides, import and export, and validation on record fields.
POST /api/v1/migrations/plan Diff a declared schema against live collections, review destructive changes, then generate and apply an Alembic revision.
SNACKBASE_PLATFORM_ISSUER Accept RS256 or ES256 tokens from a trusted issuer, including your own OIDC provider. Unset by default, so nothing changes until you opt in.
VAPT REMEDIATION v0.11.0 closed all findings from the 2026-08-09 penetration test and shipped a dedicated security test suite.
TENANT ISOLATION OAuth state is server-generated, SAML flow context is single-use and server-side, and new members never join as admin.
SECRETS Encrypted fields, webhook signing secrets, and function secrets are never returned in plaintext through normal APIs.
EGRESS Webhooks, functions, and automation actions share one policy: address validation, connection pinning, and no redirects.
ABUSE CONTROL Login throttling and rate limits key on the real client address behind trusted proxies instead of one shared bucket.
RECOVERY Archives carry a manifest with key fingerprints. Restore refuses a mismatched encryption key before touching data.
ACCESS CONTROL Hooks, endpoints, webhooks, and workflows need an account admin. Expanded references enforce the target collection view rules.
DEPENDENCIES pip-audit reports no known vulnerabilities, and npm audit passes at the high level as of v0.13.1.
@snackbase/mcp Let Claude, Cursor, and other MCP clients query data and manage users, webhooks, workflows, and endpoints through API-key authentication.
@snackbase/skills An Agent Skills package that teaches coding agents to use the SDK for auth, records, collections, automation, realtime, and access control.
create-snackbase-app Start a new project from the command line with the SDK wired in.
supabase-compat · pocketbase-compat Compatibility layers for moving existing Supabase and PocketBase client code onto SnackBase.
app.* on SnackBase Cloud Chat-driven app building on Cloud projects, with live preview sandboxes and production deploys.
pip install snackbase python -m snackbase init-db python -m snackbase serve open http://localhost:8000/_/ git clone https://github.com/lalitgehani/SnackBase.git && cd SnackBase uv sync && (cd ui && npm install) cp .env.example .env uv run python -m snackbase init-db uv run python -m snackbase serve --reload Requires Python 3.14, Node.js 18+, and uv. See the full quickstart.
v0.13.3 Nov 2026 Closes OAuth and SAML tenant takeover, expand-reference bypass, and automation data exposure.
v0.13.0 Sep 2026 PyPI install, in-process client, admin panel at /_/, user fields, declarative migrations.
v0.12.0 Sep 2026 Local and S3 destinations, cron schedules, CLI, and default-on rate limiting.
v0.11.0 Aug 2026 VAPT remediation, trusted-issuer OIDC auth, Cloud Studio, and Python 3.14.
v0.10.0 Aug 2026 Tenant-deployed Python handlers with versioned deployments and a built-in editor.
v0.9.0 Aug 2026 Field-level encryption, encrypted webhook secrets, and scoped secret reveal.
SnackBase gives you startup velocity with enterprise controls: collection rules, multi-account isolation, immutable audit history, encrypted fields, tenant Functions, and a built-in automation engine.