Supabase client, python implementation (Documentation)
The supabase client library is modular. This sub-library is a standalone implementation for a single external system. This is one of the ways it supports existing tools.
View repo: https://github.com/keosariel/supabase-client
Installation
To install Supabase-Client, simply execute the following command in a terminal:
pip install supabase-client
Initializing
You can initialize a new Supabase client using the Client()
method.
The Supabase client is your entrypoint to the rest of the Supabase functionality and is the easiest way to interact with the Supabase ecosystem.
Parameters:
api_url required string
: The unique Supabase URL which is supplied when you create a new project in your project dashboard.
api_key required string
: The unique Supabase Key which is supplied when you create a new project in your project dashboard.
headers optional Dictionary
: No description provided.
Examples
With additional parameters
Reading Data
Fetch data: select()
Performs vertical filtering with SELECT.
Parameters
val required string
: The columns to retrieve, separated by commas.
Notes:
- By default, Supabase projects will return a maximum of 1,000 rows. This setting can be changed Project API Settings. It’s recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use range() queries to paginate through your data.
select()
can be combined with Filters
Examples
Getting your data
Selecting specific columns
You can select specific fields from your tables.
Adding limits: limit()
You can limit the amount of data been recievied.
Filters
Inserting Data
Create data: insert()
Parameters
data required list
: The values to insert.
Examples
Create a record
Bulk create
Modify data: update()
Performs an UPDATE operation on the table.
Parameters
target required dict
: The column to update.
data required dict
The new values
Delete data: delete()
Performs a DELETE operation on the table.
Parameters
target required dict
The column to delete.
See Supabase Docs