Invite team member

To invite a team member or multiple team members:

sa.invite_contributors_to_team( emails = ["[email protected]", "[email protected]"], admin=False)

Get list of team members

To get a list of a team’s members and their pending invitations:

import json
team_metadata = sa.get_team_metadata()
print(json.dumps(team_metadata, indent = 4, sort_keys = True))

This will be the output:

{
    "pending_invitations": [],
    "users": [
        {
            "allow_run_explore": 1,
            "allow_run_training": 1,
            "email": "[email protected]",
            "first_name": "Admin First Name",
            "id": "[email protected]",
            "last_name": "Admin Last Name",
            "picture": 0,
            "user_role": "Admin"
        },
        {
            "allow_run_explore": 0,
            "allow_run_training": 0,
            "email": "[email protected]",
            "first_name": "Annotator First Name",
            "id": "[email protected]",
            "last_name": "Annotator Last Name",
            "picture": 0,
            "user_role": "Annotator"
        }
    ],
    "allow_run_explore": 1,
    "allow_run_training": 1,
    "createdAt": "2021-07-02T10:56:58.000Z",
    "creator_explore": true,
    "creator_id": "[email protected]",
    "creator_license_expired": false,
    "creator_plan": 1,
    "creator_training_hours": true,
    "creator_trial_start_date": null,
    "creator_user_limit_exceeded": false,
    "creator_user_plan": 1,
    "description": "---",
    "id": 12037,
    "is_default": 0,
    "name": "Release Demos",
    "type": 1,
    "updatedAt": "2021-07-02T10:57:15.000Z",
    "user_role": "Admin"
}

Duplicate projects across teams

To duplicate a project across teams:

from superannotate import SAClient

# Get the project metadata, annotation classes, and settings of Team 1.
team_1 = SAClient(config_path = "~/.superannotate/1_config.json")
project_metadata = team_1.get_project_metadata(
    project="Project 1", 
    include_annotation_classes=True, 
    include_settings=True, 
    include_workflow=False, 
    include_contributors=False, 
    include_complete_item_count=False)

# Create a project for Team 2 using the collected data from Team 1.
team_2 = SAClient(config_path = "~/.superannotate/2_config.json")

team_2.create_project(
	project_name="Project 2", 
	project_description="Some description", 
	project_type="Vector",
	settings=project_metadata["settings"],
	classes=project_metadata["classes"]
)

# List the projects of both teams.
team_1.search_projects()
team_2.search_projects()