Skip to main content

The official Python SDK for Trainingset.ai.

Project description

Trainingset.ai Python SDK

Install

pip install trainingsetai

Import and Initialize a client session

from trainingsetai import TrainingsetClient

client = TrainingsetClient("api_key")

Methods

You can use any parameters from the documentation available here.

Tasks

Get tasks

You can load the tasks with get_tasks method:

client.get_tasks({
    "limit": 1
})

Create tasks

There is a method for each task type and it's very straightforward:

annotation_task = {
    "attachment_url": "http://placekitten.com/1920/1080",
    "instructions": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
    "objects_to_annotate": [{"label": "test", "color": "rgba(0, 0, 0, 0)"}]
}

client.create_box_annotation_task(annotation_task)
client.create_line_annotation_task(annotation_task)
client.create_point_annotation_task(annotation_task)
client.create_polygon_annotation_task(annotation_task)
client.create_segmentation_task(annotation_task)
client.create_point_cloud_annotation_task(annotation_task)

categorization_task = {
    "attachment_url": "http://placekitten.com/1920/1080",
    "instructions": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
    "categories": ["category1", "category2"]
}

client.create_image_categorization_task(categorization_task)

Projects

Managing projects is also a straightforward process:

client.get_projects()
client.create_project("test_project")
client.delete_project("project_id")

Project details


Download files

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

Source Distribution

trainingsetai-0.0.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

trainingsetai-0.0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file trainingsetai-0.0.2.tar.gz.

File metadata

  • Download URL: trainingsetai-0.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.21.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.5

File hashes

Hashes for trainingsetai-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1fbd44054960bc145182b4d35b1a93318dae53575fb8bd5bda55a59634debf58
MD5 330219ddcb458d0a9390c105352f6ec5
BLAKE2b-256 49af6f7fcd4f1617a345a333e8f379269836e1b10ef795fafd96f53ea78c0d82

See more details on using hashes here.

File details

Details for the file trainingsetai-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: trainingsetai-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.21.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.5

File hashes

Hashes for trainingsetai-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4049d71eb0210405274969710e6e3171fd911a49de69f768041b51a47a0e94ab
MD5 9264913d83591d77b3d7943494c02dc1
BLAKE2b-256 5c5fcce37e4ea35e97fce1aacea2e62a51e24322ac218e12a3048c628b8db534

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