<!-- # hard line break macro for HTML -->

# fiftyone.plugins.definitions

Plugin definitions.

Copyright 2017-2026, Voxel51, Inc.
<br/>
[voxel51.com](https://voxel51.com/)
<br/>
<br/>

**Classes:**

| [`PluginDefinition`](#fiftyone.plugins.definitions.PluginDefinition)(directory, metadata[, ...])   | A plugin definition.   |
|----------------------------------------------------------------------------------------------------|------------------------|

### *class* fiftyone.plugins.definitions.PluginDefinition(directory, metadata, shadow_paths=None)

Bases: `object`

A plugin definition.

* **Parameters:**
  * **directory** – the directory containing the plugin
  * **metadata** – a plugin metadata dict
  * **shadow_paths** (*None*) – a list of plugin directories that this plugin
    shadows

**Attributes:**

| [`name`](#fiftyone.plugins.definitions.PluginDefinition.name)                                     | The name of the plugin.                                     |
|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------|
| [`directory`](#fiftyone.plugins.definitions.PluginDefinition.directory)                           | The directory containing the plugin.                        |
| [`builtin`](#fiftyone.plugins.definitions.PluginDefinition.builtin)                               | Whether the plugin is a builtin plugin.                     |
| [`shadow_paths`](#fiftyone.plugins.definitions.PluginDefinition.shadow_paths)                     | A list of plugin directories that this plugin shadows.      |
| [`author`](#fiftyone.plugins.definitions.PluginDefinition.author)                                 | The author of the plugin.                                   |
| [`version`](#fiftyone.plugins.definitions.PluginDefinition.version)                               | The version of the plugin.                                  |
| [`url`](#fiftyone.plugins.definitions.PluginDefinition.url)                                       | The URL of the plugin.                                      |
| [`license`](#fiftyone.plugins.definitions.PluginDefinition.license)                               | The license of the plugin.                                  |
| [`description`](#fiftyone.plugins.definitions.PluginDefinition.description)                       | The description of the plugin.                              |
| [`tags`](#fiftyone.plugins.definitions.PluginDefinition.tags)                                     | The tags of the plugin.                                     |
| [`fiftyone_compatibility`](#fiftyone.plugins.definitions.PluginDefinition.fiftyone_compatibility) | The FiftyOne compatibility version.                         |
| [`fiftyone_requirement`](#fiftyone.plugins.definitions.PluginDefinition.fiftyone_requirement)     | The FiftyOne requirement as a string like `fiftyone>=0.21`. |
| [`operators`](#fiftyone.plugins.definitions.PluginDefinition.operators)                           | The operators of the plugin.                                |
| [`skills`](#fiftyone.plugins.definitions.PluginDefinition.skills)                                 | The skills of the plugin.                                   |
| [`package_json_path`](#fiftyone.plugins.definitions.PluginDefinition.package_json_path)           | The absolute path to the package.json file.                 |
| [`has_package_json`](#fiftyone.plugins.definitions.PluginDefinition.has_package_json)             | Whether the plugin has a package.json file.                 |
| [`js_bundle`](#fiftyone.plugins.definitions.PluginDefinition.js_bundle)                           | The relative path to the JS bundle file.                    |
| [`js_bundle_path`](#fiftyone.plugins.definitions.PluginDefinition.js_bundle_path)                 |                                                             |
| [`py_entry`](#fiftyone.plugins.definitions.PluginDefinition.py_entry)                             |                                                             |
| [`py_entry_path`](#fiftyone.plugins.definitions.PluginDefinition.py_entry_path)                   | The absolute path to the Python entry file.                 |
| [`server_path`](#fiftyone.plugins.definitions.PluginDefinition.server_path)                       | The default server path to the plugin.                      |
| [`js_bundle_server_path`](#fiftyone.plugins.definitions.PluginDefinition.js_bundle_server_path)   | The default server path to the JS bundle.                   |
| [`js_bundle_hash`](#fiftyone.plugins.definitions.PluginDefinition.js_bundle_hash)                 | A hash of the plugin's JS bundle file.                      |
| [`has_py`](#fiftyone.plugins.definitions.PluginDefinition.has_py)                                 | Whether the plugin has a Python entry file.                 |
| [`has_js`](#fiftyone.plugins.definitions.PluginDefinition.has_js)                                 | Whether the plugin has a JS bundle file.                    |
| [`secrets`](#fiftyone.plugins.definitions.PluginDefinition.secrets)                               | A list of required secrets for the plugin.                  |

**Methods:**

| [`can_register_operator`](#fiftyone.plugins.definitions.PluginDefinition.can_register_operator)(name)   | Whether the plugin can register the given operator.                                                         |
|---------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
| [`to_dict`](#fiftyone.plugins.definitions.PluginDefinition.to_dict)()                                   | Returns a JSON dict representation of the plugin metadata.                                                  |
| [`from_disk`](#fiftyone.plugins.definitions.PluginDefinition.from_disk)(metadata_path[, shadow_paths])  | Creates a [`PluginDefinition`](#fiftyone.plugins.definitions.PluginDefinition) for the given metadata file. |

#### *property* name

The name of the plugin.

#### *property* directory

The directory containing the plugin.

#### *property* builtin

Whether the plugin is a builtin plugin.

#### *property* shadow_paths

A list of plugin directories that this plugin shadows.

#### *property* author

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* tags

The tags 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* skills

The skills 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, shadow_paths=None)

Creates a [`PluginDefinition`](#fiftyone.plugins.definitions.PluginDefinition) for the given metadata file.

* **Parameters:**
  * **metadata_path** – the path to a plugin `.yaml` file
  * **shadow_paths** (*None*) – a list of plugin directories that this plugin
    shadows
* **Returns:**
  a [`PluginDefinition`](#fiftyone.plugins.definitions.PluginDefinition)
