class importlib.machinery.ModuleSpec(name, loader, *, origin=None, loader_state=None, is_package=None)
A specification for a module’s import-system-related state.
New in version 3.4.
-
name
(__name__
)
A string for the fully-qualified name of the module.
-
loader
(__loader__
)
The loader to use for loading. For namespace packages this should be set to None.
-
origin
(__file__
)
Name of the place from which the module is loaded, e.g. “builtin” for built-in modules and the filename for modules loaded from source. Normally “origin” should be set, but it may be None (the default) which indicates it is unspecified.
-
submodule_search_locations
(__path__
)
List of strings for where to find submodules, if a package (None otherwise).
-
loader_state
Container of extra module-specific data for use during loading (or None).
-
cached
(__cached__
)
String for where the compiled module should be stored (or None).
-
parent
(__package__
)
(Read-only) Fully-qualified name of the package to which the module belongs as a submodule (or None).
-
has_location
Boolean indicating whether or not the module’s “origin” attribute refers to a loadable location.
Please login to continue.