hfutils.entry.download
This module provides functionality for downloading data from HuggingFace repositories.
It includes a CLI command for downloading files, archives, or directories from HuggingFace, with various options for customization. The module also defines custom exceptions and utility functions to support the download process.
- Usage:
This module is typically used as part of a larger CLI application for interacting with HuggingFace repositories.
NoRemotePathAssignedWithDownload
- class hfutils.entry.download.NoRemotePathAssignedWithDownload(message: str)[source]
Custom exception class for indicating that no remote path in the repository is assigned.
This exception is raised when a download is attempted without specifying a file, archive, or directory to download from the repository.
- Attribute exit_code:
The exit code to be used when this exception is raised.
- exit_code = 17
The exit code for this exception.
- show(file: IO | None = None) None
Display the error message in red.
- Parameters:
file (Optional[IO]) – File to write the output to.