Skip to content

Widget#

WidgetInterface #

Interface for Widget instance.

Implementation#

Widget #

Widget(
    *,
    widget_id: str | None = None,
    data: DataType | StaticDataType | None = None,
)

Building blocks of visualizations within the Platform SDK.

Shared fields by all widgets.

Parameters:

Name Type Description Default
widget_id str | None

unique id amongst other widgets in a dashboard

None
data DataType | StaticDataType | None

data for the widget. Can be a pandas dataframe or a dictionary depending on the widget type, or Storage object if the data is to be retrieved from a storage.

None

Types#

WidgetTitleType module-attribute #

WidgetTitleType = str | GenericLink | None

DataType module-attribute #

DataType = HttpGet | DuckDB | Snowflake

StaticDataType module-attribute #

StaticDataType: TypeAlias = DataFrame | dict[str, Any]