In the Python ecosystem, there are two related but distinct concepts called "package":
- A "dotted module name", represented in its source as a directory with an
__init__module (i.e. an
__init__.pyfile) (+ usually more modules/
*.pyfiles and sometimes nested packages) in it
- A software unit distributed via PyPI - the Python Package Index and installable with
In most conversations, it's clear from the context what kind of package one refers to when just saying "package" or "python package". In some other conversations, the distinction doesn't even matter.
But sometimes the distinctions wouldn't be clear but does matter:
"The [type 2] package
Jinja2is written with a capital 'J', but the [type 1] package
jinja2it provides is written all-lower-case. With SciPy and NumPy however, while the project names are written in camel-case, both the [type 2] packages and the [type 1] packages are written all-lower-case and
numpyis usually imported as just
In these situations, I've begun to call the second type "PyPI package" (pronounced [ˈpaɪpiaɪ pækɪdʒ] to distinguish it from "PyPy" ([ˈpaɪpaɪ])). However, I'm unsure how to call packages of the first type.
Is there some established convention on how to call each package type when they must be distinguished?