import_string
Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed.
def import_string(
dotted_path: string
) - > any
Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed.
Parameters
| Name | Type | Description |
|---|---|---|
| dotted_path | string | The full Python path to a module and its attribute, separated by dots (e.g., 'package.module.ClassName') |
Returns
| Type | Description |
|---|---|
any | The attribute or class designated by the final component of the dotted path |