mash.ui package#

Submodules#

mash.ui.console module#

class mash.ui.console.ProgressLogger#

Bases: object

log_message(text: str)#

Log a message to the UI.

Parameters:

text (str) – The message to log.

start()#

Start the UI elements, call before starting any work.

stop()#

Stop the UI elements, call after work is done.

update_progress(percentage: float)#

Call this to update the progress bar.

Parameters:

percentage (float) – The percentage of the task completed.

mash.ui.logs module#

mash.ui.logs.redirected_stdout_to_loguru()#

Convenience context manager to redirect stdout and stderr to loguru logger.

Useful for capturing output from external libraries that write to stdout or stderr.

Module contents#