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

clear() None[source]#

Method used to clear a search context between two searches.

discover_product_types() Optional[Dict[str, Any]][source]#

Fetch product types list from provider using discover_product_types conf

discover_queryables(**kwargs: Any) Optional[Dict[str, Any]][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_defaults_as_queryables(product_type: str) Dict[str, Any][source]#

Return given product type defaut settings as queryables

Parameters

product_type (str) – given product type

Returns

queryable parameters dict

Return type

Dict[str, Annotated[Any, FieldInfo]]

get_metadata_mapping(product_type: Optional[str] = None) Dict[str, str][source]#

Get the plugin metadata mapping configuration (product type specific if exists)

Parameters

product_type (str) – the desired product type

Returns

The product type specific metadata-mapping

Return type

dict

get_product_type_def_params(product_type: str, **kwargs: Any) Dict[str, Any][source]#

Get the provider product type definition parameters and specific settings

Parameters

product_type (str) – the desired product type

Returns

The product type definition parameters

Return type

dict

map_product_type(product_type: Optional[str], **kwargs: Any) Optional[str][source]#

Get the provider product type from eodag product type

Parameters

product_type (str) – eodag product type

Returns

provider product type

Return type

str

query(product_type: Optional[str] = None, items_per_page: int = 20, page: int = 1, count: bool = True, **kwargs: Any) Tuple[List[EOProduct], Optional[int]][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 be None.

This table lists all the search plugins currently available:

eodag.plugins.search.qssearch.QueryStringSearch(...)

A plugin that helps implementing any kind of search protocol that relies on query strings (e.g: opensearch).

eodag.plugins.search.qssearch.AwsSearch(...)

A specialisation of RestoSearch that modifies the way the EOProducts are built from the search results

eodag.plugins.search.qssearch.ODataV4Search(...)

A specialisation of a QueryStringSearch that does a two step search to retrieve all products metadata

eodag.plugins.search.qssearch.PostJsonSearch(...)

A specialisation of a QueryStringSearch that uses POST method

eodag.plugins.search.qssearch.StacSearch(...)

A specialisation of a QueryStringSearch that uses generic STAC configuration

eodag.plugins.search.static_stac_search.StaticStacSearch(...)

Static STAC Catalog search plugin

eodag.plugins.search.build_search_result.BuildPostSearchResult(...)

BuildPostSearchResult search plugin.

eodag.plugins.search.csw.CSWSearch(provider, ...)

A plugin for implementing search based on OGC CSW