Skip to main content

Module vs Package vs Library

·53 words·1 min·
Table of Contents
Here’s the differnce between a module, a package and library in Python.
Module
A single file that contain Python codes, functions, classes, etc.
import my_module
Package
A collection of modules stored in a directory.
Every package contains a __init__.py file.
Library
Refers to a collection of modules and packages.

Links#

zd
Author
zd
cli-geek, strategist, architect

Related