Skip to content

Create a Flask application that allows users to perform CRUD operations on a list of books.

Notifications You must be signed in to change notification settings

Biniyamseid/mer-flask-challenge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask-crud-challenge

Implement Simple CRUD API

Your task is to implement simple CRUD API using a simple in-memory data structure.

Details:

  • Create a Flask application that allows users to perform CRUD (Create, Read, Update, Delete) operations on a list of books. The application should have the following routes:

    1. GET /books: This route should return a list of all books.
    2. GET /books/:id: This route should return the details of a specific book identified by its ID.
    3. POST /books: This route should allow users to add a new book to the list.
    4. PUT /books/:id: This route should allow users to update the details of a specific book identified by its ID.
    5. DELETE /books/:id: This route should allow users to delete a specific book identified by its ID.
  • The book details should include the following attributes.

    • id - unique identifier (uuid, required) generated on server side
    • title - book's title (string, required)
    • author - book's auther name (string, required)
    • price - book's price (int, required)
    • category - book's category (array of strings, required)
    • publication_year - date and year of the book's publicaiton (date, required)
  • Requests to non-existing endpoints (e.g. /some-non/existing/resource) should be handled.

  • Internal server errors should be handled and processed correctly.

  • Make sure the api is accesible by frontend apps hosted on a different domain (cross-site resource sharing)

About

Create a Flask application that allows users to perform CRUD operations on a list of books.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%