Skip to main content

super.AI API

Project description

Super.AI API client

The super.AI Python library provides access to the super.AI API via Python and our command line interface (CLI). Full details on our API are listed in our API reference.

In this README, you will find the following sections:

Installation

In your terminal, run:

pip install superai

Requirements

  • Python 3.6 or later. On systems that have both Python 2 and Python 3 installed, you may need to replace the call to pip with pip3.
  • Dependencies in this package rely on the Clang build tools on MacOS. If you have recently updated or installed XCode, you may have to run sudo xcodebuild -license prior to installation.
  • A super.AI account

CLI usage

Installing the API client provides access to the superai command from within your terminal.

superai [command]

# Run `--help` for detailed information about CLI commands, including required and optional flags
superai [command] --help

Logging in

In order to use the CLI, you need to pass us your API key. Use the following command to do this:

superai login --username {username}

Replace {username} with your super.AI account username.

When prompted, enter your password and press enter. You should see a confirmation like this:

Api key {api-key} was set

If you created your account through Google Sign-In you will need to manually set your API key:

  1. Find your API key in the super.AI dashboard by hovering over the profile icon in the lower left of the screen, then heading to API keys. You can copy the key by clicking on the copy button.
  2. Provide your API key to the client using the following command (replacing {api-key} with your actual API key): superai config --api-key {api-key}

Logging out

You can log out and thereby remove your API key by running the following command:

superai logout

CLI commands

  • create_jobs
  • list_jobs
  • fetch_job
  • get_job_responses
  • cancel_job
  • download_jobs
  • fetch_batch_job
  • fetch_batches_job
  • create_ground_truth
  • list_ground_truth_data
  • get_ground_truth_data
  • update_ground_truth
  • delete_ground_truth_data

If you're new to using a CLI, our Getting started with the CLI page can show you the ropes.

Python usage

This client allows you to run Python scripts on your machine to automate your work processes. For example, you can use a script like this to submit data points for processing to a project that takes image inputs, replacing any {variables} where necessary:

import superai as ai

client = ai.Client("{api-key}")

client.create_jobs(
    app_id="{project-id}",
    inputs=[{"image_url":"https://cdn.super.ai/cool-bulldog.jpg"},{"image_url":"https://cdn.super.ai/hot-dog-01.jpeg"}]
)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

superai-0.0.8-py2.py3-none-any.whl (32.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file superai-0.0.8-py2.py3-none-any.whl.

File metadata

  • Download URL: superai-0.0.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.2

File hashes

Hashes for superai-0.0.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c8d0ad9fa4cb9dc7acec808483130eaf52914eeb2519a509b9e224027cd96959
MD5 c17c1e94f8b5c46f7e655f503dc6891a
BLAKE2b-256 28e8842ec453bcf588f21533c0f9df85a33b98de99f4f098342334efdddd2d3c

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