In python programming language, Module and Pip is the most interesting topics. So let’s understand this with a real life example.
What Is Module?
Think of models like a toolkit or toolbox. Souppose you have a toolkit that contains different types of tool. Every tools have different types of perpous. Every tools have their uinque perpous.
In python, module also like this. Every module can performe something special. Every module have their specific functionality. Just assume, we want to work with date in a project. So we can use ‘datetime’ module, that will provide us date-time related functionality.
Similarly, Python has many pre-built models that help you in different tasks. We can include modules in our python programme.
I think you understand this concepts. Let’s move forword for the next topic that is Pip:
What is Pip:
Pip is a package manager, that allows python to install thirt-party libraries. Just assume, Pip is a delivery boy, if you order something, they will deleivered the prduct at your home.
I think now it will be clear to you. If not then read this real-life story. I guarantee you will understand this thing.
Just imagine you are a achitecture engineer. You want to designed a house. In your toolkits, you have deffernts toolkit for differnt perpous. Let’s assume you need a leaser masuring tool. This tools are not available in the local market. But avaliable in the online market. So you can buy this from online.
Here, your toolkit is the pre-built tools you get like the ones that come with Python. And when you need something special that is not built-in, you order it online (or through pip), just as you include external libraries in your Python project by pip install.
Defination Of Pip:
Pip is a tool that helps in installing and managing external libraries or packages for Python. You can install these packages from Python Package Index(PyPI)
Defination Of Module:
Module is a python file, Which contains definitions and statements of Python. File name is the module name. In the suffix of file name we add .py. A model can define functions, classes, and variables that can be reused in other Python programs.
I hope you understand the analogy of modules and pip. If you not usderstand this concept, just comment with your email. I will reachout.