Python monorepo for all Supabase libraries.
Relevant links:
- Documentation: supabase.com/docs
- Usage:
git clone https://github.com/supabase/supabase-py.git
cd supabase-py
This repository relies on the following dependencies for development:
uv
for python project management.make
for command running.docker
for bothpostgrest
andauth
test containers.supabase-cli
for bothstorage
andrealtime
test containers.
All of these dependencies are included in the nix shell environment, through flake.nix
. If you've got nix
installed, you may prefer to use it through nix develop
.
We recommend using a virtual environment, preferrably through uv
, given it is currently the only tool that understands the workspace setup (you can read more about it in the uv docs).
uv venv supabase-py
source supabase-py/bin/activate
uv sync
If you're using nix, the generated python
executable should have the correct dependencies installed for the whole workspace, given it is derived from the root's pyproject.toml
using uv2nix.
We use make
to store and run the relevant commands. The structure is setup such that each sub package can individually set its command in its own Makefile
, and the job of the main Makefile
is just coordinate calling each of them.
For instance, in order to run all tests of all packages, you should use the following root command
make ci
Which internally dispatches make -C src/{package} tests
calls to each package in the monorepo.
You should also consider using
make ci -jN # where N is the number of max concurrent jobs, or just -j for infinite jobs
To run each of the packages' tests in parallel. This should be generally faster than running in 1 job, but has the downside of messing up the CLI output, so parsing error messages might not be easy.
Other relevant commands include
make pre-commit # run lints and formmating before commiting
make stop-infra # stops all running containers from all packages
make clean # delete all intermediary files created by testing
All the sub packages command are available from the main root by prefixing the command with {package_name}.
. Examples:
make realtime.tests # run only realtime tests
make storage.clean # delete temporary files only in the storage package