1.1.1.1.2. tds2stac.analysers.nested_collections module#
- class tds2stac.analysers.nested_collections.NestedCollectionInspector(main_catalog_url: str, nested_number: int | None = None, logger_properties: dict = {}, requests_properties: dict = {})[source]#
Bases:
objectThis class will generate Collection IDs, Titles and their corresponding URLs for a presumed nested number originating from the Recognizer class in TDS. Only works for nested scenarios number 1,2,3,8 and 9 in Recognizer class. The output will be a list of the tuples: (Root collection URL, Collection ID, Collection Title, corresponding subset URLs)
- Parameters:
- end_point_url_extractor_dict(d: dict)[source]#
A function for extracting the end point URLs of a nested dictionary.
- Parameters:
d (dict) – A nested dictionary
- end_point_url_extractor_list(list_: list)[source]#
A function for extracting the end point URLs of a nested list.
- Parameters:
list (list) – A nested list
- final_collections_details_returner(url: str)[source]#
A function for returning the URLs of input URL in First and Third cases in TDS
- Parameters:
url (str) – The URL of the TDS catalog
- n_level(d: dict, layer: int)[source]#
For decoding the generator object of
to_levelfunction. https://stackoverflow.com/a/68228562
- nested_dict_returner(url: str, dict: dict)[source]#
A function for getting the nested dictionary of a given URL.