This documentation provides an overview of how I used FastAPI and Supabase in my SuperFastAPI app.
In this app, I utilized FastAPI, a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints. FastAPI is easy to use, highly efficient, and provides automatic interactive documentation.
To install the required dependencies for this app, follow these steps:
Clone the repository:
git clone https://github.com/your-username/superFastapi.git
Navigate to the project directory:
cd superFastapi
Create a virtual environment:
python3 -m venv venv
Activate the virtual environment:
venv\Scripts\activate.bat
source venv/bin/activate
Install the dependencies:
pip install -r requirements.txt
To run the SuperFastAPI app, follow these steps:
Make sure you have activated the virtual environment (see the Installation section).
Start the FastAPI server:
uvicorn main:app --reload
Open your web browser and navigate to http://localhost:8000
to access the app.
In this app, I integrated Supabase, an open-source Firebase alternative, to handle the database operations. Supabase provides a set of tools and libraries to simplify working with PostgreSQL databases.
To integrate Supabase into your FastAPI app, follow these steps:
Sign up for a Supabase account at https://supabase.io.
Retrieve your Supabase project URL and API key.
Update the app's configuration file (config.py
) with your Supabase project URL and API key.
Use the Supabase Python library (supabase-py
) to interact with the database. Refer to the Supabase documentation for more details on how to use the library.
This documentation provides an overview of how I used FastAPI and Supabase in my SuperFastAPI app. By following the installation and usage instructions, you can run the app locally and explore its features. Feel free to modify and extend the app according to your requirements.
For any further assistance, please refer to the official FastAPI and Supabase documentation.