Skip to content

Import Utilities

import_utils

Utility functions for importing.

Functions

import_from_string

import_from_string(object_path: str, default_module: str | None = None) -> Any

Import an object from a string path like 'module.submodule.object'.

Parameters:

Name Type Description Default
object_path str

Path of the object.

required
default_module str | None

Default module path tp import if it is not included in object_path.

None

Returns:

Type Description
Any

Attribute.