qhana_plugin_runner.util.plugins module
- class qhana_plugin_runner.util.plugins.QHAnaPluginBase(app: Flask | None)
Bases:
object- get_api_blueprint() Blueprint
Get the api blueprint that bundles the api endpoints of this plugin.
- Raises:
NotImplementedError – if the plugin does not provide a blueprint
- Returns:
The blueprint that holds the plugin api.
- Return type:
Blueprint
- static get_plugins() Dict[str, QHAnaPluginBase]
- get_requirements() str
Get the plugin dependencies as a string in the requirements.txt format.
- Raises:
NotImplementedError – if the plugin has no external dependencies (other than the plugin runner)
- Returns:
the python dependencies of the plugin
- Return type:
- init_app(app: Flask)
- instance: ClassVar[QHAnaPluginBase]
- qhana_plugin_runner.util.plugins.register_plugins(app: Flask)
Load and register QHAna plugins in the locations specified by the app config.
- Parameters:
app (Flask) – the app instance to register the plugins with