Flask-Book-Library Build Status Maintainability

This a flask restful api created using flask web framework to management books as I learn to become a better software developer.

Project setup

This project is using python3.6 and you need to create a virtual environment by running the following command:

virtualenv -p /usr/bin/python3.6 my_project

You can use also virtualenvwrapper.

Clone the project

To get the project run the following command:

git clone https://github.com/henrymbuguak/Flask-Book-Library.git

Installing dependencies

To install dependencies cd Flask-Book-Library and make sure your virtual environment is active. run the following command:

pip install -r requirements.txt

To run the Project use this command

FLASK_APP=run.py FLASK_DEBUG=1 flask run

To test Endpoints Using Postman

This are the endpoint I have today:

  • show all books and create book: /api/books
  • Edit book: /api/books/int:book_id
  • delete a book: /api/books/int:book_id
  • user register: /api/auth/register
  • user login: /api/auth/login
  • user logout: /api/auth/logout
Basic test

Have a look at test_basic.py file to see how I am approaching unit test

To run the test run the following command: python -m unittest discover

Heroku Url

https://hmbucket-api-heroku.herokuapp.com/