frame_cli.downloaders.git module¶
Module containing the GitDownloader class.
- class frame_cli.downloaders.git.GitDownloader[source]¶
Bases:
Downloader
Downloader for Git repositories.
- _abc_impl = <_abc._abc_data object>¶
- download(url: str, *args, destination: str | None = None, branch: str | None = None, **kwargs) str [source]¶
Download the content at the given URL (https or git protocol).
- Parameters:
url (str) – URL of the content to download.
destination (str) – Destination directory to save the content to. Defaults to None, which infers the destination from the URL (repository name).
branch (str) – Branch to checkout after cloning. Defaults to None, which checks out the default branch.
- Returns:
The destination directory.
- Return type:
str
- Raises:
GitCommandError – The Git command failed.