This is a simple command-line interface (CLI) for managing a warehouse. It allows users to interact with the database by performing various operations related to categories, employees, and products.
- Python 3.x: Python is a high-level, general-purpose programming language.
The ERD diagram was built using dbdiagram.io
and can be seen through this link
-
Clone the repository to your local machine:
git clone https://github.com/chyvail/Cli-Project.git
-
Change directory to folder
cd Cli-Project
-
Set up a virtual environment using pipenv
pipenv install && pipenv shell
-
Change directory to lib and apply migation to database
cd lib;alembic upgrade head
-
Alternatively you can use the existing
wharehouse.db
file if you dont want to generate yours. Skip step 4 for this
Present features and how to use the click cli
-
Add Category
python3 main.py add_category --name <category_name>
-
Show Category
python3 main.py show_categories
-
Update Category
python3 main.py update_category --originalname <original_category_name> --newname <new_category_name>
-
Delete Category
python3 main.py delete_category --categoryname <category_name>
-
Add Employee
python3 main.py add_employee --fname <first_name> --lname <last_name> --email <employee_email>
-
Show Employees
python3 main.py show_employees
-
Update Employee
python3 main.py update_employee --oldemail <old_email> --newemail <new_email>
-
Delete Employee
python3 main.py delete_employee --employee_email <employee_email>
-
Add Product
python3 main.py add_product --name <product_name> --size <product_size> --quantity <product_quantity> --category <category_id> --added_by <employee_id>
Once everything is set up, the cli application should look something like this once the commands are executed