Store Manager is a web application that helps store owners manage sales and product inventory records. This application is meant for use in a single store.
-
Here - Clone the repository from link.
-
Navigate to root of your application and run:
-
Create a virtual environment
$ python3 -m venv venv
these creates a python virtual environment calledvenv
-
activate the virtual environment
$ source venv/bin/activate
-
install dependencies needed for the project to run
$ pip install -r requirements.txt
-
export FLASK_APP enviroment variable
$ export FLASK_APP=run.py
-
run the application using
flask run
-
a server should be deployed at
http://127.0.0.1:5000/
- Using Postman the following endpoints can be accessed:
Methods | Url | Description |
---|---|---|
POST | http://127.0.0.1:5000/api/v2/products | create a product |
POST | http://127.0.0.1:5000/api/v2/sales | create a sale record |
GET | http://127.0.0.1:5000/api/v2/products | Fetch all product |
GET | http://127.0.0.1:5000/api/v2/sales | Fetch all sales |
GET | http://127.0.0.1:5000/api/v2/product/<int: id> | Fetches a single product |
GET | http://127.0.0.1:5000/api/v2/sale/<int: id> | Fetches a single sale |
To run the tests, in your terminal from the root folder run
python -m pytest --cov=app/tests/v2
-
Flask - Used to style HTML pages.
-
Flask-RESTful - Used extend the Flask application.
The project uses Gitflow for versioning.
Owen Adira - Initial work - owezzy
This project is licensed under the MIT License - see the LICENSE.md file for details