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.
Copy
# Import dependenciesfrom encord.user_client import EncordUserClient# Authenticate using the path to your private key. Replace \<private_key_path> with the path to your keyuser_client = EncordUserClient.create_with_ssh_private_key( ssh_private_key_path="<private_key_path>" )# Substitute the hash of your Project hereproject = "<project_hash>"# Add two annotators to the Projectproject.add_users( ["annotator1@yourdomain.com", "annotator2@yourdomain.com"], user_role=ProjectUserRole.ANNOTATOR,)# Add two reviewers to the Projectproject.add_users( ["reviewer1@yourdomain.com", "reviewer2@yourdomain.com"], user_role=ProjectUserRole.REVIEWER,)# Add one Team Manager to the Projectproject.add_users( ["team_manager@yourdomain.com"], user_role=ProjectUserRole.TEAM_MANAGER,)# Add one Admin to the Projectproject.add_users( ["team_manager@yourdomain.com"], user_role=ProjectUserRole.ADMIN,)