Skip to main content

CodeBundle

A class representing a code bundle for a task. This is used to package the code and the inflation path. The code bundle computes the version of the code using the hash of the code.

Attributes

AttributeTypeDescription
computed_versionstrThe version of the code bundle, representing the hash of the code.
destinationstr = .The destination path for the code bundle to be inflated to.
tgz`strNone` = null
pkl`strNone` = null
downloaded_path`pathlib.PathNone` = null
files`List[str]None` = null

Constructor

Signature

def CodeBundle(
computed_version: str,
destination: str = ".",
tgz: str | None = null,
pkl: str | None = null,
downloaded_path: pathlib.Path | None = null,
files: List[str]| None = null
) - > null

Parameters

NameTypeDescription
computed_versionstrThe version of the code bundle, typically a hash of the code.
destinationstr = "."The destination path for the code bundle to be inflated to.
tgz`strNone` = null
pkl`strNone` = null
downloaded_path`pathlib.PathNone` = null
files`List[str]None` = null

Methods


with_downloaded_path()

@classmethod
def with_downloaded_path(
path: pathlib.Path
) - > [CodeBundle](codebundle.md?sid=flyte_models_codebundle)

Create a new CodeBundle with the given downloaded path.

Parameters

NameTypeDescription
pathpathlib.PathThe local filesystem path where the code bundle has been downloaded and inflated during runtime.

Returns

TypeDescription
[CodeBundle](codebundle.md?sid=flyte_models_codebundle)A new instance of CodeBundle with the downloaded_path field updated to the specified filesystem path.