Download
Download a file from a node to your local machine
Signature
def download(node_id: str, remote_path: str, local_path: str) -> DownloadResponseParameters
node_id(str) – target noderemote_path(str) – path of the file on the nodelocal_path(str) – local path where the file should be saved
Path Handling
All files that were placed using the upload function will be defaulted to the /home/ubuntu/Desktop/MY_FILES directory.
If you specified a destination_path when using the upload function, it would have been adjusted to be prefixed by /home/ubuntu.
For more details on this, visit the Path Handling section of upload guide.
Returns
DownloadResponse object with:
status(str) – operation statusremote_path(str) – path on the node that was downloaded fromlocal_path(str) – local path where file was saved
Example
result = client.download(
node_id,
remote_path="/home/ubuntu/Desktop/MY_FILES/output.txt",
local_path="./output.txt"
)
print(f"File downloaded to: {result.local_path}")Exceptions
MissingCredentialsExceptionFileToDownloadNotFoundExceptionInternalServerErrorException