Skip to content

CH2-PS586/backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI App Setup and Replication

This guide provides step-by-step instructions for setting up and running a FastAPI app using virtualenv for local development and possible deployment.

Prerequisites

  • Python installed on your system
  • virtualenv installed (you can install it using pip install virtualenv)

Setup

Clone the Repository:

git clone https://github.com/CH2-PS586/backend.git
cd backend

Environment Variable

  1. Create Google Cloud Storage Bucket

  2. Create .env

BUCKET_NAME=""
  1. Create service account on Google Cloud Platform (GCP) with Storage Object Admin role and store its key on ./key.json

Create a Virtual Environment:

On linux:

python3 -m virtualenv venv

on Windows:

virtualenv venv

Activate the Virtual Environment:

On Windows:

.\venv\Scripts\activate

On Linux:

source venv/bin/activate

Install Dependencies:

pip install -r requirements.txt

Running the FastAPI App

Run the FastAPI App:

uvicorn main:app --reload

Access the FastAPI App:

Open 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 the Virtual Environment:

deactivate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages