Skip to content

context_managers

Context manager classes/functions.

These context managers can be used as with statements to provide a handler for a task. For example, the SimpleSpinner class in red_utils.ext.context_managers.cli_spinners adds a CLI spinner to a function running within a with SimpleSpinner() statement:

SimpleSpinner() context managers
with SimpleSpinner("Demo spinner... "):
    time.sleep(15)