exegol.console package

Subpackages

Submodules

exegol.console.ConsoleFormat module

exegol.console.ConsoleFormat.boolFormatter(val: bool) str

Generic text formatter for bool value

exegol.console.ConsoleFormat.getColor(val: Union[bool, int, str]) Tuple[str, str]

Generic text color getter for bool value

exegol.console.ExegolProgress module

class exegol.console.ExegolProgress.ExegolProgress(*columns: Union[str, rich.progress.ProgressColumn], console: Optional[rich.console.Console] = None, auto_refresh: bool = True, refresh_per_second: float = 10, speed_estimate_period: float = 30.0, transient: bool = False, redirect_stdout: bool = True, redirect_stderr: bool = True, get_time: Optional[Callable[[], float]] = None, disable: bool = False, expand: bool = False)

Bases: rich.progress.Progress

Addition of a practical function to Rich Progress

getTask(task_id: TaskID) rich.progress.Task

Return a specific task from task_id without error

exegol.console.ExegolPrompt module

exegol.console.ExegolPrompt.Confirm(question: str, default: bool) bool

Quick function to format rich Confirmation and options on every exegol interaction

exegol.console.LayerTextColumn module

class exegol.console.LayerTextColumn.LayerTextColumn(text_format: str, layer_key: str, style: Union[str, Style] = 'none', justify: typing_extensions.Literal[default, left, center, right, full] = 'left', markup: bool = True, highlighter: Optional[rich.highlighter.Highlighter] = None, table_column: Optional[rich.table.Column] = None, binary_units: bool = False)

Bases: rich.progress.TextColumn, rich.progress.DownloadColumn

Merging two Rich class to obtain a double behavior in the same RichTable

render(task: rich.progress.Task) rich.text.Text

Custom render depending on the existence of data with data_key

exegol.console.TUI module

class exegol.console.TUI.ExegolTUI

Bases: object

Class gathering different methods of Terminal User Interface (or TUI)

static buildDockerImage(build_stream: Generator)

Rich interface for docker image building from SDK stream

static downloadDockerLayer(stream: Generator, quick_exit: bool = False)

Rich interface for docker image layer download from SDK stream

classmethod multipleSelectFromTable(data: Sequence[exegol.model.SelectableInterface.SelectableInterface], object_type: Optional[Type] = None, default: Optional[str] = None) Sequence[exegol.model.SelectableInterface.SelectableInterface]

Return a list of object (implementing SelectableInterface) selected by the user Raise IndexError of the data list is empty.

classmethod printContainerRecap(container: exegol.model.ExegolContainerTemplate.ExegolContainerTemplate)
static printTable(data: Union[Sequence[exegol.model.SelectableInterface.SelectableInterface], Sequence[str], Sequence[Dict[str, str]]], title: Optional[str] = None)

Printing Rich table for a list of object

classmethod selectFromList(data: Union[Dict[str, str], List[str]], subject: str = 'an option', title: str = 'Options', default: Optional[str] = None) Union[str, Tuple[str, str]]

if data is list(str): Return a string selected by the user if data is dict: list keys and return a tuple of the selected key corresponding value Raise IndexError of the data list is empty.

classmethod selectFromTable(data: Sequence[exegol.model.SelectableInterface.SelectableInterface], object_type: Optional[Type] = None, default: Optional[str] = None, allow_None: bool = False) Union[exegol.model.SelectableInterface.SelectableInterface, str]

Return an object (implementing SelectableInterface) selected by the user Return a str when allow_none is true and no object have been selected Raise IndexError of the data list is empty.

Module contents