Skip to content

Tip

The features described on this page are not available in the public service. Contact us to know more.

Projects

Deep Search projects allow users to collaborate. All resources such as data, models and knowledge graphs belong to a project.

A collaborator may be added to a project as owner, editor, or viewer. Below is a description of these roles.

Role Description
viewer Inspect documents, view all project resources, query project knowledge graphs.
editor All permissions of viewer + creating and editing new project resources.
owner All permissions of editor + possibility to manage collaborators and delete the project.

Project management

Info

Make sure to complete your profile setup before using the project management features listed below.

Creating a project

Using the deepsearch cps component:

$ deepsearch cps projects create my-project

key                                       name
----------------------------------------  ----------
d1d526e14cdac562b5174c2df9dd1b04c29a8c33  my-project

After you have generated the api object (from a profile), creating a project is very easy.

proj = api.projects.create(name="my-project")

print(proj)
# > Project(key='7be8d8e763b55996710007cf97f31244e8ea237c', name='my-project')

Listing projects

Using the deepsearch cps component:

$ deepsearch cps projects list

key                                       name
----------------------------------------  ---------------------
d1d526e14cdac562b5174c2df9dd1b04c29a8c33  my-project
20ae7fb2567d4b777712a6bb50f133c118497d0d  test-project
1146f5cf2c5ebb4774df38888d5fa608673fca33  it-services
744978acd58c0cd16893ec4e0ccdd69fd8dd5566  ...

After you have generated the api object (from a profile), listing projects is very easy.

projects = api.projects.list()     # returns list of projects

for proj in projects:
    print(proj.key, proj.name)

# If your project uses Pandas, you can easily convert the list of projects to a Dataframe
import pandas as pd
df = pd.DataFrame(projects)
print(df)

Assigning a user to a project

Using the deepsearch cps component:

$ deepsearch cps projects assign d1d526e... user@example.com viewer
# example project to assign
proj = "7be8d8e763b55996710007cf97f31244e8ea237c"

# or using a Project instance, e.g.:
# proj = api.projects.create(name="new-project")

api.projects.assign_user(
    project=proj,
    username="user@example.com",
    role="viewer",
)

Removing a project

Using the deepsearch cps component:

$ deepsearch cps projects remove d1d526e...
# example project to remove
proj = "7be8d8e763b55996710007cf97f31244e8ea237c"

# or using a Project instance, e.g.:
# proj = api.projects.create(name="new-project")

api.projects.remove(project=proj)