euporie.core.widgets.cell_outputs

Contain a container for the cell output area.

Functions

abstractmethod(funcobj)

A decorator indicating abstract methods.

add_setting(name, default, help_, description)

Register a new config item.

find_route(from_, to)

Find the shortest conversion path between two formats.

get_app()

Get the current active (running) Application.

to_container(container)

Monkey-patch to_container to collect container status functions.

Classes

ABCMeta(name, bases, namespace, /, **kwargs)

Metaclass for defining Abstract Base Classes (ABCs).

Box(body[, padding, padding_left, ...])

Add padding around a container.

CellOutput(json, parent)

Represent a single cell output.

CellOutputArea(json, parent[, style])

An area below a cell where one or more cell outputs can be shown.

CellOutputDataElement(mime, data, metadata, ...)

A cell output element which display data.

CellOutputElement(mime, data, metadata, parent)

Base class for the various types of cell outputs (display data or widgets).

CellOutputJsonElement(mime, data, metadata, ...)

A cell output element which displays JSON.

CellOutputWidgetElement(mime, data, ...)

A cell output element which displays ipywidgets.

Datum(data, *args, **kwargs)

Class for storing and converting display data.

Display(datum[, height, width, focusable, ...])

Rich output displays.

DynamicContainer(get_container)

Container class that dynamically returns any Container.

HSplit(children[, window_too_small, align, ...])

Several layouts, one stacked above/under the other.

JsonView(data[, title, expanded])

A JSON-view container.

PurePath(*args, **kwargs)

Base class for manipulating paths without I/O.

SimpleCache([maxsize])

Very simple cache that discards the oldest item when the cache size is exceeded.

class euporie.core.widgets.cell_outputs.CellOutput(json: dict[str, Any], parent: OutputParent | None)

Bases: object

Represent a single cell output.

Capable of displaying multiple mime representations of the same data.

TODO - allow the visible mime-type to be rotated.

property data: dict[str, Any]

Return dictionary of mime types and data for this output.

This generates similarly structured data objects for markdown cells and text output streams.

Returns:

JSON dictionary mapping mimes type to representation data.

property element: CellOutputElement

Get the element for the currently selected mime type.

get_element(mime: str) CellOutputElement

Return the currently displayed cell element.

make_element(mime: str) CellOutputElement

Create a container for the cell output mime-type if it doesn’t exist.

Parameters:

mime – The mime-type for which to create an output element

Returns:

A OutputElement container for the currently selected mime-type.

scroll_left() None

Scroll the currently visible output left.

scroll_right() None

Scroll the currently visible output right.

property selected_mime: str

Return the selected mime-type, selecting the first by default.

update() None

Update the output by updating all child containers.

class euporie.core.widgets.cell_outputs.CellOutputArea(json: list[dict[str, Any]], parent: OutputParent | None, style: str = '')

Bases: object

An area below a cell where one or more cell outputs can be shown.

add_output(output_json: dict[str, Any], refresh: bool = True) None

Add a new output to the output area.

property json: Any

Return the control’s display data.

output_cache: SimpleCache[str, CellOutput] = <prompt_toolkit.cache.SimpleCache object>
reset() None

Clear all outputs from the output area.

scroll_left() None

Scroll the outputs left.

scroll_right() None

Scroll the outputs right.

to_plain_text() str

Convert the contents of the output to plain text.

update() None

Update all existing outputs.

class euporie.core.widgets.cell_outputs.CellOutputDataElement(mime: str, data: Any, metadata: dict, parent: OutputParent | None)

Bases: CellOutputElement

A cell output element which display data.

property data: Any

Return the control’s display data.

scroll_left() None

Scroll the output left.

scroll_right() None

Scroll the output right.

class euporie.core.widgets.cell_outputs.CellOutputElement(mime: str, data: Any, metadata: dict, parent: OutputParent | None)

Bases: object

Base class for the various types of cell outputs (display data or widgets).

data: Any
scroll_left() None

Scroll the output left.

scroll_right() None

Scroll the output right.

class euporie.core.widgets.cell_outputs.CellOutputJsonElement(mime: str, data: dict[str, Any], metadata: dict, parent: OutputParent | None)

Bases: CellOutputElement

A cell output element which displays JSON.

data: Any
scroll_left() None

Scroll the output left.

scroll_right() None

Scroll the output right.

class euporie.core.widgets.cell_outputs.CellOutputWidgetElement(mime: str, data: dict[str, Any], metadata: dict, parent: OutputParent | None)

Bases: CellOutputElement

A cell output element which displays ipywidgets.

data: Any
scroll_left() None

Scroll the output left.

scroll_right() None

Scroll the output right.