perago.WorkspaceUploadFile#

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

Local file that should be uploaded into a workspace prefix.

WorkspaceUploadFile is produced while staging a workspace task output. The record keeps the local file selected from the attempt workspace next to the LakeFS object path that will receive its contents.

Parameters:
local_pathpathlib.Path

Absolute or attempt-workspace-relative path to the local file selected for upload.

object_pathstr

LakeFS object path where the file should be written. The path already includes the task's WorkspaceSpec.prefix.

参数:
  • local_path (Path)

  • object_path (str)

参见

workspace_upload_files

Build upload records from a local workspace.

WorkspaceSyncPlan

Combine upload records with stale-object deletes.

Notes

This is a runtime planning object. Task authors normally interact with the local workspace directory instead of constructing upload records directly.

Examples

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

Initialize a workspace upload record.

Parameters:
local_pathpathlib.Path

Absolute or attempt-workspace-relative path to the local file selected for upload.

object_pathstr

LakeFS object path where the file should be written.

参数:
  • local_path (Path)

  • object_path (str)

返回类型:

None

Methods

__init__(local_path, object_path)

Initialize a workspace upload record.

Attributes

local_path

object_path