Skip to content

Abbashozefa/flask-rest-crud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# flask-rest-crud

This project is a REST CRUD API created using flask and mongodb.

Run Locally

Clone the project

  git clone https://github.com/Abbashozefa/flask-rest-crud.git

Go to the project directory

  cd flask-rest-crud

Install dependencies

  pip install requirements.txt

Start the server

  flask run

Run Docker Image

Pull Image

  docker pull abbashozefa/flask-crud:flask-api

Run Image

  docker run -p 5000:5000 abbashozefa/flask-crud

Features

The API has the following endpoints:

  • GET /users - Returns a list of all users.
  • GET /users/id - Returns the user with the specified ID.
  • POST /users - Creates a new user with the specified data.
  • PUT /users/id - Updates the user with the specified ID with the new data.
  • DELETE /users/id - Deletes the user with the specified ID.

Test

Use POSTMAN to test the endpoints

Screenshots

GET Screenshot 2023-07-09 145503

GET with id Screenshot 2023-07-09 145847

POST Screenshot 2023-07-09 145621

PUT Screenshot 2023-07-09 145805

DELETE Screenshot 2023-07-09 145718

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published