metadata_db_loader
metadata_db_loader ¤
DatapointDB ¤
DatapointDB(
device_names: List[str],
db_user: str,
db_pass: str,
db_host: str,
output_path: str = "data",
required_uuid_list: List[str] = None,
filter_enabled: bool = True,
)
Class for accessing datapoints via a database.
Initialize the DatapointDB class.
:param device_names: List of device names to retrieve metadata for. :param db_user: Database user. :param db_pass: Database password. :param db_host: Database host. :param output_path: Directory to save JSON files. :param required_uuid_list: List of UUIDs to filter the metadata (optional). :param filter_enabled: Whether to filter metadata by "enabled == True" and "archived == False" (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, aggregate: bool = False
) -> None
Display metadata as a DataFrame for a specific device or all devices.
:param device_name: Name of the device to display metadata for (optional). :param aggregate: If True, combine metadata from all devices into a single DataFrame.