> ## 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.

# Copy Projects

Copying a Project creates another Project with the same Ontology and settings. You also have the option to copy over the same users, datasets and models (which are not copied over by default).

The [copy\_project()](/sdk-documentation/sdk-references/project#copy-project) method takes the following parameters, all of which are optional:

* Copy\_datasets: when set to *True*, the datasets from the original Project will be copied over and new tasks will be created from them.

* Copy\_collaborators: when set to *True*, the collaborators from the original Project will be copied over with their existing roles.

* Copy\_models: when set to *True*, the models and their training data from the original Project will be copied over.

The parameters above are set to *False* by default, which means that they don't need to be included if a given feature shouldn't be copied to the new Project.

The [copy\_project()](/sdk-documentation/sdk-references/project#copy-project) method returns the \<project\_hash> of the new project.

<Warning>If collaborators are not copied, reviewer and label mapping settings are not copied over either.</Warning>

<Tip>The project hash can be found within the URL once a project has been selected:</Tip>

> app.encord.com/projects/view/\<project\_hash>/summary

> app.us.encord.com/projects/view/\<project\_hash>/summary

The sample code below demonstrates how to copy a Project in the most simple way.

<CodeGroup>
  ```python Sample Code Global theme={"dark"}
  # Import dependencies
  from encord import EncordUserClient, Project

  #Authenticate using the path to your private key
  user_client = EncordUserClient.create_with_ssh_private_key(ssh_private_key_path="<private_key_path>")

  # Specify the project you'd like to copy using its Project hash
  project = user_client.get_project("<project_hash>")

  # Copy the project with attached datasets and collaborators
  new_project_hash = project.copy_project(
      copy_datasets=True,
      copy_collaborators=True,
      copy_models=False,  # Not strictly needed
  )
  # Print the new project's hash
  print(new_project_hash)

  ```

  ```python Sample Code US theme={"dark"}
  # Import dependencies
  from encord import EncordUserClient, Project

  #Authenticate using the path to your private key
  user_client = EncordUserClient.create_with_ssh_private_key(ssh_private_key_path="<private_key_path>", domain="https://api.us.encord.com")

  # Specify the Project you'd like to copy using its Project hash
  project = user_client.get_project("<project_hash>")

  # Copy the Project with attached Datasets and collaborators
  new_project_hash = project.copy_project(
      copy_datasets=True,
      copy_collaborators=True,
      copy_models=False,  # Not strictly needed
  )
  # Print the new Project's hash
  print(new_project_hash)

  ```

  ```python Example Output theme={"dark"}
  # the new Project's <project_hash>
  "046550d1-13fe-4052-ac99-e6a2d84f9b72" 
  ```
</CodeGroup>

The sample code below demonstrates how to copy a project in a more advanced way.

<CodeGroup>
  ```python Global theme={"dark"}
  # Import dependencies
  from encord import EncordUserClient
  from encord.orm.project import (
      CopyDatasetAction,
      CopyDatasetOptions,
      CopyLabelsOptions,
      ReviewApprovalState
  )

  #Authenticate using the path to your private key
  user_client = EncordUserClient.create_with_ssh_private_key(ssh_private_key_path="<private_key_path>")

  # Specify the project to be copied
  project = user_client.get_project("<project_hash>")

  # Copy the project
  project.copy_project(
      new_title="foo",            #specify the new project's title
      new_description="bar",      #specify the new project's description
      copy_collaborators=True,    # specify whether project collaborators should be copied to the new project
      copy_datasets=CopyDatasetOptions(
          action=CopyDatasetAction.CLONE,  # This will also create a new dataset
          dataset_title="baz",    #specify the new dataset's title
          dataset_description="quz", # Specify the new dataset's description
          datasets_to_data_hashes_map={
              "<dataset_hash>": ["<data_hash_1", "<data_hash_2"]
          },
      ),
      copy_labels=CopyLabelsOptions(
          accepted_label_statuses=[ReviewApprovalState.APPROVED],     # Copy over all labels in the 'Approved' state.
          accepted_label_hashes=["<label_hash_1>", "<label_hash_2>"], # Copy over labels with the listed hashes.
      ),
  )

  ```

  ```python US theme={"dark"}
  # Import dependencies
  from encord import EncordUserClient
  from encord.orm.project import (
      CopyDatasetAction,
      CopyDatasetOptions,
      CopyLabelsOptions,
      ReviewApprovalState
  )

  #Authenticate using the path to your private key
  user_client = EncordUserClient.create_with_ssh_private_key(ssh_private_key_path="<private_key_path>", domain="https://api.us.encord.com")

  # Specify the project to be copied
  project = user_client.get_project("<project_hash>")

  # Copy the project
  project.copy_project(
      new_title="foo",            #specify the new project's title
      new_description="bar",      #specify the new project's description
      copy_collaborators=True,    # specify whether project collaborators should be copied to the new project
      copy_datasets=CopyDatasetOptions(
          action=CopyDatasetAction.CLONE,  # This will also create a new dataset
          dataset_title="baz",    #specify the new dataset's title
          dataset_description="quz", # Specify the new dataset's description
          datasets_to_data_hashes_map={
              "<dataset_hash>": ["<data_hash_1", "<data_hash_2"]
          },
      ),
      copy_labels=CopyLabelsOptions(
          accepted_label_statuses=[ReviewApprovalState.APPROVED],     # Copy over all labels in the 'Approved' state.
          accepted_label_hashes=["<label_hash_1>", "<label_hash_2>"], # Copy over labels with the listed hashes.
      ),
  )

  ```

  ```python Example output theme={"dark"}
  # the new Project's <project_hash>
  "046550d1-13fe-4052-ac99-e6a2d84f9b72"
  ```
</CodeGroup>
