lighthouse.pluggable
¶lighthouse.pluggable.
Pluggable
[source]¶Bases: lighthouse.configurable.Configurable
Base class for classes that can be defined via external plugins.
Subclasses define their entry_point
attribute and subsequent calls to
get_installed_classes
will look up any available classes associated
with that endpoint.
Entry points used by lighthouse can be found in setup.py
in the root
of the project.
entry_point
= None¶validate_dependencies
()[source]¶Validates a plugin’s external dependencies. Should return True if all dependencies are met and False if not.
Subclasses are expected to define this method.
get_installed_classes
()[source]¶Iterates over installed plugins associated with the entry_point
and
returns a dictionary of viable ones keyed off of their names.
A viable installed plugin is one that is both loadable and a subclass of the Pluggable subclass in question.
from_config
(name, config)[source]¶Behaves like the base Configurable class’s from_config()
except this
makes sure that the Pluggable
subclass with the given name is
actually a properly installed plugin first.