Building inventory
- We have implemented interactive cli refer here for change setRefer Here
- As of this changeset the warehouse items are stored in dictionary, once the program is stopped all entries are lost, We can save the items in a file
Liskovs substitution principle
- Refer Here for LSP
Duck typing
If it walks like a duck and it quacks like a duck, then it must be a duck.
Python context manager
- Refer Here for context manager
- Refer Here for context managers added at last
Python file Manangemnt
- In python we can manage two types of files
- text
- binary
- Python standard library has built in method called as
openwhich takes two arguments- path
- mode
Using csv files to store warehouse itmes
- For each warehouse we will create a new csv file
- Any operations done on warehouse will lead to csv file changes
- Lets use pandas.
- Activate the virtual environments
pip install pandas # pip
uv pip install pandas # uv
uv add pandas # uv
- Refer Here for pandas tutorial
- Refer Here for samples
