ProjectUserRole enum. ProjectUserRole can take the following values:
- ADMIN = 0
- ANNOTATOR = 1
- REVIEWER = 2
- ANNOTATOR_REVIEWER = 3
- TEAM_MANAGER = 4
Global
US
🚀 The World's Largest Multimodal AI Dataset! Encord's E-MM1 is available now.
ProjectUserRole enum. ProjectUserRole can take the following values:
app.encord.com/projects/view/\<project_hash>/summary or app.us.encord.com/projects/view/\<project_hash>/summary
# Import dependencies
from encord import EncordUserClient, Project
from encord.utilities.project_user import ProjectUserRole
SSH_PATH = "<private-key-path>"
#Authenticate using the path to your private key
user_client = EncordUserClient.create_with_ssh_private_key(
ssh_private_key_path=SSH_PATH
)
# Specify the project you'd like to add users to
project = user_client.get_project("<project_hash>")
# Add users by specifying their email addresses, as well as the role these users should have.
added_users = project.add_users(
["example1@encord.com", "example2@encord.com"],
ProjectUserRole.ANNOTATOR,
)
# Print the new users added to the project
print(added_users)
# Import dependencies
from encord import EncordUserClient, Project
from encord.utilities.project_user import ProjectUserRole
SSH_PATH = "<private-key-path>"
#Authenticate using the path to your private key
user_client = EncordUserClient.create_with_ssh_private_key(
ssh_private_key_path=SSH_PATH,
domain="https://api.us.encord.com"
)
# Specify the project you'd like to add users to
project = user_client.get_project("<project_hash>")
# Add users by specifying their email addresses, as well as the role these users should have.
added_users = project.add_users(
["example1@encord.com", "example2@encord.com"],
ProjectUserRole.ANNOTATOR,
)
# Print the new users added to the project
print(added_users)
Was this page helpful?