Python - Package

> Procedural Languages > Python > Python - Grammar (Package | Module)

1 - About

Code Shipping - (Package|Module|Library) in Python

Physically,

  • package are the directories
  • and modules are the files within this directories.

Logically, a package is a module (parent module):

  • which can contain:
    • modules (submodules)
    • and package (subpackages)
  • with an __path__ attribute. (Any module that contains a __path__ attribute is considered a package.)

See also:

Advertising

3 - Type

Python defines two types of packages:

4 - Management

4.1 - Distribution

4.2 - Configuration

4.3 - Installation

4.4 - Location

See location

5 - Documentation / Reference

Advertising