Skip to main content
Asynchronous project copying.

AllDatasets Objects

Attach all of the source project’s existing datasets to the copy.

SelectedDatasets Objects

Attach selected source datasets. An empty selection copies no data.

ProjectCopyFile Objects

A data unit selected for copying.

SelectedFiles Objects

Copy selected data units into a new dataset without duplicating their source files.

ProjectCopyStatus Objects

The status of a project copy.

ProjectCopyResult Objects

A copy’s status and result. raw_status is set for unrecognized statuses.

ProjectCopyFailedError Objects

The copy failed; error contains the reason.

ProjectCopyTimeoutError Objects

The wait expired, but the copy continues running.

ProjectCopyWaitError Objects

Waiting stopped before the copy’s outcome was known; use job_id to resume.

ProjectCopyLoadError Objects

The copy succeeded, but loading the project identified by project_id failed.

ProjectCopyJob Objects

A background project copy, identified by job_id. project_id is set when starting a copy and is None on resumed handles. For resumed jobs, read the project ID from the result of get_status().

get_status

Return the copy’s current status. A positive timeout waits until the status leaves PENDING or the wait expires. An expired wait returns PENDING without canceling the copy. Arguments:
  • timeout_seconds - Maximum wait in seconds. Defaults to 0, which checks once without waiting.
Raises:
  • EncordException - The status response could not be read.

wait_for_project

Wait for the copy to finish and return the copied project. Arguments:
  • timeout_seconds - Maximum wait in seconds, or None to wait indefinitely. Defaults to one hour.
Raises:
  • ProjectCopyFailedError - The copy failed.
  • ProjectCopyTimeoutError - The wait expired; the copy continues running.
  • ProjectCopyWaitError - Reading the status failed or the status is unrecognized.
  • ProjectCopyLoadError - The copy succeeded but its project could not be loaded.