This guide provides step-by-step instructions for setting up and running a FastAPI app using virtualenv for local development and possible deployment.
- Python installed on your system
- virtualenv installed (you can install it using pip install virtualenv)
Clone the Repository:
git clone https://github.com/CH2-PS586/backend.git
cd backend-
Create Google Cloud Storage Bucket
-
Create .env
BUCKET_NAME=""- Create service account on Google Cloud Platform (GCP) with Storage Object Admin role and store its key on ./key.json
On linux:
python3 -m virtualenv venvon Windows:
virtualenv venvOn Windows:
.\venv\Scripts\activateOn Linux:
source venv/bin/activatepip install -r requirements.txtRun the FastAPI App:
uvicorn main:app --reloadOpen a web browser and navigate to http://127.0.0.1:8000 (or the address specified in your FastAPI app).
Deactivate the Virtual Environment:
deactivate