ts_shape.loader.metadata.metadata_api_loader
¤
Classes:
-
DatapointAPI
–Class for accessing datapoints for multiple devices via an API.
DatapointAPI
¤
DatapointAPI(device_names: List[str], base_url: str, api_token: str, output_path: str = 'data', required_uuid_list: List[str] = None, filter_enabled: bool = True)
Class for accessing datapoints for multiple devices via an API.
:param device_names: List of device names to retrieve metadata for. :param base_url: Base URL of the API. :param api_token: API token for authentication. :param output_path: Directory to save the data points JSON files. :param required_uuid_list: Mixed list of UUIDs to filter the metadata across devices (optional). :param filter_enabled: Whether to filter metadata by "enabled == True" (default is True).
Methods:
-
display_dataframe
–Print the metadata DataFrame for a specific device or all devices.
-
get_all_metadata
–Return a dictionary of metadata for each device.
-
get_all_uuids
–Return a dictionary of UUIDs for each device.
Source code in src/ts_shape/loader/metadata/metadata_api_loader.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
display_dataframe
¤
display_dataframe(device_name: str = None) -> None
Print the metadata DataFrame for a specific device or all devices.
:param device_name: Name of the device to display metadata for (optional). If None, displays metadata for all devices.
Source code in src/ts_shape/loader/metadata/metadata_api_loader.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
get_all_metadata
¤
Return a dictionary of metadata for each device.
Source code in src/ts_shape/loader/metadata/metadata_api_loader.py
87 88 89 |
|
get_all_uuids
¤
Return a dictionary of UUIDs for each device.
Source code in src/ts_shape/loader/metadata/metadata_api_loader.py
83 84 85 |
|