Getting started

Installation

SuperAnnotate Python SDK is available on PyPI. Use the following command on your terminal to install our SDK.

pip install superannotate

The latest version supports Python 3.6 + and was tested under Linux and Windows platforms.

Authorization

SDK functions work within the team scope of SuperAnnotate's platform, so a team-level authorization is required.

To authorize SDK in a team scope, follow these steps:

  1. Get the Python SDK authorization token from the Team Settings page.
  2. Run superannotatecli init in the terminal and plug the token to authorize SDK. This will create a configuration file with the token in a default location (~/.superannotate/config.json).
superannotatecli init
Input the team SDK token from https://app.superannotate.com/team: ******
SA-PYTHON-SDK - INFO - Configuration file ~/.superannotate/config.json successfully created.

To authenticate SDK with a custom config file, create a custom JSON file with the key token and use it for authentication:

import json

token_path = "./config.json"
token = "<your_sdk_token>"

with open(token_path, "w") as tf:
    json.dump({"token": token}, tf)
import superannotate as sa
sa.init(token_path)

Did this page help you?