An open API service indexing awesome lists of open source software.

https://github.com/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)
https://github.com/ambientwave/cosmetic-product-flask-rest-api

api backend backend-api database flask mongodb postgresql python python3 rest-api sqlite

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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

2. 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

3. The product collection after addition

Screenshot3

4. 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

5. 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
5. open a new terminal and make sure that you are in the directory of the cloned repository
6. run the app using the following command:

### `flask run`

## Technology
- Python, Werkzeug, Flask
- HTTP, REST API, JSON
- SQLite, PostgreSQL, MongoDB