ultrasound_metrics.data.downloads#
General utilities for downloading and caching files with integrity verification.
This module provides: - Efficient file hashing compatible with Python 3.9+ (backport of hashlib.file_digest) - Robust file downloading with progress bars and integrity verification - Smart caching with automatic re-download on corruption - Support for multiple hash algorithms (SHA1, SHA256, MD5, etc.)
Key Functions: - file_digest(): Python 3.11+ compatible file hashing for older Python versions - cached_download(): Download and cache files with integrity verification - verify_file_integrity(): Verify file integrity using various hash algorithms
Optional dependencies: - tqdm: For progress bars during downloads