Expand description
Utility functions shared across CLI commands.
This module provides common helper functions used by various CLI commands, including formatting, validation, and retry logic.
Functionsยง
- calculate_
percentage - Calculate percentage safely (handles division by zero).
- display_
log_ line - Display a log line with optional level filtering.
- format_
bytes - Format byte size into human-readable string.
- format_
count - Format a count with thousands separators.
- format_
duration - Format duration into human-readable string.
- format_
relative_ time - Format a timestamp into a human-readable relative time.
- format_
task_ stats_ csv - Format task statistics as CSV rows
- mask_
password - Mask password in connection URLs for safe display.
- print_
progress - Display a simple progress indicator.
- print_
task_ details - Print task details in a formatted table.
- retry_
with_ backoff - Retry an async operation with exponential backoff.
- send_
webhook_ alert - Send alert via webhook.
- truncate_
string - Truncate a string to a maximum length with ellipsis.
- validate_
broker_ url - Validate and normalize broker URL.
- validate_
queue_ name - Validate queue name.
- validate_
task_ id - Validate task ID format (UUID).
- write_
csv - Write data to CSV file