Import related utilities and helper functions.
Try to import a module from a list of modules.
modules – A list of modules to try and import
The first module found that can be imported
ImportError – If no modules can be imported from list
New in version 3.8.
Returns a class from a string including module and class.
New in version 0.3.
Import a module.
New in version 0.3.
Import a class and return an instance of it.
New in version 0.3.
Tries to import object from default namespace.
Imports a class and return an instance of it, first by trying to find the class in a default namespace, then failing back to a full path if not found in the default namespace.
New in version 0.3.
Changed in version 2.6: Don’t capture ImportError
when instanciating the object, only
when importing the object class.
Import a versioned module in format {module}.v{version][.{submodule}].
module – the module name.
version – the version number.
submodule – the submodule name.
ValueError – For any invalid input.
New in version 0.3.
Changed in version 3.17: Added module parameter.
Try to import a module and if it fails return default.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.