Documentation Index
Fetch the complete documentation index at: https://docs.prefect.io/llms.txt
Use this file to discover all available pages before exploring further.
prefect.bundles
Functions
create_bundle_for_flow_run
flow: The flow to bundle.flow_run: The flow run to bundle.context: The context to use when running the flow.
- A BundleCreationResult containing:
-
- bundle: The serialized bundle
-
- zip_path: Path to sidecar zip file if include_files was specified, None otherwise. Caller is responsible for uploading this file and calling cleanup.
extract_flow_from_bundle
execute_bundle_in_subprocess
bundle: The bundle to execute.
- A multiprocessing.context.SpawnProcess.
convert_step_to_command
step: The step to convert.key: The key to use for the remote file when downloading or uploading.quiet: Whether to suppressuvoutput from the command.
- A list of strings representing the command to run the step.
upload_bundle_to_storage
bundle: The serialized bundle to upload.key: The key to use for the remote file when uploading.upload_command: The command to use to upload the bundle as a list of strings.zip_path: Optional path to sidecar zip file. If provided, uploads alongside the bundle using the bundle’s files_key as the storage key.upload_step: The upload step dict used to build the upload command. Required when uploading a sidecar zip so a separate command with the correct key can be constructed.
aupload_bundle_to_storage
bundle: The serialized bundle to upload.key: The key to use for the remote file when uploading.upload_command: The command to use to upload the bundle as a list of strings.zip_path: Optional path to sidecar zip file. If provided, uploads alongside the bundle using the bundle’s files_key as the storage key.upload_step: The upload step dict used to build the upload command. Required when uploading a sidecar zip so a separate command with the correct key can be constructed.
Classes
BundleLauncherOverride
SerializedBundle
A serialized bundle is a serialized function, context, and flow run that can be
easily transported for later execution.
Attributes:
function: Serialized (base64-encoded, gzip-compressed, cloudpickled) flow function.context: Serialized context for flow execution.flow_run: Flow run metadata as a dict.dependencies: Newline-separated list of pip dependencies.files_key: Optional storage key for sidecar zip containing included files. Format: “files/.zip”. None when no files are included.
BundleCreationResult
Result of creating a bundle, including optional sidecar zip info.
Attributes:
bundle: The serialized bundle.zip_path: Path to sidecar zip file if include_files was specified. None when no files are included. Caller is responsible for uploading this file and calling cleanup.