Upload.download
Upload.download(path=os.cwd(), *, format='csv', overwrite=False, progress=True, max_parallelization=None, max_concurrency=None) → list(str)
Downloads the upload in a given format to the path specified, as one or more files. Returns a list of strings representing the absolute file path of all downloaded files. Uploads can only be exported from unreleased versions.
Parameters:
path : str
The path at which to download the upload. Will automatically create any directories if they don't exist. If not specified, path defaults to the current working directory.
Some exports (avro and parquet) of larger uploads can contain multiple files. The downloaded file paths will vary based on the following rules:
If the export has one file, and
pathis a file (either existing, or ends with an extension), the export will be saved aspath.If the export has one file, and
pathis a directory, the export will be saved within the directory as{table_name}.{format}If the export has multiple files, and
pathis a file (either existing, or ends with an extension), an exception will be raised.If the export has multiple files, and
pathis a directory, a subdirectory (based on the upload name) will be created and the individual files will be stored within that directory.
format : str, default 'csv'
The format of the downloaded file(s). Must be one of csv, parquet, avro, ndjson, sav, sas7bdat, dta
overwrite : bool, default False
Whether to overwrite any existing files when downloading. If False, will throw an error if a file with the same name already exists at the provided path.
progress : bool, default True
Whether to show progress bar.
max_parallelization : int, default None
The maximum number of threads to use to download files. If unset (recommended), will be determined dynamically based on the number of files, their size, and available cores on your machine.
max_concurrency : int, default None
The maximum total concurrency when downloading files. Should be higher than max_parallelization, as multiple files are downloaded concurrently per thread. If unset (recommended), will be determined dynamically based on the number of files, their size, and available cores on your machine.
Returns:
list<str>
A list of strings represent the absolute paths of the downloaded files.
Last updated
Was this helpful?

