rs_server_common/data_retrieval/provider.md¶
Provider mechanism.
CreateProviderFailed
¶
DownloadProductFailed
¶
Product
dataclass
¶
A product.
A product has an external identifier and a dictionary of metadata.
Source code in docs/rs-server/services/common/rs_server_common/data_retrieval/provider.py
Provider
¶
Bases: ABC
A product provider.
A provider gives a common interface to search for files from an external data source and download them locally.
Source code in docs/rs-server/services/common/rs_server_common/data_retrieval/provider.py
download(product_id, to_file)
abstractmethod
¶
Download the given product to the given local path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
product_id
|
str
|
id of the product to download |
required |
to_file
|
Path
|
path where the file should be downloaded |
required |
Returns:
| Type | Description |
|---|---|
None
|
None |
Source code in docs/rs-server/services/common/rs_server_common/data_retrieval/provider.py
search(**kwargs)
¶
Search for products with the given time range.
The search result is a dictionary of products found indexed by id.
Returns:
| Type | Description |
|---|---|
Any
|
The files found indexed by file id. Specific to each provider. |