> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Project copy

Asynchronous project copying.

## AllDatasets Objects

```python theme={"dark"}
@dataclass(frozen=True)
class AllDatasets()
```

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

## SelectedDatasets Objects

```python theme={"dark"}
@dataclass(frozen=True)
class SelectedDatasets()
```

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

## ProjectCopyFile Objects

```python theme={"dark"}
@dataclass(frozen=True)
class ProjectCopyFile()
```

A data unit selected for copying.

## SelectedFiles Objects

```python theme={"dark"}
@dataclass(frozen=True)
class SelectedFiles()
```

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

## ProjectCopyStatus Objects

```python theme={"dark"}
class ProjectCopyStatus(str, Enum)
```

The status of a project copy.

## ProjectCopyResult Objects

```python theme={"dark"}
@dataclass(frozen=True)
class ProjectCopyResult()
```

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

## ProjectCopyFailedError Objects

```python theme={"dark"}
class ProjectCopyFailedError(EncordException)
```

The copy failed; `error` contains the reason.

## ProjectCopyTimeoutError Objects

```python theme={"dark"}
class ProjectCopyTimeoutError(TimeOutError)
```

The wait expired, but the copy continues running.

## ProjectCopyWaitError Objects

```python theme={"dark"}
class ProjectCopyWaitError(EncordException)
```

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

## ProjectCopyLoadError Objects

```python theme={"dark"}
class ProjectCopyLoadError(EncordException)
```

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

## ProjectCopyJob Objects

```python theme={"dark"}
@dataclass(frozen=True)
class ProjectCopyJob()
```

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

```python theme={"dark"}
def get_status(timeout_seconds: int = 0) -> ProjectCopyResult
```

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

```python theme={"dark"}
def wait_for_project(
    timeout_seconds: Optional[int] = _DEFAULT_PROJECT_WAIT_SECONDS
) -> "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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.