Skip to main content

AI API Client SDK

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

SAP AI API Client SDK

The AI API client SDK is a Python-based SDK that enables you to access the AI API using Python methods and data structures. You can use the Client SDK to test AI API.

The client SDK can be used with any implementation of AI API. Because it is independent of the runtime implementation, it doesn't provide access to runtime-specific APIs. For example, maintaining object store secrets is specific to SAP AI Core and is therefore not included in the AI API client SDK. Check for SDK offerings for your runtime that let you access any runtime-specific APIs. For more information on SAP AI Core SDK see https://pypi.org/project/ai-core-sdk/.

For more information on the AI API specification, SAP AI Core and related topics, please refer to https://help.sap.com/docs/AI_CORE?version=CLOUD.

Example Usage

from ai_api_client_sdk.ai_api_v2_client import AIAPIV2Client

# Instantiate the client
client = AIAPIV2Client(base_url=AI_API_URL,
    auth_url=AUTH_URL,
    client_id=CLIENT_ID,
    client_secret=CLIENT_SECRET, resource_group=RESOURCE_GROUP)

# Make some queries, e.g.
scenarios = client.scenario.query()

for scenario in scenarios.resources:
    print(scenario.id)

# Find a deployable executables in scenario 1111
executables = client.executable.query(scenario_id="1111")
for executable in executables.resources:
    if executable.deployable == False:
        break
print(executable.id)

# Inspect the required parameters for the executable
for parameter in executable.parameters:
    print("Parameter:{}, Type: {}".format(parameter.name, parameter.type))

# Create a configuration
parameter_epochs = ParameterBinding(key="training-epochs", value="1")
myConfiguration = client.configuration.create(name="test", scenario_id="1111" executable_id="argo-mnist-0.2.1", parameter_bindings=[parameter_epochs])

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.

ai_api_client_sdk-1.17.5-py3-none-any.whl (167.7 kB view details)

Uploaded Python 3

File details

Details for the file ai_api_client_sdk-1.17.5-py3-none-any.whl.

File metadata

  • Download URL: ai_api_client_sdk-1.17.5-py3-none-any.whl
  • Upload date:
  • Size: 167.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.5.3

File hashes

Hashes for ai_api_client_sdk-1.17.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b48bed29fbe5492cc32469bab018e447b428e121326e751915992a84176fe0df
MD5 34681bcfdcbae9342facba85ed398305
BLAKE2b-256 ccb32a531282c873c359d11b572cac90f057339c4dfd38489cda30db1163f011

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