Dashboards
dashboards
Dashboards module for the Kaleidoscope system.
This module provides classes and services for working with dashboards in Kaleidoscope. Dashboards summarize data across a workspace in some way, allowing for data comparison, status review, and more.
Classes:
| Name | Description |
|---|---|
Dashboard |
Represents a single dashboard with its categories and configurations. |
DashboardsService |
Service class for managing and querying dashboards. |
Example
# get all dashboards
dashboards = client.dashboards.get_dashboards()
DashboardType
DashboardType = Literal['decision'] | Literal['data'] | Literal['chart'] | Literal['field'] | Literal['summary']
Type alias representing the valid types of dashboards in the system.
This type defines the allowed string values for the dashboard_type field
in Dashboard models.
DashboardCategory
Bases: _KaleidoscopeBaseModel
Represents the definition of a DashboardCategory in the Kaleidoscope system.
A DashboardCategory defines a summary and aggregation for entities and sets in that dashboard.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
UUID of the Dashboard Category. |
dashboard_id |
str
|
The dashboard this category is a part of. |
category_name |
str
|
The name of the category. |
operation_definition_ids |
list[str]
|
The operation activity definitions reflected in this category. |
label_ids |
list[list[str]]
|
The labels reflected in this category. |
field_ids |
list[str]
|
The fields reflected in this category. |
Dashboard
Bases: _KaleidoscopeBaseModel
Represents a dashboard in the Kaleidoscope system.
A Dashboard represents an aggregation and summarization of the state of a workspace with respect to both entity data and activity.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
UUID of the dashboard. |
dashboard_name |
str
|
The name of the dashboard. |
dashboard_description |
str
|
The description of the dashboard. |
dashboard_type |
DashboardType
|
The type of the dashboard, representing how it aggregates data. |
record_ids |
list[str]
|
List of record IDs associated with the dashboard. |
record_set_ids |
list[str]
|
List of record set IDs associated with the dashboard. |
Methods:
| Name | Description |
|---|---|
add_category |
Create a new dashboard category on this dashboard. |
remove_category |
Remove a category from the dashboard. |
get_categories |
Retrieve all categories associated with this dashboard. |
add_record |
Add a record to the dashboard. |
remove_record |
Remove a record from the dashboard. |
add_set |
Add a set to the dashboard. |
remove_set |
Remove a set from the dashboard. |
add_category
add_category(category_name: str, operation_definition_ids: list[str], label_ids: list[list[str]], field_ids: list[str]) -> DashboardCategory | None
Create a new dashboard category on this dashboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
category_name
|
str
|
The name of the new category. |
required |
operation_definition_ids
|
list[str]
|
A list of operation definition IDs to include in the category. |
required |
label_ids
|
list[list[str]]
|
A list of label IDs to include in the category. |
required |
field_ids
|
list[str]
|
A list of field IDs to include in the category. |
required |
Returns:
| Type | Description |
|---|---|
DashboardCategory | None
|
The newly created category object, or None if creation failed. |
Source code in kalpy/dashboards.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
remove_category
remove_category(category_id: str)
Remove a category from the dashboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
category_id
|
str
|
The unique identifier of the category to be removed. |
required |
Source code in kalpy/dashboards.py
125 126 127 128 129 130 131 132 133 134 135 136 137 | |
get_categories
get_categories() -> list[DashboardCategory]
Retrieve all categories associated with this dashboard.
Returns:
| Type | Description |
|---|---|
list[DashboardCategory]
|
List[DashboardCategory]: A list of DashboardCategory objects associated with this dashboard. |
Source code in kalpy/dashboards.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
add_record
add_record(record_id: str)
Add a record to the dashboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
record_id
|
str
|
The unique identifier of the record to be added. |
required |
Source code in kalpy/dashboards.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
remove_record
remove_record(record_id: str)
Remove a record from the dashboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
record_id
|
str
|
The unique identifier of the record to be removed. |
required |
Source code in kalpy/dashboards.py
169 170 171 172 173 174 175 176 177 178 179 180 181 | |
add_set
add_set(set_id)
Add a set to the dashboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
set_id
|
str
|
The unique identifier of the set to be added. |
required |
Source code in kalpy/dashboards.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
remove_set
remove_set(set_id: str)
Remove a set from the dashboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
set_id
|
str
|
The unique identifier of the set to be removed. |
required |
Source code in kalpy/dashboards.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | |
DashboardsService
DashboardsService(client: KaleidoscopeClient)
Service class for managing and retrieving dashboards from the Kaleidoscope API.
This service provides methods to fetch dashboards. It handles the conversion of raw API responses into validated Dashboard objects.
Attributes:
| Name | Type | Description |
|---|---|---|
client |
KaleidoscopeClient
|
The Kaleidoscope client instance used for API communication. |
Example
client = KaleidoscopeClient(...)
dashboards = client.dashboards.get_dashboards()
Methods:
| Name | Description |
|---|---|
get_dashboards |
Retrieve a list of dashboards from the client. |
Source code in kalpy/dashboards.py
231 232 | |
get_dashboards
cached
Retrieve a list of dashboards from the client.
Returns:
| Type | Description |
|---|---|
list[Dashboard]
|
List[Dashboard]: A list of Dashboard objects created from the response. |
Source code in kalpy/dashboards.py
263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |