Skip to main content

Python SDK to SuperAnnotate platform

Project description

Python Versions License Changelog

Welcome to the SuperAnnotate Python Software Development Kit (SDK), which enables Python programmers to create software that incorporates services of the platform and effortlessly integrates SuperAnnotate into their AI process.

Resources

Authentication

from superannotate import SAClient
# by environment variable SA_TOKEN
sa_client = SAClient()
# by token
sa_client = SAClient(token='<team token>')
# by config file
# default path is ~/.superannotate/config.ini
sa_client = SAClient(config_path='~/.superannotate/dev_config.ini')

config.ini example

[DEFAULT]
SA_TOKEN = <Token>
LOGGING_LEVEL = INFO

Using superannotate

from superannotate import SAClient


sa_client =SAClient()

project = 'Dogs'

sa_client.create_project(
        project_name=project,
        project_description='Test project generated via SDK',
        project_type='Vector'
    )

sa_client.create_annotation_class(
    project=project,
    name='dog',
    color='#F9E0FA',
    class_type='tag'
)

sa_client.attach_items(
        project=project,
        attachments=[
            {
                'url': 'https://drive.google.com/uc?export=download&id=1ipOrZNSTlPUkI_hnrW9aUD5yULqqq5Vl',
                'name': 'dog.jpeg'
            }
        ]
    )

sa_client.upload_annotations(
        project=project,
        annotations=[
            {
                'metadata': {'name': 'dog.jpeg'},
                'instances': [
                    {'type': 'tag', 'className': 'dog'}
                ]
            }
        ]
    )

sa_client.get_annotations(project=project, items=['dog.jpeg'])

Installation

SuperAnnotate python SDK is available on PyPI:

pip install superannotate

The package officially supports Python 3.10+ and was tested under Linux and Windows (Anaconda ) platforms.

Supported Features

  • search/get/create/clone/update/delete projects

  • search/get/create/delete folders

  • assign folders to project contributors

  • upload items to a project from a local or AWS S3 folder

  • attach items by URL or from an integrated storage, meanwhile keeping them secure in your cloud provider

  • get integrated cloud storages

  • upload annotations (also from local or AWS S3 folder)

  • delete annotations

  • set items annotations statuses

  • get/download/export annotations from a project (also to a local or AWS S3 folder)

  • invite/search team contributors or add contributors to a specific project

  • search/get/copy/move items in a project

  • query items using SA Query Language

  • define custom metadata for items and upload custom values (query based on your custom metadata)

  • upload priority scores

  • get available subsets (sets of segregated items), query items in a subset or add items to a subset

  • assign or anassign items to project contributors

  • download an image that has been uploaded to project

  • search/create/download/delete project annotation classes

  • search/download models

  • run predictions

  • convert annotations from/to COCO format

  • convert annotation from VOC, SuperVisely, LabelBox, DataLoop, VGG, VoTT, SageMaker, GoogleCloud, YOLO formats

  • CLI commands for simple tasks

Questions and Issues

For questions and issues please use this repo’s issue tracker on GitHub or contact support@superannotate.com.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

superannotate-4.5.4.tar.gz (196.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

superannotate-4.5.4-py3-none-any.whl (249.1 kB view details)

Uploaded Python 3

File details

Details for the file superannotate-4.5.4.tar.gz.

File metadata

  • Download URL: superannotate-4.5.4.tar.gz
  • Upload date:
  • Size: 196.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for superannotate-4.5.4.tar.gz
Algorithm Hash digest
SHA256 73bed93cfa0dce4f5bfd8f26f41eb8a4dfa58c247b338c9955f048425fd9ec06
MD5 30b5fb40635dbdc57ff97f15395f8a4a
BLAKE2b-256 3872d9774efc95e1b2761678457a3369e998d641699b3a836fa7df47ef8db991

See more details on using hashes here.

File details

Details for the file superannotate-4.5.4-py3-none-any.whl.

File metadata

  • Download URL: superannotate-4.5.4-py3-none-any.whl
  • Upload date:
  • Size: 249.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for superannotate-4.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f3931839f794a6cdd2cd5f002239749edbe572d4e3b5ffae12b4adee33bf9a3b
MD5 87e5c45adb8f002da838cee1ff95ef7d
BLAKE2b-256 9ea3e88c7049dd4bf30590470333584eb1fd99410c5ee951f9f8f14cb11f12cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page