faust.utils.terminal.spinners
Terminal progress bar spinners.
-
class
faust.utils.terminal.spinners.Spinner(file: IO = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>) → None[source]
Progress bar spinner.
-
bell = '\x08'
-
sprites = ['◢', '◣', '◤', '◥']
-
cursor_hide = '\x1b[?25l'
-
cursor_show = '\x1b[?25h'
-
hide_cursor = True
-
stopped = False
-
update() → None[source]
Draw spinner, single iteration.
- Return type
None
-
stop() → None[source]
Stop spinner from being emitted.
- Return type
None
-
reset() → None[source]
Reset state or allow restart.
- Return type
None
-
write(s: str) → None[source]
Write spinner character to terminal.
- Return type
None
-
begin() → None[source]
Prepare terminal for spinner starting.
- Return type
None
-
finish() → None[source]
Finish spinner and reset terminal.
- Return type
None
-
class
faust.utils.terminal.spinners.SpinnerHandler(spinner: faust.utils.terminal.spinners.Spinner, **kwargs: Any) → None[source]
A logger handler that iterates our progress spinner for each log.
-
emit(_record: logging.LogRecord) → None[source]
Emit the next spinner character.
- Return type
None