supabase-python
This skill teaches FastAPI development using Supabase for authentication and storage, paired with SQLAlchemy or SQLModel for database operations. It covers project structure, async session management, JWT validation, and API routes for signup and signin workflows.
Supabase-python provides FastAPI patterns combining Supabase Auth with SQLModel for building type-safe backend applications.
AI-generated summary based on this skill's SKILL.md
Install
alinaqi/maggy/supabase-python · repository language: Python
git clone https://github.com/alinaqi/maggy
cp -r maggy/skills/supabase-python ~/.claude/skills/supabase-pythonnpx skillfed install alinaqi/maggy/supabase-pythonFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I set up fastapi supabase python integration?
supabase-python teaches FastAPI development with Supabase backend using SQLAlchemy or SQLModel for database operations. Start by installing FastAPI, Supabase client, and SQLModel. Configure your Supabase project URL and API keys in environment variables, then initialize the Supabase client in your FastAPI app. The skill covers project structure, async session management, and connecting your FastAPI routes to Supabase PostgreSQL databases with proper ORM patterns.
What does supabase-python teach about async database access?
supabase-python covers async database access with SQLModel and PostgreSQL in FastAPI through async session management patterns. You'll learn to configure async engines, use dependency injection for database sessions, and write async route handlers that query Supabase PostgreSQL without blocking. The skill demonstrates how to combine SQLModel's ORM capabilities with asyncpg for non-blocking database operations in production FastAPI applications.
How does supabase-python handle authentication and JWT validation?
supabase-python teaches implementing Supabase authentication and JWT validation in FastAPI routes. The skill covers signup and signin workflows, extracting JWT tokens from request headers, validating tokens against Supabase, and protecting routes with dependency injection. You'll learn to use Supabase's service role key for server-side operations and implement Row Level Security (RLS) policies to secure data access at the database level.
What patterns does supabase-python cover for storage and realtime?
supabase-python teaches patterns for Supabase storage, realtime subscriptions, and migrations in Python. The skill includes file upload workflows using Supabase Storage buckets, async realtime event handling, and database migrations with Alembic. You'll learn to integrate these features into FastAPI routes, manage CORS middleware for cross-origin requests, and structure your application for scalable Supabase integration.
Can supabase-python help with SQLModel ORM and Supabase backend?
Yes, supabase-python focuses on SQLModel ORM with Supabase backend integration. The skill teaches how to define SQLModel schemas, configure async SQLAlchemy engines for Supabase PostgreSQL, and use dependency injection to manage database sessions in FastAPI. You'll learn model relationships, query patterns, and how to leverage SQLModel's validation alongside Supabase's authentication and storage capabilities in a cohesive FastAPI application.
How does supabase-python address environment setup and CORS?
supabase-python covers configuring environment variables, CORS middleware, and dependency injection for FastAPI. The skill teaches how to securely store Supabase credentials and API keys, set up CORS policies for frontend integration, and use FastAPI's dependency injection system to manage database sessions and authentication across routes. Proper configuration ensures your FastAPI application safely communicates with Supabase and frontend clients.
SKILL.md
rendered from the published skill — quoted content, verbatim
Supabase + Python Skill
FastAPI patterns with Supabase Auth and SQLAlchemy/SQLModel for database access.
Sources: Supabase Python Client | SQLModel
Core Principle
SQLAlchemy/SQLModel for queries, Supabase for auth/storage.
Use SQLAlchemy or SQLModel for type-safe database access. Use supabase-py for auth, storage, and realtime. FastAPI for the API layer.
Project Structure
``` project/ ├── src/ │ ├── api/ │ │ ├── init.py │ │ ├── routes/ │ │ │ ├── init.py │ │ │ ├── auth.py │ │ │ ├── posts.py │ │ │ └── users.py │ │ └── deps.py # Dependencies (auth, db) │ ├── core/ │ │ ├── init.py │ │ ├── config.py # Settings │ │ └── security.py # Auth helpers │ ├── db/ │ │ ├── init.py │ │ ├── session.py # Database session │ │
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
skills/supabase-python/SKILL.md