Human Protocol SDK
v3.0.7
v3.0.7
  • Typescript SDK
    • Encryption
      • Encryption
      • EncryptionUtils
    • Escrow
      • EscrowClient
      • EscrowUtils
    • KVStore
      • KVStoreClient
      • KVStoreUtils
    • Staking
      • StakingClient
    • Operator
      • OperatorUtils
    • Storage
      • StorageClient
    • Statistics
      • StatisticsClient
    • Transaction
      • TransactionUtils
  • Python SDK
    • agreement
      • bootstrap
      • measures
      • utils
    • encryption
      • encryption
      • legacy_encryption
      • encryption_utils
    • escrow
      • escrow_client
      • escrow_utils
    • kvstore
      • kvstore_client
      • kvstore_utils
    • staking
      • staking_client
      • staking_utils
    • operator
      • operator_utils
    • statistics
      • statistics_client
    • storage
      • storage_client
      • storage_utils
    • transaction
      • transaction_utils
    • constants
    • filter
    • utils
  • CHANGELOG
Powered by GitBook
On this page
  1. Python SDK
  2. storage

storage_utils

Last updated 5 months ago

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: – 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"
    )
StorageClientError