«
module documentation

Core plugin methods.

Copyright 2017-2025, Voxel51, Inc.

Class PluginPackage Plugin package.
Function create_plugin Creates a plugin with the given name.
Function delete_plugin Deletes the given plugin from local disk.
Function disable_plugin Disables the given plugin.
Function download_plugin Downloads the plugin(s) from the given location to your local plugins directory (fo.config.plugins_dir).
Function enable_plugin Enables the given plugin.
Function ensure_plugin_compatibility Ensures that the given plugin is compatible with your current FiftyOne package version.
Function ensure_plugin_requirements Ensures that any Python package requirements associated with the given plugin are installed.
Function find_plugin Returns the path to the plugin on local disk.
Function get_plugin Gets the definition for the given plugin.
Function install_plugin_requirements Installs any Python package requirements associated with the given plugin.
Function list_disabled_plugins Returns a list of all disabled plugin names.
Function list_downloaded_plugins Returns a list of all downloaded plugin names.
Function list_enabled_plugins Returns a list of all enabled plugin names.
Function list_plugins Lists available plugins.
Function load_plugin_requirements Loads the Python package requirements associated with the given plugin, if any.
Constant PLUGIN_METADATA_FILENAMES Undocumented
Variable logger Undocumented
Function _download_archive Undocumented
Function _find_plugin_metadata_file Undocumented
Function _find_requirements Undocumented
Function _get_plugin Undocumented
Function _handle_shadowed Undocumented
Function _iter_plugin_metadata_files Undocumented
Function _list_disabled_plugins Undocumented
Function _list_plugins Undocumented
Function _load_plugin_definition Undocumented
Function _parse_plugin_metadata Undocumented
Function _recommend_label Undocumented
Function _recommend_plugin_dir Undocumented
Function _update_plugin_settings Undocumented
def create_plugin(plugin_name, from_files=None, outdir=None, description=None, version=None, overwrite=False, **kwargs): (source)

Creates a plugin with the given name.

If no from_files are provided, a directory containing only the plugin's metadata file will be created.

If no outdir is specified, the plugin is created within your local plugins directory (fo.config.plugins_dir).

Parameters
plugin_namethe name of the plugin
from_files:Nonea directory or list of explicit filepaths to include in the plugin
outdir:Nonethe path at which to create the plugin directory. If not provided, the plugin is created within your fo_config.plugins_dir
description:Nonea description for the plugin
version:Nonean optional FiftyOne version requirement string
overwrite:Falsewhether to overwrite a local plugin with the same name if one exists
**kwargsadditional keyword arguments to include in the plugin definition
Returns
the directory containing the created plugin
def delete_plugin(plugin_name): (source)

Deletes the given plugin from local disk.

Parameters
plugin_namethe plugin name
def disable_plugin(plugin_name, _allow_missing=False): (source)

Disables the given plugin.

Parameters
plugin_namethe plugin name
_allow_missingUndocumented
def download_plugin(url_or_gh_repo, plugin_names=None, overwrite=False): (source)

Downloads the plugin(s) from the given location to your local plugins directory (fo.config.plugins_dir).

Note

To download from a private GitHub repository that you have access to, provide your GitHub personal access token by setting the GITHUB_TOKEN environment variable.

Parameters
url_or_gh_repo

the location to download from, which can be:

  • a GitHub repo URL like https://github.com/<user>/<repo>
  • a GitHub ref like https://github.com/<user>/<repo>/tree/<branch> or https://github.com/<user>/<repo>/commit/<commit>
  • a GitHub ref string like <user>/<repo>[/<ref>]
  • a GitHub tree path like https://github.com/<user>/<repo>/tree/<branch>/<path>
  • a publicly accessible URL of an archive (eg zip or tar) file
plugin_names:Nonea plugin name or iterable of plugin names to download. By default, all found plugins are downloaded
overwrite:Falsewhether to overwrite an existing plugin with the same name if it already exists
Returns
a dict mapping plugin names to plugin directories on disk
def enable_plugin(plugin_name, _allow_missing=False): (source)

