Expand description
Utility functions for dynamic-cli
This module provides common utility functions used across the framework, including type conversion, string validation, path manipulation, and formatting helpers.
§Sections
- Formatting and Display - Format lists, tables, sizes, durations
- String Validation - Check and normalize strings
- Type Conversion - Parse values with context
- Path Manipulation - Normalize and check paths
- Test Helpers - Common test utilities
Functions§
- detect_
type - Detect argument type from string value
- format_
bytes - Format bytes as human-readable size
- format_
duration - Format duration in human-readable form
- format_
numbered_ list - Format a list with numbers
- format_
table - Format a simple table with headers and rows
- get_
extension - Get file extension in lowercase
- has_
extension - Check if path has any of the given extensions
- is_
blank - Check if string is empty or only whitespace
- is_
valid_ email - Check if string looks like an email (basic validation)
- normalize
- Normalize a string (trim and lowercase)
- normalize_
path - Normalize path separators (cross-platform)
- parse_
bool - Parse string to bool
- parse_
float - Parse string to float with context
- parse_
int - Parse string to integer with context
- truncate
- Truncate string to max length with ellipsis