fiftyone.plugins.context#
FiftyOne plugin context.
Functions:
|
Returns contexts for all available plugins. |
Classes:
|
Context that represents a plugin and the Python objects it creates. |
- fiftyone.plugins.context.build_plugin_contexts(enabled=True)#
Returns contexts for all available plugins.
- Parameters:
enabled (True) β whether to include only enabled plugins (True) or only disabled plugins (False) or all plugins (βallβ)
- Returns:
a list of
PluginContext
instances
- class fiftyone.plugins.context.PluginContext(plugin_definition)#
Bases:
object
Context that represents a plugin and the Python objects it creates.
- Parameters:
plugin_definition β the
fiftyone.plugins.PluginDefinition
for the plugin
Attributes:
The plugin name.
List of keys for required secrets as specified in the plugin definition.
Methods:
Determines whether the plugin has errors.
can_register
(instance)Determines whether the given operator can be registered.
register
(cls)Registers the given operator on the plugin.
Registers all operators defined by the plugin on this context.
Disposes all operators from this context.
- property name#
The plugin name.
- property secrets#
List of keys for required secrets as specified in the plugin definition.
- has_errors()#
Determines whether the plugin has errors.
- Returns:
True/False
- can_register(instance)#
Determines whether the given operator can be registered.
- Parameters:
instance β an
fiftyone.operators.operator.Operator
- Returns:
True/False
- register(cls)#
Registers the given operator on the plugin.
Note
Any errors are logged rather than being raised.
- Parameters:
cls β an
fiftyone.operators.operator.Operator
orfiftyone.operators.panel.Panel
class
- register_all()#
Registers all operators defined by the plugin on this context.
Note
Any errors are logged rather than being raised.
- dispose_all()#
Disposes all operators from this context.