Skip to main content

Gradient AI API

Project description

gradientai-python-sdk

Interface for interacting with Gradient AI.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0-dev.2
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import gradientai

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import gradientai

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import time
import gradientai
from gradientai.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.gradient.ai/api
# See configuration.py for a list of all supported configuration parameters.
configuration = gradientai.Configuration(
    host = "https://api.gradient.ai/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): bearerAuth
configuration = gradientai.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with gradientai.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = gradientai.LicensesApi(api_client)
    id = 'id_example' # str | 
    x_preemo_workspace_id = 'x_preemo_workspace_id_example' # str | 

    try:
        # Agree to the license
        api_response = api_instance.create_license(id, x_preemo_workspace_id)
        print("The response of LicensesApi->create_license:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling LicensesApi->create_license: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.gradient.ai/api

Class Method HTTP request Description
LicensesApi create_license POST /licenses/{id} Agree to the license
LicensesApi get_license GET /licenses/{id} Describe license
LicensesApi get_model_licenses GET /models/{id}/licenses License info for model
ModelsApi create_model POST /models Create model
ModelsApi delete_model DELETE /models/{id} Delete model.
ModelsApi get_model GET /models/{id} Describe model
ModelsApi get_model_licenses GET /models/{id}/licenses License info for model
ModelsApi list_models GET /models List available models
ModelsApi query_model GET /models/{id}/queries Query model
ModelsApi train_model PUT /models/{id} Train model

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)

Author

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

gradientai-1.0.0.dev2.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

gradientai-1.0.0.dev2-py3-none-any.whl (57.7 kB view details)

Uploaded Python 3

File details

Details for the file gradientai-1.0.0.dev2.tar.gz.

File metadata

  • Download URL: gradientai-1.0.0.dev2.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for gradientai-1.0.0.dev2.tar.gz
Algorithm Hash digest
SHA256 d5151ff7d7172c1b2439f0b526451934337a080035652d9d2039fdb8bb3f20db
MD5 c6c22de3093d11088a5028493788b71a
BLAKE2b-256 4593e8cbcc0045a1e1c3ec6329459ad75aa3ddb543758e0bb55634367843748a

See more details on using hashes here.

File details

Details for the file gradientai-1.0.0.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for gradientai-1.0.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 d536a06eb18e3d4af3e56ef303989a60638c4ecb8968266d68f11216f91367cd
MD5 e04f193e20c1d72cb1f804b99285577a
BLAKE2b-256 d2b51ac7763726e2a4e92c0953bafdebd519bf907f76ec281ff8fae0ef64263a

See more details on using hashes here.

Supported by

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