/  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: Callable[[RemoteFileListing], None] | None = None, timeout: float = 60) → FileListSubscription
create_transfer_subscription(on_data: Callable[[Transfer], None] | None = None, timeout: float = 60) → TransferSubscription
download(bucket_name: str, remote_path: str, object_name: str | None, source_entity: str | None, destination_entity: str | None, options: Mapping[str, Any] | None) → Transfer
fetch_filelist(remote_path: str, source_entity: str | None, destination_entity: str | None, options: Mapping[str, Any] | None)
get_filelist(remote_path: str, source_entity: str | None, destination_entity: str | None, options: Mapping[str, Any] | None) → RemoteFileListing
pause_transfer(id: str) → None
resume_transfer(id: str) → None
run_file_action(file: str, action: str, message: Mapping[str, Any] | None = None) → Dict[str, Any]
upload(bucket_name: str, object_name: str, remote_path: str, source_entity: str | None, destination_entity: str | None, options: Mapping[str, Any] | None) → 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) → RemoteFileListing | None

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) → Transfer | None

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.