bucket_download_file - jaybgager/tracertools GitHub Wiki
[!NOTE] If this function is used on a Windows machine, any files that contain colons
:in their filenames will have them converted to triple-underscores___. This is because the Windows OS forbids the practice of including colons in filenames, as they're reserved for Drive names (e.g.C:\). This is a common issue with legacy-format neuroglancer volumes containing single-resolution unsharded meshes, which require several files to have colons in their names in order to function properly.
Downloads a file from a cloudfiles-managed S3-style bucket.
Arguments:
bucket_path(string, mandatory)- the absolute path to the file on the bucket you want to download
download_path(string, optional, default=None)- allows you to specify a manual save location
- value of
Noneattempts to save in defaultDownloadsfolder if one exists
Examples
Default Usage
This will save the file in your default Downloads folder if one exists.
INPUT:
import tracertools as tt
tt.bucket_download_file(
bucket_path = "bucket://path/to/file",
)
Manually Specify A Download Path
This will save the file in the example_folder directory instead.
INPUT:
import tracertools as tt
tt.bucket_download_file(
bucket_path = "bucket://path/to/file",
download_path = "/home/username/example_folder",
)