euporie.core.comm.ipywidgets
Define representations for ipywidget
comms.
Functions
|
A decorator indicating abstract methods. |
|
Shallow copy operation on arbitrary Python objects. |
|
Create a new Comm for an |
Encode bytes-like object s using the standard Base64 alphabet. |
Classes
|
Metaclass for defining Abstract Base Classes (ABCs). |
|
An accoridon layout ipywidget. |
|
A container which switches between children using expandable sections. |
|
Insert text before the input. |
|
An float textbox ipwidget with upper and lower bounds. |
|
An integer textbox ipwidget with upper and lower bounds. |
|
Add padding around a container. |
|
A box layout ipywidget (basically the same a HBox). |
|
A clickable button widget. |
|
A Button ipywidget. |
|
An area below a cell where one or more cell outputs can be shown. |
|
A toggleable checkbox widget. |
|
A checkbox ipywidget. |
|
A color picker ipywidget. |
|
A combobox input widget. |
|
A base-class for all comm objects, which support syncing traits with the kernel. |
|
Hold a container and methods to update its attributes. |
|
Turn any callable into a Filter. |
|
A date-picker ipywidget. |
|
Construct a new Decimal object. |
|
A tuple of four bools with directions. |
|
Rich output displays. |
|
A dropdown widget, allowing selection of an item from a menu of options. |
|
An ipywidget allowing an item to be selected using a drop-down menu. |
A mixin for ipywidgets which accept a value from range of exponents. |
|
|
A slider ipywidget that accepts a single value on a log scale. |
A mixin for ipywidgets which accept a range of float values. |
|
|
A progress bar ipywidget that accepts float values. |
|
A slider ipywidget that accepts a range of float values. |
|
A slider ipywidget that accepts a single float value. |
|
A float textbox ipwidget. |
|
Apply a style to child containers when focused or hovered. |
|
A horizontal layout ipywidget. |
|
Several layouts, one stacked above/under the other. ::. |
|
Alia for |
|
A label ipywidget which displays HTML. |
|
A ipywidget which displays an image. |
A mixin for ipywidgets which accept a range of integer values. |
|
|
A progress bar ipywidget that accepts integer values. |
|
A slider ipywidget that accepts a range of integer values. |
|
A slider ipywidget that accepts a single integer value. |
|
An integer textbox ipwidget. |
|
A Comm object which represents ipython widgets. |
|
A label widget which displays rich text. |
|
A label ipwidget. |
|
A widget which applies a label to another widget. |
|
Base class for layout widgets with children. |
Typed dictionary for named message callbacks. |
|
|
Base class for text-box ipywidgets with numerical values. |
|
An Output ipywidget. |
|
A progress-bar widget. |
|
The base class for progress bar ipywidgets. |
|
An ipywidget allowing an item to be selected using radio buttons. |
|
Base class for range slider ipywidgets. |
|
A split container which maintains a reference to it's children. |
|
A select widget, which allows one or more items to be selected from a list. |
|
An ipywidget allowing a value to be selected from a list of options. |
|
An ipywidget allowing one or more value to be selected from a list of options. |
|
Base class for selectable ipywidgets. |
|
A slider ipywidget where one or more of a list of options can be selected. |
|
A slider ipywidget where one of a list of options can be selected. |
|
A slider widget with an optional editable readout. |
|
Base class for slider ipywidgets. |
|
An widget which displays a given color. |
|
A tabbed layout ipywidget. |
|
A container which switches between children using tabs. |
|
A text input widget. |
|
A mixin for ipywidgets which use text-box entry. |
|
A text input widget. |
|
A text input widget. |
|
A toggleable button widget. |
|
A toggleable button ipywidget. |
|
A widget where an option is selected using mutually exclusive toggle-buttons. |
|
An ipywidget where a single value can be selected using togglable buttons. |
|
Base class for toggleable ipywidgets. |
|
An ipywidget used to represent unimplemented widgets. |
|
A vertical layout ipywidget. |
|
Several layouts, one stacked left/right of the other. ::. |
|
A validity indicator ipywidget. |
date(year, month, day) --> date object |
|
|
The year, month and day arguments are required. |
partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords. |
- class euporie.core.comm.ipywidgets.AccordionModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.LayoutIpyWidgetComm
An accoridon layout ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- render_children(models: list[str], parent: OutputParent) list[AnyContainer]
Create views for the child Comms in the layout.
- target_name = 'jupyter.widget'
- update_index(container: StackedSplit) None
Send a
comm_message
updating the selected index when it changes.
- class euporie.core.comm.ipywidgets.BoundedFloatTextModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.FloatOptionsMixin
,euporie.core.comm.ipywidgets.NumberTextBoxIpyWidgetComm
An float textbox ipwidget with upper and lower bounds.
- decr(button: euporie.core.widgets.forms.Button) None
Decrement the widget’s value by one step.
- default_rows = 1
- incr(button: euporie.core.widgets.forms.Button) None
Increment the widget’s value by one step.
- multiline = False
- normalize(x: Any) float | None
Enure the selected value is within the permitted range and is a float.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.BoundedIntTextModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IntOptionsMixin
,euporie.core.comm.ipywidgets.NumberTextBoxIpyWidgetComm
An integer textbox ipwidget with upper and lower bounds.
- decr(button: euporie.core.widgets.forms.Button) None
Decrement the widget’s value by one step.
- default_rows = 1
- incr(button: euporie.core.widgets.forms.Button) None
Increment the widget’s value by one step.
- multiline = False
- normalize(x: Any) int | None
Enure the selected value is within the permitted range and is a integer.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.BoxModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.LayoutIpyWidgetComm
A box layout ipywidget (basically the same a HBox).
- Split
- padding = 1
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- render_children(models: list[str], parent: OutputParent) list[AnyContainer]
Create views for the child Comms in the layout.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.ButtonModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
A Button ipywidget.
- click(button: euporie.core.widgets.forms.Button) None
Send a
comm_msg
describing a click event.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.CheckboxModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.ToggleableIpyWidgetComm
A checkbox ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- value_changed(button: ToggleableWidget) None
Send a
comm_message
updating the value when it changes.
- class euporie.core.comm.ipywidgets.ColorPickerModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.TextBoxIpyWidgetComm
A color picker ipywidget.
- default_rows = 1
- multiline = False
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.ComboboxModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.TextBoxIpyWidgetComm
A combobox input widget.
- default_rows = 1
- multiline = False
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.DatePickerModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.TextBoxIpyWidgetComm
A date-picker ipywidget.
- default_rows = 1
- multiline = False
- normalize(x: str) dict[str, int] | None
Attempt to convert entered text to the internal date representation.
- parse_date(value: dict[str, int]) datetime.date
Convert the internal date representation to a python date.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.DropdownModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.SelectableIpyWidgetComm
An ipywidget allowing an item to be selected using a drop-down menu.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- update_index(container: SelectableWidget) None
Send a
comm_message
updating the selected index when it changes.
- class euporie.core.comm.ipywidgets.FloatLogOptionsMixin
Bases:
euporie.core.comm.ipywidgets.FloatOptionsMixin
A mixin for ipywidgets which accept a value from range of exponents.
- class euporie.core.comm.ipywidgets.FloatLogSliderModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.FloatLogOptionsMixin
,euporie.core.comm.ipywidgets.SliderIpyWidgetComm
A slider ipywidget that accepts a single value on a log scale.
- normalize(x: Any) float | None
Enure the selected value is within the permitted range and is a float.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- set_value(slider: Slider, value: Any) None
Set the selected index when the ipywidget’s selected value changes.
- target_name = 'jupyter.widget'
- update_value(container: SelectableWidget) None
Send a
comm_message
updating the value when it changes.
- class euporie.core.comm.ipywidgets.FloatOptionsMixin
Bases:
object
A mixin for ipywidgets which accept a range of float values.
- class euporie.core.comm.ipywidgets.FloatProgressModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.FloatOptionsMixin
,euporie.core.comm.ipywidgets.ProgressIpyWidgetComm
A progress bar ipywidget that accepts float values.
- normalize(x: Any) float | None
Enure the selected value is within the permitted range and is a float.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.FloatRangeSliderModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.FloatOptionsMixin
,euporie.core.comm.ipywidgets.RangeSliderIpyWidgetComm
A slider ipywidget that accepts a range of float values.
- normalize(x: Any) float | None
Enure the selected value is within the permitted range and is a float.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- set_value(slider: Slider, values: Any) None
Any float value is permitted - we might need to add an option.
- target_name = 'jupyter.widget'
- update_value(slider: SelectableWidget) None
Send a
comm_message
updating the values when they change.
- class euporie.core.comm.ipywidgets.FloatSliderModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.FloatOptionsMixin
,euporie.core.comm.ipywidgets.SliderIpyWidgetComm
A slider ipywidget that accepts a single float value.
- normalize(x: Any) float | None
Enure the selected value is within the permitted range and is a float.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- set_value(slider: Slider, value: Any) None
Set the selected index when the ipywidget’s selected value changes.
- target_name = 'jupyter.widget'
- update_value(container: SelectableWidget) None
Send a
comm_message
updating the value when it changes.
- class euporie.core.comm.ipywidgets.FloatTextModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.FloatOptionsMixin
,euporie.core.comm.ipywidgets.NumberTextBoxIpyWidgetComm
A float textbox ipwidget.
- decr(button: euporie.core.widgets.forms.Button) None
Decrement the widget’s value by one step.
- default_rows = 1
- incr(button: euporie.core.widgets.forms.Button) None
Increment the widget’s value by one step.
- multiline = False
- normalize(x: Any) float | None
Enure the selected value is within the permitted range and is a float.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.HBoxModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.BoxModel
A horizontal layout ipywidget.
- Split
- padding = 1
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- render_children(models: list[str], parent: OutputParent) list[AnyContainer]
Create views for the child Comms in the layout.
- target_name = 'jupyter.widget'
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.HTMLMathModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.HTMLModel
Alia for
HTMLModel
, which can render maths.- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.HTMLModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
A label ipywidget which displays HTML.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.ImageModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
A ipywidget which displays an image.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.IntOptionsMixin
Bases:
object
A mixin for ipywidgets which accept a range of integer values.
- class euporie.core.comm.ipywidgets.IntProgressModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IntOptionsMixin
,euporie.core.comm.ipywidgets.ProgressIpyWidgetComm
A progress bar ipywidget that accepts integer values.
- normalize(x: Any) int | None
Enure the selected value is within the permitted range and is a integer.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.IntRangeSliderModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IntOptionsMixin
,euporie.core.comm.ipywidgets.RangeSliderIpyWidgetComm
A slider ipywidget that accepts a range of integer values.
- normalize(x: Any) int | None
Enure the selected value is within the permitted range and is a integer.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- set_value(slider: Slider, values: Any) None
Any float value is permitted - we might need to add an option.
- target_name = 'jupyter.widget'
- update_value(slider: SelectableWidget) None
Send a
comm_message
updating the values when they change.
- class euporie.core.comm.ipywidgets.IntSliderModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IntOptionsMixin
,euporie.core.comm.ipywidgets.SliderIpyWidgetComm
A slider ipywidget that accepts a single integer value.
- normalize(x: Any) int | None
Enure the selected value is within the permitted range and is a integer.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- set_value(slider: Slider, value: Any) None
Set the selected index when the ipywidget’s selected value changes.
- target_name = 'jupyter.widget'
- update_value(container: SelectableWidget) None
Send a
comm_message
updating the value when it changes.
- class euporie.core.comm.ipywidgets.IntTextModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IntOptionsMixin
,euporie.core.comm.ipywidgets.NumberTextBoxIpyWidgetComm
An integer textbox ipwidget.
- decr(button: euporie.core.widgets.forms.Button) None
Decrement the widget’s value by one step.
- default_rows = 1
- incr(button: euporie.core.widgets.forms.Button) None
Increment the widget’s value by one step.
- multiline = False
- normalize(x: Any) int | None
Enure the selected value is within the permitted range and is a integer.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.IpyWidgetComm(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.base.Comm
A Comm object which represents ipython widgets.
- abstract create_view(parent: OutputParent) CommView
Abstract method for creating a view of the ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- class euporie.core.comm.ipywidgets.LabelModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
A label ipwidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.LayoutIpyWidgetComm(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
Base class for layout widgets with children.
- abstract create_view(parent: OutputParent) CommView
Abstract method for creating a view of the ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- render_children(models: list[str], parent: OutputParent) list[AnyContainer]
Create views for the child Comms in the layout.
- target_name = 'jupyter.widget'
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.NumberTextBoxIpyWidgetComm(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.TextBoxIpyWidgetComm
Base class for text-box ipywidgets with numerical values.
- decr(button: euporie.core.widgets.forms.Button) None
Decrement the widget’s value by one step.
- default_rows = 1
- incr(button: euporie.core.widgets.forms.Button) None
Increment the widget’s value by one step.
- multiline = False
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- update_value(buffer: Buffer) None
Set the selected index when the ipywidget’s entered value changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.OutputModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
An Output ipywidget.
- model_name = 'OutputModel'
- process_data(data: dict, buffers: Sequence[bytes]) None
Modify the callbacks of a given message to add outputs to this ipywidget.
- target_name = 'jupyter.widget'
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.ProgressIpyWidgetComm(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
The base class for progress bar ipywidgets.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.RadioButtonsModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.SelectableIpyWidgetComm
An ipywidget allowing an item to be selected using radio buttons.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- update_index(container: SelectableWidget) None
Send a
comm_message
updating the selected index when it changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.RangeSliderIpyWidgetComm(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.SliderIpyWidgetComm
Base class for range slider ipywidgets.
- normalize(x: Any) Any
Convert the internal widget’s value to one compatible with the ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- set_value(slider: Slider, values: Any) None
Any float value is permitted - we might need to add an option.
- target_name = 'jupyter.widget'
- update_value(slider: SelectableWidget) None
Send a
comm_message
updating the values when they change.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.SelectModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.SelectableIpyWidgetComm
An ipywidget allowing a value to be selected from a list of options.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- update_index(container: SelectableWidget) None
Send a
comm_message
updating the selected index when it changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.SelectMultipleModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
An ipywidget allowing one or more value to be selected from a list of options.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- update_index(container: SelectableWidget) None
Send a
comm_message
updating the selected index when it changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.SelectableIpyWidgetComm(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
Base class for selectable ipywidgets.
- abstract create_view(parent: OutputParent) CommView
Abstract method for creating a view of the ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- update_index(container: SelectableWidget) None
Send a
comm_message
updating the selected index when it changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.SelectionRangeSliderModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.SliderIpyWidgetComm
A slider ipywidget where one or more of a list of options can be selected.
- normalize(x: Any) Any
Convert the internal widget’s value to one compatible with the ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- set_value(slider: euporie.core.widgets.forms.Slider, indices: tuple[int, int]) None
Set the selected indices on the selection slider when the value changes.
- target_name = 'jupyter.widget'
- update_value(slider: SelectableWidget) None
Send a
comm_message
updating the selected indices when they change.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.SelectionSliderModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.SliderIpyWidgetComm
A slider ipywidget where one of a list of options can be selected.
- normalize(x: Any) Any
Convert the internal widget’s value to one compatible with the ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- set_value(slider: euporie.core.widgets.forms.Slider, index: int) None
Set the selected index on the selection slider when the value changes.
- target_name = 'jupyter.widget'
- update_value(slider: SelectableWidget) None
Send a
comm_message
updating the selected index when it changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.SliderIpyWidgetComm(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
Base class for slider ipywidgets.
- normalize(x: Any) Any
Convert the internal widget’s value to one compatible with the ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- set_value(slider: Slider, value: Any) None
Set the selected index when the ipywidget’s selected value changes.
- target_name = 'jupyter.widget'
- update_value(container: SelectableWidget) None
Send a
comm_message
updating the value when it changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.TabModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.LayoutIpyWidgetComm
A tabbed layout ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- render_children(models: list[str], parent: OutputParent) list[AnyContainer]
Create views for the child Comms in the layout.
- target_name = 'jupyter.widget'
- update_index(container: StackedSplit) None
Send a
comm_message
updating the selected index when it changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.TextBoxIpyWidgetComm(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
A mixin for ipywidgets which use text-box entry.
- default_rows = 1
- multiline = False
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- update_value(buffer: Buffer) None
Set the selected index when the ipywidget’s entered value changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.TextModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.TextBoxIpyWidgetComm
A text input widget.
- default_rows = 1
- multiline = False
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- update_value(buffer: Buffer) None
Set the selected index when the ipywidget’s entered value changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.TextareaModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.TextBoxIpyWidgetComm
A text input widget.
- default_rows = 3
- multiline = True
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- update_value(buffer: Buffer) None
Set the selected index when the ipywidget’s entered value changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.ToggleButtonModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.ToggleableIpyWidgetComm
A toggleable button ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- value_changed(button: ToggleableWidget) None
Send a
comm_message
updating the value when it changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.ToggleButtonsModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
An ipywidget where a single value can be selected using togglable buttons.
- get_label(index: int) AnyFormattedText
Return the label for each toggle button (optionally including the icon).
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- set_options(buttons: euporie.core.widgets.forms.ToggleButtons) None
Set the list of selectable options in the toggle buttons.
- target_name = 'jupyter.widget'
- update_index(container: SelectableWidget) None
Set the selected index be sending a comm update message.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.ToggleableIpyWidgetComm(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
Base class for toggleable ipywidgets.
- abstract create_view(parent: OutputParent) CommView
Abstract method for creating a view of the ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- value_changed(button: ToggleableWidget) None
Send a
comm_message
updating the value when it changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.UnimplementedModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.IpyWidgetComm
An ipywidget used to represent unimplemented widgets.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.VBoxModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.BoxModel
A vertical layout ipywidget.
- Split
- padding = 0
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- render_children(models: list[str], parent: OutputParent) list[AnyContainer]
Create views for the child Comms in the layout.
- target_name = 'jupyter.widget'
- views: WeakKeyDictionary[CommView, OutputParent]
- class euporie.core.comm.ipywidgets.ValidModel(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes])
Bases:
euporie.core.comm.ipywidgets.ToggleableIpyWidgetComm
A validity indicator ipywidget.
- process_data(data: dict, buffers: Sequence[bytes]) None
Handle incoming Comm update messages, updating the state and views.
- target_name = 'jupyter.widget'
- value_changed(button: ToggleableWidget) None
Send a
comm_message
updating the value when it changes.
- views: WeakKeyDictionary[CommView, OutputParent]
- euporie.core.comm.ipywidgets.open_comm_ipywidgets(comm_container: KernelTab, comm_id: str, data: dict, buffers: Sequence[bytes]) IpyWidgetComm
Create a new Comm for an
ipywidgets
widget.The relevant widget model is selected based on the model name given in the
comm_open
message data.- Parameters
comm_container – The notebook this Comm belongs to
comm_id – The ID of the Comm
data – The data field from the
comm_open
messagebuffers – The buffers field from the
comm_open
message
- Returns
The initialized widget Comm object.