Skip to content

A Recommendation Engine API that can be used to recommend movies, music, games, manga, anime, comics, tv shows and books. Deployed using an AWS EC2 instance.

License

Notifications You must be signed in to change notification settings

Nneji123/Media-Recommendation-Engine

Repository files navigation

Coverage

Media Recommendation Engine, an API that recommends content such as movies, tv shows, anime, songs etc. Built with FastAPI.

Coverage Supported Python versions Supported Python versions Supported Python versions Supported Python versions Supported Python versions

Table of Contents

Features

  • Light/dark mode toggle
  • Live previews
  • Fullscreen mode
  • Cross platform

API Reference

Go to home directiory

  GET /api/home
Parameter Type Description
api_key string Required. Your API key

Get item

  GET /api/items/${id}
Parameter Type Description
id string Required. Id of item to fetch

add(num1, num2)

Takes two numbers and returns the sum.

How it works

Screenshots

Screenshot (148) Screenshot (149)

Demo

Running on Local Machine :computer

  1. Clone the repository to your local machine:
git clone https://github.com/Nneji123/Media-Recommendation-Engine.git
  1. Install the requirements:
cd Media-Recommendation-Engine
pip install -r requirements.txt
  1. Open a bash/cmd in the directory and run:
uvicorn app:app --reload --port 8000
  1. After the above steps have been carried out you can now view the documentation of the API.

To visit the FastAPI documentation go to http://localhost:8000/ with a web browser.

Running Load Tests with Locust

  1. Make sure the API is running already from the above steps.
  2. Install locust:
pip install locust
  1. Run locust tests
  cd tests
  locust -f locust_test_load.py
  1. Set the number of IP's and address and then run the load tests

Running API Tests with Pytest

  1. Install the requirements
pip install -r requirements.txt
  1. Change the directory
cd tests
  1. Run the tests with pytest
pytest test_api.py --html=pytest_report.html --self-contained-html

Deployment

Deploy to Heroku

Assuming you have git and heroku cli installed just carry out the following steps:

  1. Clone the repository
git clone https://github.com/Nneji123/Media-Recommendation-Engine.git
  1. Change the working directory
cd Media-Recommendation-Engine
  1. Create the heroku app
heroku create your-app-name 

Replace your-app-name with the name of your choosing.

  1. Set the heroku cli git remote to that app
heroku git:remote your-app-name
  1. Set the heroku stack setting to container
heroku stack:set container
  1. Push to heroku
git push heroku main

Deploy with AWS EC2

You can also deploy the API to AWS using a free tier EC2 instance by watching the video below: How to deploy FastAPI on AWS

Contributing

Contributions are always welcome!

See CONTRIBUTING.MD for ways to get started.

Please adhere to this project's code of conduct.

FAQ

What is this API used for?

This API can be used to suggest recommendations for an end user such as movies, games, songs etc.

Can the API be deployed?

Yes

License

MIT

About

A Recommendation Engine API that can be used to recommend movies, music, games, manga, anime, comics, tv shows and books. Deployed using an AWS EC2 instance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages