fiftyone.utils.aws#
Utilities for working with Amazon Web Services <https://aws.amazon.com>.
Functions:
|
Download files from a public AWS S3 bucket using unsigned URLs. |
- fiftyone.utils.aws.download_public_s3_files(urls, download_dir=None, num_workers=None, overwrite=True)#
Download files from a public AWS S3 bucket using unsigned URLs.
The
urlargument either accepts:A list of paths to objects in the s3 bucket:
urls = ["s3://bucket_name/dir1/file1.ext", ...]
When
urlsis a list, then thedownload_dirargument is required and all objects will be downloaded into that directoryA dictionary mapping the paths of objects to files on disk to store each object:
urls = { "s3://bucket_name/dir1/file1.ext": "/path/to/local/file1.ext", ... }
- Parameters:
urls – either a list of URLs to objects in an s3 bucket, or a dict mapping these URLs to locations on disk. If
urlsis a list, then thedownload_dirargument is requireddownload_dir (None) – the directory to store all downloaded objects. This is only used if
urlsis a listnum_workers (None) – a suggested number of threads to use when downloading files
overwrite (True) – whether to overwrite existing files