Search Plugins#
Search plugins must inherit the following class and implement query()
:
- class eodag.plugins.search.base.Search(provider: str, config: PluginConfig)[source]#
Base Search Plugin.
- Parameters:
provider (str) – An EODAG provider name
config (
PluginConfig
) – An EODAG plugin configuration
- build_sort_by(sort_by_arg: SortByList) Tuple[str, Dict[str, List[Dict[str, str]]]] [source]#
Build the sorting part of the query string or body by transforming the “sortBy” argument into a provider-specific string or dictionnary
- discover_product_types(**kwargs: Any) Dict[str, Any] | None [source]#
Fetch product types list from provider using discover_product_types conf
- discover_queryables(**kwargs: Any) Dict[str, Annotated[Any, FieldInfo]] | None [source]#
Fetch queryables list from provider using discover_queryables conf
- Parameters:
kwargs (Any) – additional filters for queryables (productType and other search arguments)
- Returns:
fetched queryable parameters dict
- Return type:
Optional[Dict[str, Annotated[Any, FieldInfo]]]
- get_metadata_mapping(product_type: str | None = None) Dict[str, str | List[str]] [source]#
Get the plugin metadata mapping configuration (product type specific if exists)
- get_product_type_def_params(product_type: str, **kwargs: Any) Dict[str, Any] [source]#
Get the provider product type definition parameters and specific settings
- get_sort_by_arg(kwargs: Dict[str, Any]) SortByList | None [source]#
Extract the “sortBy” argument from the kwargs or the provider default sort configuration
- Parameters:
kwargs (Dict[str, Any]) – Search arguments
- Returns:
The “sortBy” argument from the kwargs or the provider default sort configuration
- Return type:
SortByList
- list_queryables(filters: Dict[str, Any], product_type: str | None = None) Dict[str, Annotated[Any, FieldInfo]] [source]#
Get queryables
- map_product_type(product_type: str | None, **kwargs: Any) str | None [source]#
Get the provider product type from eodag product type
- query(product_type: str | None = None, items_per_page: int = 20, page: int = 1, count: bool = True, **kwargs: Any) Tuple[List[EOProduct], int | None] [source]#
Implementation of how the products must be searched goes here.
This method must return a tuple with (1) a list of EOProduct instances (see eodag.api.product module) which will be processed by a Download plugin (2) and the total number of products matching the search criteria. If
count
is False, the second element returned must beNone
.
This table lists all the search plugins currently available:
A plugin that helps implementing any kind of search protocol that relies on query strings (e.g: opensearch). |
|
A specialisation of RestoSearch that modifies the way the EOProducts are built from the search results |
|
A specialisation of a QueryStringSearch that does a two step search to retrieve all products metadata |
|
A specialisation of a QueryStringSearch that uses POST method |
|
A specialisation of a QueryStringSearch that uses generic STAC configuration |
|
|
Static STAC Catalog search plugin |
|
BuildSearchResult search plugin. |
|
BuildPostSearchResult search plugin. |
|
A plugin for implementing search based on OGC CSW |