Emichira / Flask-Hello-Api

Hello-Books is a simple application that helps manage a library and its processes like stocking, tracking and renting books. With this application users are able to find and rent books using RESTful API's.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hello~Library

Hello-Books is a simple application that helps manage a library and its processes like stocking, tracking and renting books. With this application users are able to find and rent books using RESTful API's. The application also has an admin section where the admin add books, delete books, increase the quantity of a book etc using RESTful API's.

Code Integration and Testing

Build Status Maintainability Coverage Status Codacy Badge

Endpoints

Endpoint Functionality
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
    • Head over to the Python Downloads Site and download a version compatible with your operating system
    • To confirm that you have successfully installed Python:
      • Open the Command Prompt on Windows or Terminal on Mac/Linux
      • Type python
      • If the Python installation was successfull you the Python version will be printed on your screen and the python REPL will start
  2. Clone the repository to your personal computer to any folder
    • On GitHub, go to the main page of the repository Flask-Hello-Api
    • On your right, click the green button 'Clone or download'
    • Copy the URL
    • Enter the terminal on Mac/Linux or Git Bash on Windows
    • Type git clone and paste the URL you copied from GitHub [https://github.com/Emichira/Flask-Hello-Api.git]
    • Press Enter to complete the cloning process
  3. Virtual Environment Installation
    • Install the virtual environment by typing: pip install virtualenv on your terminal
  4. Create a virtual environment by running virtualenv --python python venv. This will create the virtual environment in which you can run the project.
  5. Activate the virtual environment by running source venv/bin/activate
  6. Enter the project directory by running cd flask-helo-api
  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

  • Emmanuel Michira

License

This project is licensed under the MIT License

About

Hello-Books is a simple application that helps manage a library and its processes like stocking, tracking and renting books. With this application users are able to find and rent books using RESTful API's.


Languages

Language:Python 100.0%