Search Plugins#
Search plugins must inherit the following class and implement query():
- class eodag.plugins.search.base.Search(provider, config)[source]#
Base Search Plugin.
- Parameters:
provider (
str) – An EODAG provider nameconfig (
PluginConfig) – An EODAG plugin configuration
- build_sort_by(sort_by_arg)[source]#
Build the sorting part of the query string or body by transforming the
sort_byargument into a provider-specific string or dictionary
- discover_collections(**kwargs)[source]#
Fetch collections list from provider using discover_collections conf
- discover_queryables(**kwargs)[source]#
Fetch queryables list from provider using
discover_queryablesconf
- get_assets_from_mapping(provider_item)[source]#
Create assets based on the assets_mapping in the provider’s config and an item returned by the provider
- get_collection_cfg_dates(start_default=None, end_default=None)[source]#
Get start and end dates from the collection configuration.
Extracts dates from the extent.temporal.interval structure in the collection configuration, falling back to provided defaults if dates are not available.
- Parameters:
- Return type:
- Returns:
Tuple of (mission_start_date, mission_end_date) as ISO strings or defaults
- get_collection_cfg_value(key, default=None)[source]#
Get the value of a configuration option specific to the current collection.
This method retrieves the value of a configuration option from the
collection_configattribute. If the option is not found, the provided default value is returned.- Parameters:
key (str) – The configuration option key.
default (Any) – The default value to be returned if the option is not found (default is None).
- Returns:
The value of the specified configuration option or the default value.
- Return type:
Any
- get_collection_def_params(collection, format_variables=None)[source]#
Get the provider collection definition parameters and specific settings
- get_metadata_mapping(collection=None)[source]#
Get the plugin metadata mapping configuration (collection specific if exists)
- get_sort_by_arg(kwargs)[source]#
Extract the
sort_byargument from the kwargs or the provider default sort configuration
- list_queryables(filters, available_collections, collection_configs, collection=None, alias=None)[source]#
Get queryables
- Parameters:
filters (
dict[str,Any]) – Additional filters for queryables.available_collections (
list[Any]) – list of available collectionscollection_configs (
dict[str,dict[str,Any]]) – dict containing the collection information for all used collectionscollection (
str|None, default:None) – (optional) The collection.alias (
str|None, default:None) – (optional) alias of the collection
- Return type:
QueryablesDict- Returns:
A dictionary containing the queryable properties, associating parameters to their annotated type.
- query(prep=PreparedSearch(collection=None, page=1, limit=20, auth=None, auth_plugin=None, count=True, url=None, info_message=None, exception_message=None, next_page_token=None, next_page_token_key=None), **kwargs)[source]#
Implementation of how the products must be searched goes here.
This method must return a tuple with (1) a list of
EOProductinstances which will be processed by aDownloadplugin (2) and the total number of products matching the search criteria. Ifprep.countis False, the second element returned must beNone.- Parameters:
prep (
PreparedSearch, default:PreparedSearch(collection=None, page=1, limit=20, auth=None, auth_plugin=None, count=True, url=None, info_message=None, exception_message=None, next_page_token=None, next_page_token_key=None))kwargs (
Any)
- Return type:
- queryables_from_metadata_mapping(collection=None, alias=None)[source]#
Extract queryable parameters from collection metadata mapping. :type collection:
str|None, default:None:param collection: collection id (optional) :type alias:str|None, default:None:param alias: (optional) alias of the collection :rtype:dict[str,Any] :returns: dict of annotated queryables
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 a |
|
A specialisation of a |
|
A specialisation of |
|
A specialisation of a |
Static STAC Catalog search plugin |
|
|
|
|
class that implements search for the Copernicus Marine provider |
|
Search plugin to fetch items from Copernicus Global Human Settlement Layer |
|
|
|
ECMWF search plugin. |
MeteoblueSearch search plugin. |
|
WekeoECMWFSearch search plugin. |
|
|
A plugin for implementing search based on OGC CSW |