What's the difference between a module and package in Python?

difference, module, package, python, terminology

Solution

A module is a single file (or files) that are imported under one import and used. e.g.

import my_module

A package is a collection of modules in directories that give a package hierarchy.

from my_package.timing.danger.internets import function_of_love

Documentation for modules

Introduction to packages

Problem

What's the difference between a module and package in Python? See also: What's the difference between "package" and "module"? (for other languages)

Original source

Related problems