pydoc.locate()

pydoc.locate(path, forceload=0)[source]

Locate an object by name or dotted path, importing as necessary.