earthkit.data.core.plugins¶
Plugins rely on the python plugins system using entry_points.
Attributes¶
Classes¶
Functions¶
|
Return a list of directories that are used in the project . |
|
Find a plugin by name . |
|
Loads the plugins for a given kind. The plugin needs to have registered itself with entry_point. |
|
|
|
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 (
listorstr) – List of directories to be searched to find the plugin.name (
str) – Name of the pluginloader (
class) – Class implementing load_yaml() and load_module()
- Returns:
Return what the loader will returns when appliedtothe plugin with the right namename,
found in oneofthe directoriesofthe `directorieslist.`
- 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)¶