1.1.5.1.1. tds2stac.webservices.core module#

class tds2stac.webservices.core.ConfigFileWebServicesScraper(json_file: str, logger_properties: dict = {})[source]#

Bases: object

A class for getting the list of webservices that used in the tag_config.json file. :param json_file: The path to the tag_config.json file :type json_file: str :param logger_properties: The dictionary of the logger properties. :type logger_properties: dict

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.

json_file: str#

The path to the tag_config.json file.To obtain further details on the creation of a tag_config.json file, refer: Creating the tag_config.json Configuration File: A Step-by-Step Guide.

logger_properties: dict#

The dictionary of the logger properties. You can look at keys in Logger class.

class tds2stac.webservices.core.JSONFileWebServiceListScraper(json_file: str, logger_properties: dict = {})[source]#

Bases: object

A class to get all tds2stac_webservice_analyser in tag_config.json file when tds2stac_mode_analyser is get or check.

load_and_process_json()[source]#
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: 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 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.json file. For example item_datacube_extension and so on.

harvester(root, service_url, 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]#
logger_properties: dict#

The dictionary of the logger properties. You can look at keys in Logger class.

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: 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 logger_properties (dict, optional):The dictionary of the logger properties. requests_properties (dict, optional): A dictionary that modify the requests to URLs.

aslist()[source]#
logger_properties: dict#

The dictionary of the logger properties. You can look at keys in Logger class.

requests_properties: dict#

To obtain additional information on this topic, refer to the requests_properties. The default value is an empty dictionary.

url: str#

url is the url of the TDS catalog