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`
pkl`strNone`
downloaded_path`pathlib.PathNone`
files`List[str]None`

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, derived from the hash of the code.
destinationstr = "."The destination path where the code bundle will be inflated.
tgz`strNone` = null
pkl`strNone` = null
downloaded_path`pathlib.PathNone` = null
files`List[str]None` = null

Methods​


with_downloaded_path()​

def with_downloaded_path(self, path: pathlib.Path) -> CodeBundle: ...

Create a new CodeBundle with the given downloaded path.

Parameters​

NameTypeDescription
pathpathlib.PathThe 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 updated downloaded_path field, preserving all other existing attributes.