Importlib
The `importlib` module enables programmatic imports, module reloading, and custom importers for dynamic code loading. The guide walks through Dynamic Import, Module Reloading. `importlib.import_module("module")` returns the module object at runtime. Useful for plugin systems: `module = importlib.import_module(f"plugins.{name}")`. Supports relative imports with the package parameter. Cache imported modules to avoid repeated filesystem access. `importlib.reload(module)` re-imports a module during development without restart. Only use in development — reload does not update references held by other modules. Existing class instances keep the old class. Use with hot-reloading development servers for faster iteration. The guide is organized into 2 sections that build on each other, each pairing a prose explanation with runnable code. Browse the individual functions covered by this guide in the Importlib Module category. Key APIs covered include importlib.import_module(), importlib.reload(), importlib.resources.read_text(), importlib.resources.read_binary(), importlib.resources.files(), importlib.util.find_spec(). Related guides: builtins, string, list, dict, os.