bag.util.importlib

This module defines various import helper methods.

Module Contents

Functions

import_class(→ Any)

Given a Python class string, import and return that Python class.

bag.util.importlib.import_class(class_str: Union[Type[Any], str]) Any[source]

Given a Python class string, import and return that Python class.

Parameters:

class_str (str) – a Python class string.

Returns:

py_class – a Python class.

Return type:

Any