Functions
cli_progress
Context manager for simple progress feedback in CLI commands.
cli_progress
def cli_progress(description: str, total: int | None = None, cli: CLIOutput | None = None, enabled: bool = True) -> Iterator[Callable[..., None]]
Context manager for simple progress feedback in CLI commands.
Parameters 4
| Name | Type | Default | Description |
|---|---|---|---|
description |
str |
— | Description text for the progress task |
total |
int | None |
None |
Total number of items (None for indeterminate) |
cli |
CLIOutput | None |
None |
Optional CLIOutput instance (creates new if not provided) |
enabled |
bool |
True |
Whether to show progress (auto-disabled for quiet/non-TTY) |
Returns
Iterator[Callable[..., None]]
simple_progress
Simple progress wrapper for iterating over items.
simple_progress
def simple_progress(description: str, items: list[str] | Iterator[str], cli: CLIOutput | None = None, enabled: bool = True) -> Iterator[str]
Simple progress wrapper for iterating over items.
Parameters 4
| Name | Type | Default | Description |
|---|---|---|---|
description |
str |
— | Description text for the progress task |
items |
list[str] | Iterator[str] |
— | List or iterator of items to process |
cli |
CLIOutput | None |
None |
Optional CLIOutput instance (creates new if not provided) |
enabled |
bool |
True |
Whether to show progress |
Returns
Iterator[str]