Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Supabase 4 min read How-to mediumAdept

Python data loading with Supabase

Supabase's community-built Python SDK can load sample data into a Postgres-backed Supabase project with a few lines of code. The walkthrough creates Vendor and Product tables linked by a foreign key in the dashboard Table Editor, installs the SDK with pip, and stores the project URL and API keys in environment variables. A script then uses Faker and faker-commerce to generate 10 vendors and batch-insert them. It collects the returned vendor IDs and inserts a random number of products for each vendor.

Related posts

  • Supabase Wrappers, a Postgres FDW framework written in Rust

    Supabase mediumAdept

    Supabase Wrappers is an alpha Rust framework, built on pgx, for writing Postgres Foreign Data Wrappers that expose external systems such as Stripe and Firebase as queryable foreign tables. A worked example connects a Stripe account, maps products to a foreign table and queries it with SQL or the Supabase JS client. Wrappers also support a "QETL" (query, extract, transform, load) pattern: query warehouses like Snowflake on demand, join remote data with local tables, and materialize results with pg_cron. The framework adds async support for REST-API-backed FDWs and early push-down support, with ClickHouse, BigQuery and Airtable wrappers in development.

  • Cal.com launches Expert Marketplace built with Next.js and Supabase.

    Supabase mediumAdept

    Cal.com's open-source Platform Starter Kit for building expert marketplaces runs on Next.js and Supabase, having switched from SQLite to Postgres via Prisma shortly before launch once file storage was needed. Prisma connects through Supavisor using a pooled transaction-mode URL plus a direct session-mode URL, and its multiSchema feature keeps app tables out of the PostgREST-exposed public schema. Profile images upload to Supabase Storage via server-generated signed upload URLs, which works alongside Auth.js rather than Supabase Auth, and a custom Next.js Image loader serves resized images. A Vercel integration syncs environment variables and can provision a project with migrations and seeds in one click.

  • Using Supabase in Replit

    Supabase mediumAdept

    Supabase can serve as a hosted Postgres database for Node.js repls on Replit, queried directly through supabase-js. The setup is short: create a Node.js repl, require createClient, plug in the project URL and anon key from Settings > API, and load the Countries sample dataset from the SQL tab. Example queries use both .then() and async/await syntax, along with filter methods such as or, is, in and neq, and practice challenges for learning the query interface.

  • Getting started with Laravel and Postgres

    Supabase mediumAdept

    A new Laravel app can be connected to a Supabase-hosted Postgres database in a few steps: scaffold the project with Composer, install Laravel Breeze for built-in authentication, set DB_CONNECTION=pgsql and DATABASE_URL to the Supabase pooler connection string, then run migrations and start the dev server. One Supabase-specific tip is to change Laravel's search_path from the public schema to a dedicated schema such as 'laravel', because Supabase exposes public through its data API. Breeze uses Laravel's own auth rather than Supabase Auth, so only database resources are billed.

  • Testing for Vibe Coders: From Zero to Production Confidence

    Supabase mediumAdept

    A pragmatic testing strategy for fast-moving Supabase apps prioritizes integration tests against a real local Postgres stack (via `supabase start`) over unit tests, reserving unit tests for expensive logic like money and date handling and end-to-end Playwright tests for critical flows. Vitest examples cover auth triggers, Row Level Security isolation between users, storage uploads, Faker-based test data helpers and seed scripts, and OAuth testing via Admin APIs plus a few full Playwright flows. Practical advice includes avoiding flaky async tests with fake timers and per-test resets, running Supabase in GitHub Actions CI with fast and slow suites split, and using tests as the contract when coding with AI assistants.

The quest for software engineering knowledge.

Look:
Layout: