This is my Web stack Specialization portfolio project for my ALX Software Engineering program. Having specialized on Back End I opted to develop the backend of the app.
In this project, which aims to enhance the book reading experience, I will tackle the challenges I face during the reading process and how I intend to address them through the development of an interactive app. The app will provide features such as scheduling, goal-setting, progress tracking, and book recommendations.
In this project I have developed a RESTful API built for the Book reading (BookApi) application. Its code is built with Python and the Flask Web Framework. It responds to authenticated front-end requests and connects to a NoSQL database (MongoDB). Some of its files contain configurations for deployment through Nginx
Simple HTTP API for playing with Book
model.
book.py
: book modeluser.py
: user model
app.py
: entry point of the APIviews/index.py
: basic endpoints of the API: `/statusviews/books.py
: all books endpointsviews/users.py
: all users endpoints
$ pip3 install -r requirements.txt
$ API_HOST=0.0.0.0 API_PORT=5000 python3 -m app
GET /status
: returns the status of the APIGET /get_users
: returns the list of usersGET /get_items
: returns the list of booksGET /get_user/:id
: returns a user based on the IDGET /get_item/:id
: returns a book based on the IDDELETE /delete_user/:id
: deletes an user based on the IDDELETE /delete_book/:id
: deletes a book based on the IDPOST /add_book
: creates a new book (JSON parameters:title
,author
,isbn
(optional) andpublisher
(optional))POST /add_user
: creates a new user (JSON parameters:email
,password
,last_name
(optional) andfirst_name
(optional))PUT /update_user/:id
: updates a user based on the ID (JSON parameters:first_name
andlast_name
)PUT /update_book/:id
: updates a book based on the ID (JSON parameters:title
andauthor
)