/  Python Yamcs Client  /  File Transfer  /  Client

Client

class yamcs.client.FileTransferClient(ctx: Context, instance: str)

Client for working with file transfers (e.g. CFDP) managed by Yamcs.

get_service(name: str) FileTransferService

Get a specific File Transfer service.

Parameters:

name – The service name.

list_services() Iterable[FileTransferService]

List the services.

class yamcs.client.FileTransferServiceClient(ctx: Context, proto)
cancel_transfer(id: str) None
create_filelist_subscription(on_data: Optional[Callable[[RemoteFileListing], None]] = None, timeout: float = 60) FileListSubscription
create_transfer_subscription(on_data: Optional[Callable[[Transfer], None]] = None, timeout: float = 60) TransferSubscription
download(bucket_name: str, remote_path: str, object_name: Optional[str], source_entity: Optional[str], destination_entity: Optional[str], options: Optional[Mapping[str, Any]]) Transfer
fetch_filelist(remote_path: str, source_entity: Optional[str], destination_entity: Optional[str], options: Optional[Mapping[str, Any]])
get_filelist(remote_path: str, source_entity: Optional[str], destination_entity: Optional[str], options: Optional[Mapping[str, Any]]) RemoteFileListing
pause_transfer(id: str) None
resume_transfer(id: str) None
run_file_action(file: str, action: str, message: Optional[Mapping[str, Any]] = None) Dict[str, Any]
upload(bucket_name: str, object_name: str, remote_path: str, source_entity: Optional[str], destination_entity: Optional[str], options: Optional[Mapping[str, Any]]) Transfer
class yamcs.client.FileListSubscription(manager)

Local object providing access to filelist updates.

A subscription object stores the last filelist info for each remotepath and destination.

Initializes the future. Should not be called by clients.

get_filelist(remote_path: str, destination: str) Optional[RemoteFileListing]

Get the latest cached filelist for the given remote path and destination

Parameters:
  • remote_path – path on the remote destination

  • destination – remote entity name

class yamcs.client.TransferSubscription(manager, service_client: FileTransferServiceClient)

Local object providing access to transfer updates.

A subscription object stores the last transfer info for each transfer.

Initializes the future. Should not be called by clients.

get_transfer(id: str) Optional[Transfer]

Returns the latest transfer state.

Parameters:

id – Transfer identifier

list_completed() List[Transfer]

Returns all completed transfers (successful or not).

list_ongoing() List[Transfer]

Returns all ongoing transfers.

list_transfers() List[Transfer]

Returns a snapshot of all transfer info.