ID EN
Types

__package__

Python 3.11

Which package a module belongs to. If the module is top-level (i.e. not a part of any specific package) then the attribute should be set to '', else it should be set to the name of the package (which can be __name__ if the module is a package itself). Defaults to None.

Syntax

PYTHON
__package__

See Also

package __name__ importlib.machinery.ModuleSpec.parent __spec__ __spec__