Module: The module is a simple Python file that contains collections of functions and global variables and with having a
.py extension file. It is an executable file and to organize all the modules we have the concept called Package in Python.
Example: Save the code in file called demo_module.py
Import module named demo_module and call myModule function inside it.
This is My Module : Math
Package: The package is a simple directory having collections of modules. This directory contains Python modules and also having
__init__.py file by which the interpreter interprets it as a Package. The package is simply a namespace. The package also contains sub-packages inside it.
Student(Package) | __init__.py (Constructor) | details.py (Module) | marks.py (Module) | collegeDetails.py (Module)
Library: The library is having a collection of related functionality of codes that allows you to perform many tasks without writing your code. It is a reusable chunk of code that we can use by importing it in our program, we can just use it by importing that library and calling the method of that library with
Example: Importing pandas library and call read_csv method using alias of pandas i.e. pd.
- Create and Access a Python Package
- How to Install SQLObject package on Windows and Linux?
- NetworkX : Python software package for study of complex networks
- Python | Plotting Google Map using gmplot package
- Python | Plotting Google Map using folium package
- Python | Plotting Data on Google Map using pygmaps package
- Python | Adding markers to volcano locations using folium package
- Install Python package using Jupyter Notebook
- How to install MySQL connector package in Python?
- Humanize Package in Python
- Plotting ICMR approved test centers on Google Maps using folium package
- Python - Database Manager (dbm) package
- Conversion between binary, hexadecimal and decimal numbers using Coden module
- Python math library | isfinite() and remainder() method
- Stack and Queue in Python using queue Module
- Python | Adjusting rows and columns of an excel file using openpyxl module
- Python | Create and write on excel file using xlsxwriter module
- Operations on Graph and Special Graphs using Networkx module | Python
- Remember and copy passwords to clipboard using Pyperclip module in Python
- Python - Get Hardware and System information using platform module