xpublish.Dependencies#
- pydantic model xpublish.Dependencies[source]#
A set of dependencies that are passed into plugin routers.
Some routers may be ‘borrowed’ by other routers to expose different geometries of data, thus the default dependencies may need to be overridden. By depending on the passed in version of this class, the dependencies can be overridden predictably.
- Fields:
cache (Callable[[...], cachey.cache.Cache])dataset (Callable[[str], xarray.core.dataset.Dataset])dataset_ids (Callable[[...], List[str]])datatree (Callable[[str], xarray.core.datatree.DataTree])plugin_manager (Callable[[...], pluggy._manager.PluginManager])plugins (Callable[[...], Dict[str, xpublish.plugins.hooks.Plugin]])
-
field dataset:
Callable[[str],Dataset] = <function get_dataset># Returns the
xarray.Datasetat/<dataset_id>/in the path. If the route includes a{group_path:path}parameter, returns the dataset at that node of the underlying DataTree; otherwise returns the root dataset.
-
field dataset_ids:
Callable[...,List[str]] = <function get_dataset_ids># Returns a list of all valid dataset ids
-
field datatree:
Callable[[str],DataTree] = <function get_datatree># Returns the
xarray.DataTreerooted at/<dataset_id>/(or at{group_path:path}if present in the route).