Enables the given plugin.

Parameters
plugin_namethe plugin name
_allow_missingUndocumented
def ensure_plugin_compatibility(plugin_name, error_level=None, log_success=False): (source)

Ensures that the given plugin is compatible with your current FiftyOne package version.

Parameters
plugin_namethe plugin name
error_level:None

the error level to use, defined as:

  • 0: raise error if plugin is not compatible
  • 1: log warning if plugin is not satisfied
  • 2: ignore fiftyone compatibility requirements

By default, fiftyone.config.requirement_error_level is used

log_success:Falsewhether to generate a log message if the plugin is compatible
def ensure_plugin_requirements(plugin_name, error_level=None, log_success=False): (source)

Ensures that any Python package requirements associated with the given plugin are installed.

Parameters
plugin_namethe plugin name
error_level:None

the error level to use, defined as:

  • 0: raise error if requirement is not satisfied
  • 1: log warning if requirement is not satisfied
  • 2: ignore unsatisifed requirements

By default, fiftyone.config.requirement_error_level is used

log_success:Falsewhether to generate a log message if a requirement is satisfied
def find_plugin(name): (source)

Returns the path to the plugin on local disk.

Parameters
namethe plugin name
Returns
the path to the plugin directory
def get_plugin(name=None, plugin_dir=None): (source)

Gets the definition for the given plugin.

Parameters
name:Nonethe plugin name
plugin_dir:Nonea directory containing the plugin
Returns
a PluginDefinition
def install_plugin_requirements(plugin_name, error_level=None): (source)

Installs any Python package requirements associated with the given plugin.

Parameters
plugin_namethe plugin name
error_level:None

the error level to use, defined as:

  • 0: raise error if the install fails
  • 1: log warning if the install fails
  • 2: ignore install fails

By default, fiftyone.config.requirement_error_level is used

def list_disabled_plugins(): (source)

Returns a list of all disabled plugin names.

Returns
a list of plugin names
def list_downloaded_plugins(): (source)

Returns a list of all downloaded plugin names.

Returns
a list of plugin names
def list_enabled_plugins(): (source)

Returns a list of all enabled plugin names.

Returns
a list of plugin names
def list_plugins(enabled=True, builtin=False, shadowed=False): (source)

Lists available plugins.

Parameters
enabled:Truewhether to include only enabled plugins (True) or only disabled plugins (False) or all plugins ("all")
builtin:Falsewhether to include only builtin plugins (True) or only non-builtin plugins (False) or all plugins ("all")
shadowed:Falsewhether to include only "shadowed" duplicate plugins (True) or only usable plugins (False) or all plugins ("all")
Returns
a list of PluginDefinition instances
def load_plugin_requirements(plugin_name): (source)

Loads the Python package requirements associated with the given plugin, if any.

Parameters
plugin_namethe plugin name
Returns
a list of requirement strings, or None
PLUGIN_METADATA_FILENAMES: tuple[str, ...] = (source)

Undocumented

Value
('fiftyone.yml', 'fiftyone.yaml')

Undocumented

def _download_archive(url, outdir): (source)

Undocumented

def _find_plugin_metadata_file(dirpath): (source)

Undocumented

def _find_requirements(plugin_name): (source)

Undocumented

def _get_plugin(name, enabled=None, builtin=None): (source)

Undocumented

def _handle_shadowed(plugins, shadowed=None): (source)

Undocumented

def _iter_plugin_metadata_files(root_dir=None, strict=False): (source)

Undocumented

def _list_disabled_plugins(): (source)

Undocumented

def _list_plugins(enabled=None, builtin=None, shadowed=None): (source)

Undocumented

def _load_plugin_definition(plugin=None, plugin_dir=None): (source)

Undocumented

def _parse_plugin_metadata(metadata_path): (source)

Undocumented

def _recommend_label(name): (source)

Undocumented

def _recommend_plugin_dir(plugin_name, src_dir=None): (source)

Undocumented

def _update_plugin_settings(plugin_name, enabled=None, delete=False, **kwargs): (source)

Undocumented