- Library is collection of packages.
- Library is similar to directory in system
Steps to create own library in python-
- Decide basic structure of package like name of package, module, sub-folders, sub-packages which will be part of it.
- Create the directory structure including folders, package name, sub packages.
- Inside main package folder create file/module i.e. .py files and sub-folders with their .py files.
- Create __init__.py file in package and sub-packages.
- Associate package with Python by attaching it Python’s site-folder of Python Installation.
- After attaching (copying) your package folder in site-package folder of your Python Installation it become a library.