Store manager is an application that enables users to keep track of goods in their stores. It is meant for managerial purposes by store owners. The two major people that operate it are the admins who add store attendants and can choose to make them administrators. This is the implementation of the API for this project.
- Fork into my repository by running
$git clone https://github.com/ampaire/store_manager_endpoints - Creating project path
$cd store_manager_endpoints - Creating a virtual environment
$virtual env venv -p python - Activating the virtual environment linux -
$source venv/bin/activateand windowsc:/ .\venv\Scripts\activate venv/bin/activate $pip install -r requirements.txtfor the project dependences.
* pip3
* pylint
* pytest
* flask
* python 3
* requests
all required modules listed above need to be installed
- all installations are run with
$pip install <module-name>Example$pip install pytest
$virtual env venv
$source venv/bin/activate
$pip install flask
$pip install requests
$pip install pytest
@app.route("/api/v1/<examples/example>", methods=["?"]) "specifies the route for the api"
| Method | endpoint |
|---|---|
| GET(gets all products) | api/v1/products |
| ------------------------- | ----------------------------- |
| GET(gets one product) | api/v1/products/int:id_ |
| ------------------------- | ----------------------------- |
| GET(gets all sale orders) | api/v1/sales |
| ------------------------- | ---------------------------- |
| POST(adds a sale order) | api/v1/sales |
| ------------------------- | ---------------------------- |
| POST(adds a product) | api/v1/products |
| ------------------------- | ---------------------------- |
| PUT(modifies a product) | api/v1/products/int:id_ |
| ------------------------- | ---------------------------- |
| DELETE(deletes a product) | api/v1/products/int:id_ |
| ------------------------- | ---------------------------- |
$python run.py
To run the tests `$pytest
To contribute to this project,
- fork this repository and make necessary changes. Then create a branch
improved-featureand commit changes
[Ampaire Phemia](github.com/ampaire)