- General Client
- Mission Database
- TM/TC Processing
- Archive
- Link Management
- Object Storage
- File Transfer
- Time Correlation (TCO)
- Timeline
- Examples
Model¶
- class yamcs.filetransfer.model.EntityInfo(proto)¶
- class yamcs.filetransfer.model.FileTransferCapabilities(proto)¶
- class yamcs.filetransfer.model.FileTransferOption(proto)¶
-
- property values¶
List of possible values for the option
- class yamcs.filetransfer.model.RemoteFile(proto)¶
Represents a file on a remote entity.
- class yamcs.filetransfer.model.RemoteFileListing(proto)¶
Represents a list of files from a remote.
- property files: List[RemoteFile]¶
List of files
- class yamcs.filetransfer.model.Service(proto, service_client)¶
-
- property capabilities: FileTransferCapabilities¶
Transfer capabilities
- create_filelist_subscription(on_data: Optional[Callable[[RemoteFileListing], None]] = None, timeout: float = 60)¶
Create a new filelist subscription.
- Parameters:
on_data – Function that gets called with
Transfer
updates.timeout – The amount of seconds to wait for the request to complete.
- Returns:
Future that can be used to manage the background websocket subscription
- Return type:
yamcs.filetransfer.client.FileListSubscription
- create_transfer_subscription(on_data: Optional[Callable[[Transfer], None]] = None, timeout: float = 60)¶
Create a new transfer subscription.
- Parameters:
on_data – Function that gets called with
Transfer
updates.timeout – The amount of seconds to wait for the request to complete.
- Returns:
Future that can be used to manage the background websocket subscription
- Return type:
yamcs.filetransfer.client.TransferSubscription
- download(bucket_name: str, remote_path: str, object_name: Optional[str] = None, source_entity: Optional[str] = None, destination_entity: Optional[str] = None, overwrite: bool = True, parents: bool = True, reliable: bool = False, options: Optional[Mapping[str, Any]] = None) → Transfer¶
Downloads a file from the source to a bucket.
Warning
Prefer the use of
options
instead of the deprecated paramsoverwrite
,parents
andreliable
.- Parameters:
bucket_name – Name of the bucket to receive the file.
object_name – Name of the file received in the bucket.
remote_path – Name of the file to be downloaded from the source.
source_entity – Use a specific source entity. (useful in case of multiples)
destination_entity – Use a specific destination entity. (useful in case of multiples)
overwrite –
Replace file if it already exists.
Deprecated since version 1.8.6: Use
options
instead (option name:overwrite
)parents –
Create the remote path if it does not yet exist.
Deprecated since version 1.8.6: Use
options
instead (option name:createPath
)reliable –
Enable reliable transfers.
Deprecated since version 1.8.6: Use
options
instead (option name:reliable
)options – File transfer options dict (may overwrite
overwrite
,parents
orreliable
parameters if set in these options).
- fetch_filelist(remote_path: str, source_entity: Optional[str] = None, destination_entity: Optional[str] = None, options: Optional[Mapping[str, Any]] = None)¶
Sends a request to fetch the directory listing from the remote (destination).
- Parameters:
remote_path – path on the remote destination to get the file list
source_entity – source entity requesting the file list
destination_entity – destination entity from which the file list is needed
options – option dictionary
- get_filelist(remote_path: str, source_entity: Optional[str] = None, destination_entity: Optional[str] = None, options: Optional[Mapping[str, Any]] = None) → RemoteFileListing¶
Returns the latest directory listing for the given destination.
- Parameters:
remote_path – path on the remote destination to get the file list
source_entity – source entity requesting the file list
destination_entity – destination entity from which the file list is needed
options – option dictionary
- property local_entities: List[EntityInfo]¶
List of local entities
- property remote_entities: List[EntityInfo]¶
List of remote entities
- property transfer_options: List[FileTransferOption]¶
List of possible transfer options
- upload(bucket_name: str, object_name: str, remote_path: str, source_entity: Optional[str] = None, destination_entity: Optional[str] = None, overwrite: bool = True, parents: bool = True, reliable: bool = False, options: Optional[Mapping[str, Any]] = None) → Transfer¶
Uploads a file located in a bucket to a remote destination path.
Warning
Prefer the use of
options
instead of the deprecated paramsoverwrite
,parents
andreliable
.- Parameters:
bucket_name – Name of the bucket containing the source object.
object_name – Name of the source object.
remote_path – Remote destination.
source_entity – Use a specific source entity. (useful in case of multiples)
destination_entity – Use a specific destination entity. (useful in case of multiples)
overwrite –
Replace file if it already exists.
Deprecated since version 1.8.6: Use
options
instead (option name:overwrite
)parents –
Create the remote path if it does not yet exist.
Deprecated since version 1.8.6: Use
options
instead (option name:createPath
)reliable –
Enable reliable transfers.
Deprecated since version 1.8.6: Use
options
instead (option name:reliable
)options – file transfer options dict (may overwrite “overwrite”, “parents” or “reliable” parameters if set in these options).
- class yamcs.filetransfer.model.Transfer(proto, service_client)¶
Represents a file transfer.
- await_complete(timeout: Optional[float] = None)¶
Wait for the transfer to be completed.
- Parameters:
timeout – The amount of seconds to wait.
- cancel()¶
Cancel this transfer
- is_complete() → bool¶
Returns whether this transfer is complete. A transfer can be completed, yet still failed.
- pause()¶
Pause this transfer
- resume()¶
Resume this transfer