Skip to content

bucket_download_folder

jaybgager edited this page Sep 25, 2026 · 1 revision

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 folder from a cloudfiles-managed S3-style bucket.

Arguments:

  • bucket_path (string, mandatory)
    • the absolute path to the folder on the bucket you want to download
  • download_path (string, optional, default=None)
    • allows you to specify a manual save location
    • value of None attempts to save in default Downloads folder if one exists

Examples

Default Usage

This will save the bucket folder in your default Downloads folder if one exists, making the final local directory path read /home/username/Downloads/bucket_folder (or C:\Users\username\Downloads\bucket_folder on Windows).

INPUT:

import tracertools as tt

tt.bucket_download_folder(
    bucket_path = "bucket://path/to/bucket_folder",
)

Manually Specify A Download Path

This will save bucket_folder in the local_folder directory instead, making the final local directory path read /home/username/local_folder/bucket_folder.

INPUT:

import tracertools as tt

tt.bucket_download_file(
    bucket_path = "bucket://path/to/bucket_folder",
    download_path = "/home/username/local_folder",
)

Clone this wiki locally