Skip to content

Marvin-Deng/Sentiment-News-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentiment News Backend

A simple REST API for a financial news sentiment app with Gemini for sentiment analysis.

Frontend Repo

Backend Tech Stack

  • Python
  • FastAPI
  • Tortoise-ORM
  • PostgreSQL

Setup

  1. Clone the repo
git clone https://github.com/Marvin-Deng/Sentiment-News-Backend.git
  1. Create virtual environemnt
python3 -m venv venv

# Windows
venv\Scripts\activate

# Mac
source venv/bin/activate
  1. Install requirements
pip install -r requirements.txt
  1. Get free API keys and fill in values in .env

Running

hypercorn src/main:app --reload

Formatting

black .

Testing

pytest

Updating requirements

pip freeze > requirements.txt