EcmwfApi#
- class eodag.plugins.apis.ecmwf.EcmwfApi(provider, config)[source]#
A plugin that enables to build download-request and download data on ECMWF MARS.
Builds a single ready-to-download
EOProductduring the search stage.Download will then be performed on ECMWF Public Datasets (if
datasetparameter is in query), or on MARS Operational Archive (ifdatasetparameter is not in query).This class inherits from
Apifor compatibility andECMWFSearchfor the creation of the search result.- Parameters:
provider (
str) – provider nameconfig (
PluginConfig) –Api plugin configuration:
type(str) (mandatory): EcmwfApiauth_endpoint(str) (mandatory): url of the authentication endpoint of the ecmwf apimetadata_mapping(dict[str, Union[str, list]]): how parameters should be mapped between the provider and eodag; If a string is given, this is the mapping parameter returned by provider -> eodag parameter. If a list with 2 elements is given, the first one is the mapping eodag parameter -> provider query parameters and the second one the mapping provider result parameter -> eodag parameter
- __init__(provider, config)[source]#
- Parameters:
provider (
str)config (
PluginConfig)
Methods
__init__(provider, config)authenticate()Check credentials and returns information needed for auth
available_values_from_constraints(...)Filter constraints using input_keywords.
build_query_string(product_type, 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_product_types(**kwargs)Fetch product types list from provider using discover_product_types conf
discover_product_types_per_page(**kwargs)Fetch product types list from provider using discover_product_types conf using paginated
kwargs["fetch_url"]discover_queryables(**kwargs)Fetch queryables list from provider using metadata mapping
do_search(*args, **kwargs)Should perform the actual search request.
download(product[, auth, progress_callback, ...])Download data from ECMWF MARS
download_all(products[, auth, ...])Download all using parent (base plugin) method
format_as_provider_keyword(product_type, ...)Return provider equivalent keyword names from EODAG keywords.
generate_record_hash(product)Generate the record hash of the given product.
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_collections(prep, **kwargs)Get the collection to which the product belongs
get_metadata_mapping([product_type])Get the plugin metadata mapping configuration (product type specific if exists)
get_product_type_cfg_value(key[, default])Get the value of a configuration option specific to the current product type.
get_product_type_def_params(product_type[, ...])Get the provider product type definition parameters and specific settings
get_sort_by_arg(kwargs)Extract the
sort_byargument from the kwargs or the provider default sort configurationlist_queryables(filters, ...[, ...])Get queryables
map_product_type(product_type, **kwargs)Get the provider product type from eodag product type
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 product type metadata mapping.
validate(search_params, auth)Validate a search request.
Attributes
extract_propertiespluginsauthnext_page_urlnext_page_query_objtotal_items_nbneed_count