TransferObject

class jetstream.helper.TransferObject(api, destinationId, transferId)
Parameters:
  • api – A Jetstream API interface, as constructed from api(). This must be a connected and authenticated API for the server that is sending the transfer.
  • destinationId – The DestinationId (as returned from createDestination()) to which the transfer is being sent.
  • transferId – The TransferId (as returned from createTransfer()) for the transfer.

Method Summary

getProgress Returns a percentage (0 - 100) representing the current progress for the transfer.
getRawStats Returns a Transfer Structure containing the full description for the transfer.
getStatus Returns a string describing the current status for the transfer.

Method Documentation

TransferObject.getProgress()

Returns a percentage (0 - 100) representing the current progress for the transfer.

This value alone does not necessarily reflect whether the transfer has finished, or has failed. Compare getStatus().

Returns:A percentage (0.0 - 100.0) representing the current progress for the transfer.
Return type:float
TransferObject.getRawStats()

Returns a Transfer Structure containing the full description for the transfer.

Returns:Transfer Structure containing the full description for the transfer.
Return type:dict
TransferObject.getStatus()

Returns a string describing the current status for the transfer. This string represents the “status”, extracted from the Transfer Structure. Compare getRawStats().

The status “complete” indicates that the transfer has finished successfully.

The status “error” indicates that the transfer has failed. Use getRawStats() to retrieve the full Transfer Structure. Its errorMessage will describe the cause of the error.

Other strings may be used to represent the progression of the transfer.

Returns:A string describing the current status for the transfer.
Return type:string