Download Files with CLI
Using the SDK command-line interface, you can download files from a deepset workspace to your local machine.
Prerequisites
- Install the SDK
- Generate an API Key to connect to a deepset workspace.
Download Files
- Pass your API key and the name of the deepset workspace where you want to upload the files. (You can also skip this step and just pass your API key and workspace in the
download
command.)# This command prompts you to pass the deepset API key and workspace name deepset-cloud login
- Run the following command to download the files. This command downloads all files from the workspace to a folder you specify:
deepset-cloud download --file-dir <path_to_download_folder>
The files are downloaded to the folder you specified, including all metadata.
Examples
-
This command uses an odata filter to narrow down the files downloaded. In this case, it downloads files with the following metadata:
{"Hotel_Address": "Amsterdam Netherlands"}
to thehotels
directory:deepset-cloud download --file-dir "./hotels" --odata-filter "Hotel_Address eq 'Amsterdam Netherlands'"
-
This command downloads files whose names contain the string
westcord_art_hotel_amsterdam_4_stars
from the "hotels" workspace. It also includes the API key to connect to deepset AI Platform:deepset-cloud download --file-dir "./hotels" --api-key <API_KEY> --workspace-name hotels --name "westcord_art_hotel_amsterdam_4_stars"
-
This command downloads files to the current directory without their metadata:
deepset-cloud download ---no-include-meta
Updated 10 days ago
Related Links