storage_utils

Utility class for storage-related operations.

class human_protocol_sdk.storage.storage_utils.StorageUtils

Bases: object

Utility class for storage-related operations.

static download_file_from_url(url)

Downloads a file from the specified URL.

  • Parameters: url (str) – The URL of the file to download.

  • Return type: bytes

  • Returns: The content of the downloaded file.

  • Raises: StorageClientError – If an error occurs while downloading the file.

  • Example:

    from human_protocol_sdk.storage import StorageClient
    
    result = StorageClient.download_file_from_url(
        "https://www.example.com/file.txt"
    )

Last updated