ECMWFSearch#
- class eodag.plugins.search.build_search_result.ECMWFSearch(provider, config)[source]#
ECMWF search plugin.
This plugin builds a
SearchResultcontaining a single product using given query parameters as product properties.The available configuration parameters inherits from parent classes, with some particular parameters for this plugin.
- Parameters:
provider (
str) – An eodag providers configuration dictionaryconfig (
PluginConfig) –Search plugin configuration:
remove_from_query(list[str]): List of parameters used to parse metadata but that must not be included to the queryend_date_excluded(bool): Set to False if provider does not include end date to searchdiscover_queryables(DiscoverQueryables): configuration to fetch the queryables from a provider queryables endpoint; It has the following keys:fetch_url(str): url to fetch the queryables valid for all collectionscollection_fetch_url(str): url to fetch the queryables for a specific collectionconstraints_url(str): url of the constraint file used to build queryables
dynamic_discover_queryables(list[DynamicDiscoverQueryables]): list of configurations to fetch the queryables from different provider queryables endpoints. A configuration is used based on the given selection criterias. The first match is used. If no match is found, it falls back to standard behaviors (e.g. discovery usingdiscover_queryables). Each element of the list has the following keys:collection_selector(list[CollectionSelector]): list of collection selection criterias. The configuration given indiscover_queryablesis used if any collection selector matches the search parameters. The selector matches if the field value starts with the given prefix, i.e. it matches ifparameters[field].startswith(prefix)==True. It has the following keys:discover_queryables(list[DiscoverQueryables]): same asdiscover_queryablesabove.
- __init__(provider, config)[source]#
- Parameters:
provider (
str)config (
PluginConfig)
Methods
__init__(provider, config)available_values_from_constraints(...)Filter constraints using input_keywords.
build_query_string(collection, query_dict)Build The query string using the search parameters
build_sort_by(sort_by_arg)Build the sorting part of the query string or body by transforming the
sort_byargument into a provider-specific string or dictionaryclear()Clear search context
collect_search_urls([prep])Adds pagination to query parameters, and auth to url
count_hits([count_url, result_type])Count method that will always return 1.
discover_collections(**kwargs)Fetch collections list from provider using discover_collections conf
discover_collections_per_page(**kwargs)Fetch collections list from provider using discover_collections conf using paginated
kwargs["fetch_url"]discover_queryables(**kwargs)Fetch queryables list from provider using its constraints file
do_search([prep])Should perform the actual search request.
format_as_provider_keyword(collection, ...)Return provider equivalent keyword names from EODAG keywords.
get_assets_from_mapping(provider_item)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, ...])Get start and end dates from the collection configuration.
get_collection_cfg_value(key[, default])Get the value of a configuration option specific to the current collection.
get_collection_def_params(collection[, ...])Get the provider collection definition parameters and specific settings
get_metadata_mapping([collection])Get the plugin metadata mapping configuration (collection specific if exists)
get_provider_collections(prep, **kwargs)Get the _collection(s) / provider collection(s) to which the product belongs
get_sort_by_arg(kwargs)Extract the
sort_byargument from the kwargs or the provider default sort configurationlist_queryables(filters, ...[, collection, ...])Get queryables
map_collection(collection, **kwargs)Get the provider collection from eodag collection
normalize_results(results, **kwargs)Build
EOProductfrom provider resultquery([prep])Build ready-to-download SearchResult
queryables_by_form(form, available_values, ...)Generate Annotated field definitions from form entries and available values Used by Copernicus services like cop_cds, cop_ads, cop_ewds.
queryables_by_values(available_values, ...)Generate Annotated field definitions from available values.
queryables_from_metadata_mapping([...])Extract queryable parameters from collection metadata mapping.
validate(search_params, auth)Validate a search request.
Attributes
extract_propertiespluginsauthnext_page_urlnext_page_query_objtotal_items_nbneed_count