fiftyone.plugins.context#

FiftyOne plugin context.

Copyright 2017-2025, Voxel51, Inc.

Functions:

build_plugin_contexts([enabled])

Returns contexts for all available plugins.

Classes:

PluginContext(plugin_definition)

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:

name

The plugin name.

secrets

List of keys for required secrets as specified in the plugin definition.

Methods:

has_errors()

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.

register_all()

Registers all operators defined by the plugin on this context.

dispose_all()

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 or fiftyone.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.