pywry.widget¶
Jupyter widget classes using anywidget for inline notebook rendering.
Base Widget¶
pywry.widget.PyWryWidget
¶
Bases: EmittingWidget
Fallback when anywidget is not available.
Initialize fallback widget.
Attributes¶
Functions¶
on
¶
Register an event handler (no-op in fallback).
emit
¶
Send an event (no-op in fallback).
alert
¶
alert(message: str, alert_type: Literal['info', 'success', 'warning', 'error', 'confirm'] = 'info', title: str | None = None, duration: int | None = None, callback_event: str | None = None, position: Literal['top-right', 'top-left', 'bottom-right', 'bottom-left'] = 'top-right') -> None
Show a toast notification.
| PARAMETER | DESCRIPTION |
|---|---|
message
|
The message to display.
TYPE:
|
alert_type
|
Alert type: 'info', 'success', 'warning', 'error', or 'confirm'.
TYPE:
|
title
|
Optional title for the toast.
TYPE:
|
duration
|
Auto-dismiss duration in ms. Defaults based on type.
TYPE:
|
callback_event
|
Event name to emit when confirm dialog is answered.
TYPE:
|
position
|
Toast position: 'top-right', 'top-left', 'bottom-right', 'bottom-left'.
TYPE:
|
Plotly Widget¶
pywry.widget.PyWryPlotlyWidget
¶
Bases: PyWryWidget
Fallback Plotly widget when anywidget is not available.
Initialize fallback widget.
Attributes¶
Functions¶
emit
¶
Send an event (no-op in fallback).
alert
¶
alert(message: str, alert_type: Literal['info', 'success', 'warning', 'error', 'confirm'] = 'info', title: str | None = None, duration: int | None = None, callback_event: str | None = None, position: Literal['top-right', 'top-left', 'bottom-right', 'bottom-left'] = 'top-right') -> None
Show a toast notification.
| PARAMETER | DESCRIPTION |
|---|---|
message
|
The message to display.
TYPE:
|
alert_type
|
Alert type: 'info', 'success', 'warning', 'error', or 'confirm'.
TYPE:
|
title
|
Optional title for the toast.
TYPE:
|
duration
|
Auto-dismiss duration in ms. Defaults based on type.
TYPE:
|
callback_event
|
Event name to emit when confirm dialog is answered.
TYPE:
|
position
|
Toast position: 'top-right', 'top-left', 'bottom-right', 'bottom-left'.
TYPE:
|
on
¶
Register an event handler (no-op in fallback).
AG Grid Widget¶
pywry.widget.PyWryAgGridWidget
¶
Bases: PyWryWidget
Fallback AG Grid widget when anywidget is not available.
Initialize fallback widget.
Attributes¶
Functions¶
update_columns
¶
Update columns (no-op in fallback).
update_grid
¶
Update grid (no-op in fallback).
emit
¶
Send an event (no-op in fallback).
alert
¶
alert(message: str, alert_type: Literal['info', 'success', 'warning', 'error', 'confirm'] = 'info', title: str | None = None, duration: int | None = None, callback_event: str | None = None, position: Literal['top-right', 'top-left', 'bottom-right', 'bottom-left'] = 'top-right') -> None
Show a toast notification.
| PARAMETER | DESCRIPTION |
|---|---|
message
|
The message to display.
TYPE:
|
alert_type
|
Alert type: 'info', 'success', 'warning', 'error', or 'confirm'.
TYPE:
|
title
|
Optional title for the toast.
TYPE:
|
duration
|
Auto-dismiss duration in ms. Defaults based on type.
TYPE:
|
callback_event
|
Event name to emit when confirm dialog is answered.
TYPE:
|
position
|
Toast position: 'top-right', 'top-left', 'bottom-right', 'bottom-left'.
TYPE:
|
on
¶
Register an event handler (no-op in fallback).