ts_shape.loader.metadata.metadata_db_loader
¤
Classes:
-
DatapointDB
–Class for accessing datapoints via a database.
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.
: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).
Methods:
-
display_dataframe
–Display metadata as a 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_db_loader.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
display_dataframe
¤
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.
Source code in src/ts_shape/loader/metadata/metadata_db_loader.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
get_all_metadata
¤
Return a dictionary of metadata for each device.
Source code in src/ts_shape/loader/metadata/metadata_db_loader.py
83 84 85 |
|
get_all_uuids
¤
Return a dictionary of UUIDs for each device.
Source code in src/ts_shape/loader/metadata/metadata_db_loader.py
79 80 81 |
|