(key: str, dest_path: pathlib.Path, local_name=None)
| 360 | |
| 361 | |
| 362 | def download_entry(key: str, dest_path: pathlib.Path, local_name=None) -> pathlib.Path: |
| 363 | entry = DOWNLOADS[key] |
| 364 | url = entry["url"] |
| 365 | size = entry["size"] |
| 366 | sha256 = entry["sha256"] |
| 367 | |
| 368 | assert isinstance(url, str) |
| 369 | assert isinstance(size, int) |
| 370 | assert isinstance(sha256, str) |
| 371 | |
| 372 | local_path = dest_path / (local_name or url[url.rindex("/") + 1 :]) |
| 373 | download_to_path(url, local_path, size, sha256) |
| 374 | |
| 375 | return local_path |
| 376 | |
| 377 | |
| 378 | def create_tar_from_directory(fh, base_path: pathlib.Path, path_prefix=None): |
no test coverage detected