Skip to content

deploy_from_folder

async def deploy_from_folder(client: AuraClient, deployment_name: str, folder: str | Path, *, dest_prefix: str = '', include: Callable[[str], bool] | None = None, concurrency: int = DEFAULT_CONCURRENCY, on_file_uploaded: Callable[[str], None] | None = None) -> list[FileEntry]

Upload every file under folder, preserving its tree under dest_prefix.

Does not create the deployment or run the contract check — pair it with AuraClient.create_deployment and AuraClient.check_deployment.

The first failure stops the pool: workers finish their in-flight upload and then stop taking new work, because a caller that treats a failed sync as “stop and prune stale remote files” would otherwise have files still landing behind the raised error, leaving the remote matching neither file set.

Parameter Type Default Description
client AuraClient A connected AuraClient.
deployment_name str The deployment to upload into.
folder str | Path Local directory to upload.
dest_prefix str '' Prepended to each relative path, e.g. "run/".
include Callable[[str], bool] | None None Keep only files whose POSIX-relative path passes this predicate. Everything uploads when omitted.
concurrency int DEFAULT_CONCURRENCY How many uploads run at once.
on_file_uploaded Callable[[str], None] | None None Called with each destination path as it lands.

The stored file entries, in upload order.

Exception When
AuraApiError An upload failed. Raised as itself, not wrapped in an ExceptionGroup, so except AuraApiError works.
FileNotFoundError folder does not exist.
NotADirectoryError folder exists but is not a directory.