Skip to content

hari4742/backend_assignment_meld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Backend Assignment

Environment Variables

DATABASE_URL=sqlite:///./app/db/reviews.db
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_BACKEND_URL=redis://localhost:6379/0
OPENAI_API_KEY=your-api-key
OPENAI_MODEL=gpt-4

Steps to run locally

  1. Clone the repo
  2. Create virtual environment
python -m venv venv
.\venv\Scripts\activate  # on linux or mac: source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Run database migrations
alembic upgrade head
  1. Start Redis server (ensure Redis is installed)
redis-server
  1. Start the Celery worker
celery -A app.core.celery_app worker --loglevel=info --pool=solo
  1. Run the FastAPI application
uvicorn app.main:app --reload