copy_project

Copy a dbnl Project with a new name and description

dbnl.copy_project(
    *,
    project: ,
    name: str,
    description: Optional[str] = None,
) -> :

Parameters

Arguments
Description

project

The Project to copy.

name

The name for the new dbnl Project. Project names must be unique; an error will be raised if there exists a Project with the same name.

description

An optional description for the dbnl Project, defaults to None. Description is limited to 255 characters.

Returns

Type
Description

The newly created dbnl Project.

Examples

import dbnl
dbnl.login()


proj1 = dbnl.get_or_create_project(name="test_proj1")
proj2 = dbnl.copy_project(project=proj1, name="test_proj2")

assert proj2.name == "test_proj2"

Was this helpful?