Library : collection of related functionalities.
Module : set of independent units that can be used to construct a complex structure . functions and global variables.
API : is an interface for other applications to interact with your library without having direct access.
Package : directory with files, collection of modules. Must have __init__.py to let the python interpreter know that this is a package.
Script : series of command within a single file
Framework : flow of data or flow of control is managed by the framework. Inversion of control.
Simple analogy :
module : fingers , library : hand , body: framwork