Core plugin methods.
Class |
|
Plugin package. |
Function | create |
Creates a plugin with the given name. |
Function | delete |
Deletes the given plugin from local disk. |
Function | disable |
Disables the given plugin. |
Function | download |
Downloads the plugin(s) from the given location to your local plugins directory (fo.config.plugins_dir). |
Function | enable |
Enables the given plugin. |
Function | ensure |
Ensures that the given plugin is compatible with your current FiftyOne package version. |
Function | ensure |
Ensures that any Python package requirements associated with the given plugin are installed. |
Function | find |
Returns the path to the plugin on local disk. |
Function | get |
Gets the definition for the given plugin. |
Function | install |
Installs any Python package requirements associated with the given plugin. |
Function | list |
Returns a list of all disabled plugin names. |
Function | list |
Returns a list of all downloaded plugin names. |
Function | list |
Returns a list of all enabled plugin names. |
Function | list |
Lists available plugins. |
Function | load |
Loads the Python package requirements associated with the given plugin, if any. |
Constant | PLUGIN |
Undocumented |
Variable | logger |
Undocumented |
Function | _download |
Undocumented |
Function | _find |
Undocumented |
Function | _find |
Undocumented |
Function | _get |
Undocumented |
Function | _handle |
Undocumented |
Function | _iter |
Undocumented |
Function | _list |
Undocumented |
Function | _list |
Undocumented |
Function | _load |
Undocumented |
Function | _parse |
Undocumented |
Function | _recommend |
Undocumented |
Function | _recommend |
Undocumented |
Function | _update |
Undocumented |
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 | the name of the plugin |
fromNone | a directory or list of explicit filepaths to include in the plugin |
outdir:None | the path at which to create the plugin directory. If not provided, the plugin is created within your fo_config.plugins_dir |
description:None | a description for the plugin |
version:None | an optional FiftyOne version requirement string |
overwrite:False | whether to overwrite a local plugin with the same name if one exists |
**kwargs | additional keyword arguments to include in the plugin definition |
Returns | |
the directory containing the created plugin |
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 | the location to download from, which can be:
|
pluginNone | a plugin name or iterable of plugin names to download. By default, all found plugins are downloaded |
overwrite:False | whether to overwrite an existing plugin with the same name if it already exists |
Returns | |
a dict mapping plugin names to plugin directories on disk |
Ensures that the given plugin is compatible with your current FiftyOne package version.
Parameters | |
plugin | the plugin name |
errorNone | the error level to use, defined as:
By default, fiftyone.config.requirement_error_level is used |
logFalse | whether to generate a log message if the plugin is compatible |
Ensures that any Python package requirements associated with the given plugin are installed.
Parameters | |
plugin | the plugin name |
errorNone | the error level to use, defined as:
By default, fiftyone.config.requirement_error_level is used |
logFalse | whether to generate a log message if a requirement is satisfied |
Returns the path to the plugin on local disk.
Parameters | |
name | the plugin name |
Returns | |
the path to the plugin directory |
Gets the definition for the given plugin.
Parameters | |
name:None | the plugin name |
pluginNone | a directory containing the plugin |
Returns | |
a PluginDefinition |
Installs any Python package requirements associated with the given plugin.
Parameters | |
plugin | the plugin name |
errorNone | the error level to use, defined as:
By default, fiftyone.config.requirement_error_level is used |
Lists available plugins.
Parameters | |
enabled:True | whether to include only enabled plugins (True) or only disabled plugins (False) or all plugins ("all") |
builtin:False | whether to include only builtin plugins (True) or only non-builtin plugins (False) or all plugins ("all") |
shadowed:False | whether to include only "shadowed" duplicate plugins (True) or only usable plugins (False) or all plugins ("all") |
Returns | |
a list of PluginDefinition instances |
Loads the Python package requirements associated with the given plugin, if any.
Parameters | |
plugin | the plugin name |
Returns | |
a list of requirement strings, or None |