perago.WorkspaceDownloadFile#

class perago.WorkspaceDownloadFile(object_path, local_path)[源代码]#

Remote object that should be downloaded into an attempt workspace.

WorkspaceDownloadFile is produced from the object listing for a workspace input ref. The destination path always points under the attempt-local workspace directory.

Parameters:
object_pathstr

LakeFS object path selected from the input workspace ref.

local_pathpathlib.Path

Destination path under the attempt-local workspace root after removing the task's WorkspaceSpec.prefix.

参数:
  • object_path (str)

  • local_path (Path)

参见

workspace_download_files

Build download records from LakeFS object paths.

workspace_local_path

Convert a remote object path to a local path.

Notes

Objects outside the task prefix are not represented by this class because they are filtered before the download plan is returned.

Examples

>>> record = WorkspaceDownloadFile("audio/render/raw/input.wav", Path("raw/input.wav"))
>>> record.local_path
PosixPath('raw/input.wav')
__init__(object_path, local_path)[源代码]#

Initialize a workspace download record.

Parameters:
object_pathstr

LakeFS object path selected from the input workspace ref.

local_pathpathlib.Path

Destination path under the attempt-local workspace root.

参数:
  • object_path (str)

  • local_path (Path)

返回类型:

None

Methods

__init__(object_path, local_path)

Initialize a workspace download record.

Attributes

object_path

local_path