loicemeyo / books-app

A books application that allows different user functions around management of books in a library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Hello Books

Hello Books is a simple API that implements CRUD functionalities. Two knids of users can use this API. A normal user (non-admin) can register to be a user, login, view all books available, borrow a book and logout. The admin, in addition to what the normal user can do is also able to create a new book, edit or delete an existing book.

Code Integration and Testing

Build Status Coverage Status

Functionalities

The following are functionalities enabled with this API:

Functionality Endpoint
POST /api/books add a book
PUT /api/books/ modify a book’s information
DELETE /api//books/ Remove a book
GET /api/books Retrieves all books
GET /api/books/ Get a book
POST /api/users/books/ Borrow a book
POST /api/auth/register Creates a user account
POST /api/auth/login Logs in a user
POST /api/auth/logout Logs out a user
POST /api/auth/reset-password Password reset

Installation & Setup

  1. Download & Install Python

  2. Clone the repository in which the project resides into your local machine

  3. Virtual Environment Installation

    • Install the virtual environment by typing: pip install virtualenv on your terminal
  4. Create a virtual environment by running virtualenv venv. This will create the virtual environment in which you can run the project.

  5. Activate the virtual environment by running venv/Scripts/activate

  6. Enter the project directory by running cd Desktop\books-api\books-app

  7. Once inside the directory install the required modules

    • Run pip install -r requirements.txt
  8. Inside the application folder run the run.py file:

  • On the terminal type python run.py to start the application

Testing

To run the tests for the app, run;

  • nosetests -v

Authors

  • Loice Meyo

About

A books application that allows different user functions around management of books in a library


Languages

Language:Python 100.0%