Skip to main content

Flask-Supabase Extension

The Flask-Supabase extension provides a simple and intuitive way to integrate Supabase into your Flask applications. With minimal setup, you can start leveraging the power of Supabase in your Flask projects, whether it's for database operations, authentication, or any other feature supported by Supabase.

Features

  • Easy integration of Supabase into Flask applications.
  • Automatic management of Supabase API keys and URLs.
  • Efficient handling of Supabase client instances throughout the application lifecycle.

Installation

Install Flask-Supabase using pip:

pip install flask-supabase

Quick Start

  1. Set up your Flask application

First, ensure you have Flask installed. If not, you can install it using pip:

pip install Flask

Then, set up a basic Flask application:

from flask import Flask
app = Flask(__name__)
  1. Configure the Flask-Supabase extension

Import and initialize the Supabase extension, passing your Flask app object to it. Don't forget to set the SUPABASE_URL and SUPABASE_KEY in your app's configuration:

from flask_supabase import Supabase

app.config['SUPABASE_URL'] = 'your_supabase_project_url'
app.config['SUPABASE_KEY'] = 'your_supabase_api_key'
supabase_extension = Supabase(app)

Alternatively, if you are using a factory function to create your Flask app, you can set up the Supabase extension like this:

supabase_extension = Supabase()

def create_app():
    app = Flask(__name__)
    app.config['SUPABASE_URL'] = 'your_supabase_project_url'
    app.config['SUPABASE_KEY'] = 'your_supabase_api_key'
    supabase_extension.init_app(app)
    return app
  1. Use the Supabase client in your application

Now, you can access the Supabase client in your route handlers using supabase_extension.client. Here's an example of how to perform a database operation with Supabase:

@app.route('/users')
def get_users():
    response = supabase_extension.client.from_('users').select('*').execute()
    return response.data

Documentation

For more information on Supabase and its capabilities, visit Supabase documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a pull request.

Support

If you have any questions or encounter any issues, please open an issue on the project's GitHub page.

Acknowledgements

This project is not officially associated with Supabase. All trademarks are the property of their respective owners.

Metadata

Release files for flask-supabase 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-supabase 0.3.1
File Size Uploaded
flask_supabase-0.3.1.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-supabase 0.3.1
File Interpreter ABI Platform
flask_supabase-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / flask_supabase-0.3.1.tar.gz

Download URL flask_supabase-0.3.1.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6c5eab0dc73520d0af526acaef20a7e80c5c5c6c62ce7c53e10e1312564c809f
BLAKE2b-256 checksum
How to use checksums
7c8db9cfc78e1ca7399e4b9173bb82b3bc3addf65147ab847c72fa814fa68770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.0

Release files / flask_supabase-0.3.1-py3-none-any.whl

Download URL flask_supabase-0.3.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0fc647f1d984dc9c4aab76c0fb0f15d7d102395c2414bf8fe602dce609b01055
BLAKE2b-256 checksum
How to use checksums
9a17915e9a8765dbeafc95da4be269528a7fba828e6fab9a44ae2acc614b7d9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.0

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page