1.1.4.1.1. tds2stac.webservices.core module#

class tds2stac.webservices.core.ConfigFileWebServicesScraper(json_file: str)[source]#

Bases: object

A class for getting the list of webservices that used in the tag_config.json file.

aslist()[source]#

A function for returning the list of webservices

get_values(json_obj: dict | list, key: str)[source]#

A function for getting the list of values of a specific key in a json file.

class tds2stac.webservices.core.WebServiceContentScraper(root: _Element, json_file: str, extensions_list: list, harvesting_vars: dict | None = None)[source]#

Bases: object

The functionality of the existing class is dependent on the settings specified in the tag_config.json file in order to harvest targeted information from a selected web service. For comprehensive instructions on configuring the tag_config.json file, refer to the following link: Creating the tag_config.json Configuration File: A Step-by-Step Guide.

Args:

root (etree._Element): The root of the XML-based web service json_file (str): The path to the tag_config.json file extensions_list (list): The list of extensions to be harvested

from the web service (main keys in the tag_config.json file)

harvesting_vars (dict, optional): The dictionary of harvesting variables

extensions_list: list#

The list of extensions to be harvested from the web service. Main keys in the tag_config.json file. For example item_datacube_extension and so on.

harvester(root, json_file, ext_name, harvesting_vars=None)[source]#
harvesting_vars: dict | None#

It’s a dictionary that keys are variable names and values are the result of harvesting.

json_file: str#

The path to the tag_config.json file

list_of_all_tags: List[Any]#
root: _Element#

Etree root object of the XML-based web service

class tds2stac.webservices.core.WebServiceListScraper(url: str, auth: tuple | None = None)[source]#

Bases: object

A class for getting the list of available web services of a TDS catalogs.

Args:

url (str): The catalog URL from TDS to provide its web services auth (tuple, optional): Information for authentication of the TDS catalog

aslist()[source]#
auth: tuple | None#

Authentication for TDS catalog e.g.(‘user’, ‘password’) (optional)

url: str#

url is the url of the TDS catalog