fiftyone.operators.registry#
FiftyOne operator registry.
Functions:
|
Gets the operator with the given URI. |
|
Returns all available operators. |
|
Checks if the given operator exists. |
Classes:
|
Operator registry. |
- fiftyone.operators.registry.get_operator(operator_uri, enabled=True)#
Gets the operator with the given URI.
- Parameters:
operator_uri – the operator URI
enabled (True) – whether to include only enabled operators (True) or only disabled operators (False) or all operators (“all”)
- Returns:
- Raises:
ValueError – if the operator is not found
- fiftyone.operators.registry.list_operators(enabled=True, builtin='all', type=None)#
Returns all available operators.
- Parameters:
enabled (True) – whether to include only enabled operators (True) or only disabled operators (False) or all operators (“all”)
builtin ("all") – whether to include only builtin operators (True) or only non-builtin operators (False) or all operators (“all”)
type (None) – whether to include only
"panel"
or"operator"
type operators, or a specificfiftyone.operators.Operator
subclass to restrict to
- Returns:
a list of
fiftyone.operators.Operator
instances
- fiftyone.operators.registry.operator_exists(operator_uri, enabled=True)#
Checks if the given operator exists.
- Parameters:
operator_uri – the operator URI
enabled (True) – whether to include only enabled operators (True) or only disabled operators (False) or all operators (“all”)
- Returns:
True/False
- class fiftyone.operators.registry.OperatorRegistry(enabled=True)#
Bases:
object
Operator registry.
- enabled (True): whether to include only enabled operators (True) or
only disabled operators (False) or all operators (“all”)
Methods:
list_operators
([builtin, type])Lists the available FiftyOne operators.
Lists the errors that occurred during operator loading.
operator_exists
(operator_uri)Checks if the operator exists.
can_execute
(operator_uri)Whether the operator can be executed.
get_operator
(operator_uri)Retrieves an operator by its URI.
- list_operators(builtin=None, type=None)#
Lists the available FiftyOne operators.
- Parameters:
builtin (None) – whether to include only builtin operators (True) or only non-builtin operators (False)
type (None) – whether to include only
"panel"
or"operator"
type operators, or a specificfiftyone.operators.Operator
subclass to restrict to
- Returns:
a list of
fiftyone.operators.Operator
instances
- list_errors()#
Lists the errors that occurred during operator loading.
- Returns:
a list of errors
- operator_exists(operator_uri)#
Checks if the operator exists.
- Parameters:
operator_uri – the URI of the operator
- Returns:
True/False
- can_execute(operator_uri)#
Whether the operator can be executed.
- Parameters:
operator_uri – the URI of the operator
- Returns:
True/False
- get_operator(operator_uri)#
Retrieves an operator by its URI.
- Parameters:
operator_uri – the URI of an operator
- Returns:
an
fiftyone.operators.Operator
, or None