3. Set up your Project and team
Add Users To Your Project
The next step is to add different kinds of users to the Project. This includes annotators, reviewers, annotators & reviewers, project managers, and admins.
The following script adds a number of users with different user roles to your Project:
- 2 Annotators
- 2 Reviewers
- 1 Team Manager
- 1 Admin
Substitute the following values into the script below:
- <private_key_path> with the path to your private key.
- <project_hash> with the hash of your Project, output when the Project is created.
# Import dependencies
from encord.user_client import EncordUserClient
# Authenticate using the path to your private key. Replace \<private_key_path> with the path to your key
user_client = EncordUserClient.create_with_ssh_private_key(
ssh_private_key_path="<private_key_path>"
)
# Substitute the hash of your Project here
project = "<project_hash>"
# Add two annotators to the Project
project.add_users(
["annotator1@yourdomain.com", "annotator2@yourdomain.com"],
user_role=ProjectUserRole.ANNOTATOR,
)
# Add two reviewers to the Project
project.add_users(
["reviewer1@yourdomain.com", "reviewer2@yourdomain.com"],
user_role=ProjectUserRole.REVIEWER,
)
# Add one Team Manager to the Project
project.add_users(
["team_manager@yourdomain.com"],
user_role=ProjectUserRole.TEAM_MANAGER,
)
# Add one Admin to the Project
project.add_users(
["team_manager@yourdomain.com"],
user_role=ProjectUserRole.ADMIN,
)
Was this page helpful?