1.1.5.1.1. tds2stac.webservices.core module#
- class tds2stac.webservices.core.ConfigFileWebServicesScraper(json_file: str, logger_properties: dict = {})[source]#
Bases:
objectA class for getting the list of webservices that used in the
tag_config.jsonfile. :param json_file: The path to thetag_config.jsonfile :type json_file: str :param logger_properties: The dictionary of the logger properties. :type logger_properties: dict- 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.
- json_file: str#
The path to the
tag_config.jsonfile.To obtain further details on the creation of atag_config.jsonfile, refer: Creating the tag_config.json Configuration File: A Step-by-Step Guide.
- class tds2stac.webservices.core.JSONFileWebServiceListScraper(json_file: str, logger_properties: dict = {})[source]#
Bases:
objectA class to get all
tds2stac_webservice_analyserin tag_config.json file whentds2stac_mode_analyserisgetorcheck.
- class tds2stac.webservices.core.WebServiceContentScraper(root: _Element, service_url: str, json_file: str, extensions_list: list, harvesting_vars: dict | None = None, logger_properties: dict = {})[source]#
Bases:
objectThe functionality of the existing class is dependent on the settings specified in the
tag_config.jsonfile in order to harvest targeted information from a selected web service. For comprehensive instructions on configuring thetag_config.jsonfile, 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.jsonfile extensions_list (list): The list of extensions to be harvestedfrom the web service (main keys in the
tag_config.jsonfile)harvesting_vars (dict, optional): The dictionary of harvesting variables logger_properties (dict, optional):The dictionary of the logger properties.
- extensions_list: list#
The list of extensions to be harvested from the web service. Main keys in the
tag_config.jsonfile. For exampleitem_datacube_extensionand so on.
- harvesting_vars: dict | None#
It’s a dictionary that keys are variable names and values are the result of harvesting.
- logger_properties: dict#
The dictionary of the logger properties. You can look at keys in
Loggerclass.
- root: _Element#
Etree root object of the XML-based web service
- class tds2stac.webservices.core.WebServiceListScraper(url: str, logger_properties: dict = {}, requests_properties: dict = {})[source]#
Bases:
objectA 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 logger_properties (dict, optional):The dictionary of the logger properties. requests_properties (dict, optional): A dictionary that modify the requests to URLs.
- logger_properties: dict#
The dictionary of the logger properties. You can look at keys in
Loggerclass.