euporie.notebook.tabs.json

Contain a tab for displaying JSON data.

Functions

run_in_thread_with_context(func, *args[, daemon])

Run a function in an thread, but make sure it uses the same contextvars.

Classes

Dimension([min, max, weight, preferred])

Specified dimension (width/height) of a user control or window.

JsonTab(app[, path])

Tab class for JSON data.

JsonView(data[, title, expanded])

A JSON-view container.

Tab(app[, path])

Base class for interface tabs.

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

Several layouts, one stacked left/right of the other. ::.

class euporie.notebook.tabs.json.JsonTab(app: BaseApp, path: Path | None = None)

Bases: euporie.core.tabs.base.Tab

Tab class for JSON data.

close(cb: Callable | None = None) None

Close a tab with a callback.

Parameters

cb – A function to call after the tab is closed.

container: AnyContainer
file_extensions: set[str] = {}
filte_types = {'.json'}
focus() None

Focus the tab (or make it visible).

load_container() AnyContainer

Abcract method for loading the notebook’s main container.

mime_types: set[str] = {'*json'}
name: str | None = 'JSON Viewer'
reset() None

Reet the state of the tab.

save(path: Path | None = None, cb: Callable | None = None) None

Save the current notebook.

property title: str

Return the tab title.

weight: int = 0