earthkit.data.core.plugins

Plugins rely on the python plugins system using entry_points.

Attributes

Classes

Functions

directories([owner])

Return a list of directories that are used in the project .

find_plugin(directories, name, loader[, refreshed])

Find a plugin by name .

load_plugins(kind)

Loads the plugins for a given kind. The plugin needs to have registered itself with entry_point.

refresh([kind])

register(kind, name, proc)

Module Contents

earthkit.data.core.plugins.AVAILABLE_KINDS = ['source']
earthkit.data.core.plugins.CACHE
earthkit.data.core.plugins.PLUGINS
earthkit.data.core.plugins.REGISTERED
class earthkit.data.core.plugins.RegisteredPlugin
earthkit.data.core.plugins.directories(owner=False)

Return a list of directories that are used in the project .

If owner = False, return a list of directories where to search for plugins.

If owner = True, return a list of 2-uples to include the owner in the return value.

Parameters:

owner (bool, optional)

earthkit.data.core.plugins.find_plugin(directories, name, loader, refreshed=False)

Find a plugin by name .

Parameters:
  • directories (list or str) – List of directories to be searched to find the plugin.

  • name (str) – Name of the plugin

  • loader (class) – Class implementing load_yaml() and load_module()

Returns:

  • Return what the loader will returns when applied to the plugin with the right name

  • name, found in one of the directories of the `directories list.`

Raises:

NameError – If plugin is not found.

earthkit.data.core.plugins.load_plugins(kind)

Loads the plugins for a given kind. The plugin needs to have registered itself with entry_point.

Parameters:

kind (str) – Plugin type such as “dataset” or “source”.

earthkit.data.core.plugins.refresh(kind=None)
earthkit.data.core.plugins.register(kind, name, proc)