fiftyone.plugins.definitions¶
Plugin definitions.
Classes:
|
A plugin definition. |
-
class
fiftyone.plugins.definitions.
PluginDefinition
(directory, metadata)¶ Bases:
object
A plugin definition.
- Parameters
directory – the directory containing the plugin
metadata – a plugin metadata dict
Attributes:
The name of the plugin.
The directory containing the plugin.
The author of the plugin.
The version of the plugin.
The URL of the plugin.
The license of the plugin.
The description of the plugin.
The FiftyOne compatibility version.
The FiftyOne requirement as a string like
fiftyone>=0.21
.The operators of the plugin.
The absolute path to the package.json file.
Whether the plugin has a package.json file.
The relative path to the JS bundle file.
The absolute path to the Python entry file.
The default server path to the plugin.
The default server path to the JS bundle.
A hash of the plugin’s JS bundle file.
Whether the plugin has a Python entry file.
Whether the plugin has a JS bundle file.
A list of required secrets for the plugin.
Methods:
can_register_operator
(name)Whether the plugin can register the given operator.
to_dict
()Returns a JSON dict representation of the plugin metadata.
from_disk
(metadata_path)Creates a
PluginDefinition
for the given metadata file.-
property
name
¶ The name of the plugin.
-
property
directory
¶ The directory containing the plugin.
The author of the plugin.
-
property
version
¶ The version of the plugin.
-
property
url
¶ The URL of the plugin.
-
property
license
¶ The license of the plugin.
-
property
description
¶ The description of the plugin.
-
property
fiftyone_compatibility
¶ The FiftyOne compatibility version.
-
property
fiftyone_requirement
¶ The FiftyOne requirement as a string like
fiftyone>=0.21
.
-
property
operators
¶ The operators of the plugin.
-
property
package_json_path
¶ The absolute path to the package.json file.
-
property
has_package_json
¶ Whether the plugin has a package.json file.
-
property
js_bundle
¶ The relative path to the JS bundle file.
-
property
js_bundle_path
¶
-
property
py_entry
¶
-
property
py_entry_path
¶ The absolute path to the Python entry file.
-
property
server_path
¶ The default server path to the plugin.
-
property
js_bundle_server_path
¶ The default server path to the JS bundle.
-
property
js_bundle_hash
¶ A hash of the plugin’s JS bundle file.
-
can_register_operator
(name)¶ Whether the plugin can register the given operator.
- Parameters
name – the operator name
- Returns
True/False
-
property
has_py
¶ Whether the plugin has a Python entry file.
-
property
has_js
¶ Whether the plugin has a JS bundle file.
-
property
secrets
¶ A list of required secrets for the plugin.
-
to_dict
()¶ Returns a JSON dict representation of the plugin metadata.
- Returns
a JSON dict
-
classmethod
from_disk
(metadata_path)¶ Creates a
PluginDefinition
for the given metadata file.- Parameters
metadata_path – the path to a plugin
.yaml
file- Returns