This is a store manager application that allows the stakeholders of a given store to perform actions such as:
- Sign up to the application
- Login to the application
- Post a product
- Delete a product
- Update a product
- Post a Sale
- Get all products
- Get single product
- Get all products
- Get all sales
- Get single sale
- Logout of the application
Take the following steps:
- Create a virtual enviroment with the command
$ virtualenv -p python3 env
- Activate the virtual enviroment with the command
$ source env/bin/activate
- Ensure you have installed GIT
- Clone the repository i.e
$ git clone https://github.com/Arusey/StoreManagerAPP-ThirdCH
- Install requirements
$ pip install -r requirements.txt
https://documenter.getpostman.com/view/4790487/RzZ4q21V
https://lagatstores.herokuapp.com
After completing the following, it is time to run the app
- To run the tests use
$ pytest -v
- To run the application use
export SECRET_KEY="<your secret key>"
- `export FLASK_APP=run.py'
flask run
The following endpoints should be working:
Endpoint | functionality | contraints(requirements) |
---|---|---|
post /api/v2/auth/attsignup | create a user | user information |
post /api/v2/auth/login | login | requires authentication |
get /api/v2/products | get all the products | pass a token |
get /api/v2/products/int:id | return a single product | product id, pass token |
post /api/v2/products | create a new product entry | product data, pass token |
post /api/v2/sales | create a new sale | product id, pass token |
get /api/v2/sales | get all sales entries | pass token |
get/api/v2/sales/ | get a single sale entry | sale id, pass token |
delete/api/v2/products/int:id | delete a product | product id, pass token |
update/api/v2/products/int:id | update a product | product id, pass token |
- Python
- Flask
- Flask-Restful
- Json Web Tokens
- Heroku
- Travis CI
- Coveralls
- Code Climate