Python importlib Module
Example
Verify import helpers are available:
import importlib
print(hasattr(importlib, "import_module"))
Try it Yourself »
Definition and Usage
The importlib module provides the implementation of Python's import system and a programmatic interface for importing.
Use it to dynamically import modules, interact with import hooks, and inspect import-related metadata.
Members
| Member | Description |
|---|---|
| import_module() | Import a module by name (optionally relative to a package). |
| invalidate_caches() | Invalidate the internal import caches. |
| reload() | Reload a previously imported module. |