Skip to content

metadata_api_loader

metadata_api_loader ¤

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.

Initialize the DatapointAPI class.

: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).

get_all_uuids ¤

get_all_uuids() -> Dict[str, List[str]]

Return a dictionary of UUIDs for each device.

get_all_metadata ¤

get_all_metadata() -> Dict[str, List[Dict[str, str]]]

Return a dictionary of metadata for each device.

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.