get_download_size#
- brainglobe_atlasapi.utils.get_download_size(url: str) int [source]#
Get file size based on the MB value on the “src” page of each atlas.
- Parameters:
url (str) – atlas file url (in a repo, make sure the “raw” url is passed)
- Returns:
size of the file to download
- Return type:
int
- Raises:
requests.exceptions.HTTPError – If there’s an issue with HTTP request.:
ValueError – If the file size cannot be extracted from the response.:
IndexError – If the url is not formatted as expected: