Skip to main content

A Python package to interact with Playment's APIs.

Project description

PyPI version

Installation

You don't need this source code unless you want to modify the package. If you just want to use the package, just run:

pip install --upgrade playment

Install from source with:

python setup.py install

Requirements:

Python 3.5+

Documentation

Please visit the Docs to know more about Playment APIs.

Using x-client-key [Deprecated]

  • Using x-client-key is only supported till 30th October 2020, please use updated sdk and x-api-key to use Playment APIs after the aforementioned date.
  • x-api-key is supported in latest SDK versions > 1.0.4

X-Client-Key Usage instructions

Uninstall the sdk (Only required if you upgraded to sdk version > 1.0.4, run pip show playment to check).

pip uninstall playment

Install the latest version supporting x-client-key

pip install -Iv playment==1.0.4

Pass your x-client-key as shown below, and use as demonstrated in further examples.

import playment
client = playment.Client(client_key="your-x-client-key-here")

Please reach out to dev@playment.in if you face any issues.

Usage

import playment
client = playment.Client(api_key="your-x-api-key-here")

It is a secret key required to call Playment APIs. The secret x-api-key ensures that only you are able to access your projects. The x-api-key can be accessed from the Settings -> API Keys in your Playment Dashboard.

Usage Instructions

Summary

  • Project Overview
  • Batch Summary
  • Project's batches Summary

Creating a Batch

  • Consist collection of jobs with similar characteristics.

Creating a Single-Image Based Job.

  • A single image based job can be used for classification/annotation/segmentation.

Creating a Sensor Based Job with Multiple Images with only camera sensor or multiple image based Job.

  • A multiple image based job can be used for classification/annotation, where all the images of the job are from a single camera and objects are needed to be tracked.

Creating a Sensor Based Job with Multiple Images/PCDs or Sensor Fusion Job.

  • This can also be used for only LiDAR based jobs.

Creating a Job with metadata.

  • metadata: You can send any type of data in metadata which can be useful in the task or record of any other data related to that job. metadata should be a type dict.

Get Job Result.

  • Job result will only populate if the job is completed else it will be empty.

Create Jobs with High Priority and associating them with a batch.

image_url = "https://example.com/image_url"
image_data = playment.ImageData(image_url=image_url)

try:
    job = client.create_job(reference_id="55", tag='image',
                            data=image_data, project_id="project_id",
                            priority_weight=10, batch_id="batch_id")
except playment.PlaymentException as e:
    print(e.code, e.message, e.data)

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

playment-1.0.5.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

playment-1.0.5-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file playment-1.0.5.tar.gz.

File metadata

  • Download URL: playment-1.0.5.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.5

File hashes

Hashes for playment-1.0.5.tar.gz
Algorithm Hash digest
SHA256 3db2851a21161e57e7b047413d09575f215f4b7ff47138091f0a1e6c1a6ac63a
MD5 27a0328c45594513d2964afd5efbd039
BLAKE2b-256 14c55cb41456b43c3b6fccee39fd4cd4f6861253f929634dd86f5f7dec29a27b

See more details on using hashes here.

File details

Details for the file playment-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: playment-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.5

File hashes

Hashes for playment-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 583fc12ce957225be707af982d1e9746dfd82d15d51f5adee3f241cf7905d65b
MD5 6be98bb43dead18918e5ebc0b107bf83
BLAKE2b-256 40f2be5ddae29a7fbe15799afcda8483a81143f8a3cf002e485eaf5f7b5e389b

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