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)
- Host: GitHub
- URL: https://github.com/ambientwave/cosmetic-product-flask-rest-api
- Owner: ambientWave
- Created: 2023-08-08T10:10:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-11T13:08:55.000Z (almost 3 years ago)
- Last Synced: 2025-04-08T14:43:22.310Z (about 1 year ago)
- Topics: api, backend, backend-api, database, flask, mongodb, postgresql, python, python3, rest-api, sqlite
- Language: Python
- Homepage:
- Size: 16.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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

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

3. The product collection after addition

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

5. The product collection after removal

## 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