Download Files with CLI

Using the SDK command-line interface, you can download files from a deepset Cloud workspace to your local machine.

Prerequisites

  1. Install the SDK
  2. Generate an API Key to connect to a deepset Cloud workspace.

Download Files

  1. Pass your API key and the name of the deepset Cloud 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 Cloud API key and workspace name
    deepset-cloud login
    
    # This command prompts you to pass the deepset Cloud API key and workspace name
    python3 -m deepset_cloud_sdk.cli login
    
  2. 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>
    
    python3 -m deepset_cloud_sdk.cli 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 the hotels directory:

    deepset_cloud download --file-dir "./hotels" --odata-filter "Hotel_Address eq 'Amsterdam Netherlands'"
    
    python3 -m deepset_cloud_sdk.cli 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 Cloud:

    deepset-cloud download --file-dir "./hotels" --api-key <API_KEY> --workspace-name hotels --name "westcord_art_hotel_amsterdam_4_stars"
    
    python3 -m deepset_cloud_sdk.cli 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
    
    python3 -m deepset_cloud_sdk.cli download ---no-include-meta
    

Related Links