ambientWave / Cosmetic-Product-Flask-REST-API

A project that provide the ability to manipulate a collection of cosmetic products using REST API and different database engines (sqlite, postgresql and mongodb)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Interacting with a Database of Cosmetic Products Using Flask and REST API

This application can be used to manipulate a collection of cosmetic products by applying the CRUD operations through REST API. This is achieved using Flask framework to expose specific endpoints and one of three database engines (SQLite, PostgreSQL or MongoDB).

Screenshots

  1. The JSON returned by the backend app after a HTTP request using GET method
Screenshot1
  1. One adds an item to the database by sending a HTTP request using POST method and putting the details of the added product in JSON format inside the body of the request
Screenshot1
  1. The product collection after addition
Screenshot3
  1. One can remove an item by sending a HTTP request using DELETE method. Here's the response after sending the request using cURL CLI utility
Screenshot4
  1. The product collection after removal
Screenshot5

Instructions for Running the Application

  1. clone the repository
  2. (optional but preferable) create a virtual environment
  3. install the dependencies in the requirements.txt file using pip
  4. open a new terminal and make sure that you are in the directory of the cloned repository
  5. run the app using the following command:

flask run

Technology

  • Python, Werkzeug, Flask
  • HTTP, REST API, JSON
  • SQLite, PostgreSQL, MongoDB

About

A project that provide the ability to manipulate a collection of cosmetic products using REST API and different database engines (sqlite, postgresql and mongodb)


Languages

Language:Python 97.7%Language:C++ 1.4%Language:C 0.4%Language:Tcl 0.1%Language:Cython 0.1%Language:JavaScript 0.1%Language:CSS 0.0%Language:Assembly 0.0%Language:Batchfile 0.0%Language:PowerShell 0.0%