Skip to content

Widgets

Class WidgetsService

class WidgetsService(CommonMixin, PrintMixin)

[view_source]

Service for managing widgets

  • only supports create, delete and update (DELETE, POST)
  • does not support get_all or get (GET)

create

def create(*,
           dashboard_id: int,
           visualization_id: Optional[int],
           options: Dict,
           text: str = "") -> Dict

[view_source]

create new widget in given dashboard

Arguments:

  • dashboard_id - id of dashboard to create widget in
  • visualization_id - id of visualization to use for widget (pass None for text widget)
  • options - options to use for widget
  • text - text to use for text widget

CommonMixin

update

def update(id: int, data: Dict) -> Dict

[view_source]

Update by ID

delete

def delete(id: int) -> None

[view_source]

Delete by ID

Class PrintMixin

class PrintMixin()

[view_source]

Mixin class for printing data