cement.core.extension
¶
Cement core extensions module.
-
class
cement.core.extension.
ExtensionHandler
(**kw)[source]¶ Bases:
cement.core.extension.ExtensionInterface
,cement.core.handler.Handler
This handler implements the Extention Interface, which handles loading framework extensions. All extension handlers should sub-class from here, or ensure that their implementation meets the requirements of this base class.
-
class
Meta
[source]¶ Bases:
object
Handler meta-data (can be passed as keyword arguments to the parent class).
-
label
= 'cement'¶ The string identifier of the handler.
-
-
get_loaded_extensions
()[source]¶ Get all loaded extensions.
Returns: A list of loaded extensions. Return type: list
-
list
()[source]¶ Synonymous with
get_loaded_extensions()
.Returns: A list of loaded extensions. Return type: list
-
load_extension
(ext_module)[source]¶ Given an extension module name, load or in other-words
import
the extension.Parameters: ext_module (str) – The extension module name. For example: cement.ext.ext_logging
.Raises: cement.core.exc.FrameworkError
– Raised ifext_module
can not be loaded.
-
class
-
class
cement.core.extension.
ExtensionInterface
(**kw)[source]¶ Bases:
cement.core.interface.Interface
This class defines the Extension Interface. Handlers that implement this interface must provide the methods and attributes defined below. In general, most implementations should sub-class from the provided
ExtensionHandler
base class as a starting point.-
class
Meta
[source]¶ Bases:
object
Handler meta-data.
-
interface
= 'extension'¶ The string identifier of the interface.
-
-
class