# 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
```python
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])
```
Raw data
{
"_id": null,
"home_page": "https://www.sap.com/",
"name": "ai-api-client-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "SAP AI Core",
"author": "SAP SE",
"author_email": null,
"download_url": "https://pypi.python.org/pypi/ai-api-client-sdk",
"platform": "Windows",
"description": "\n# SAP AI API Client SDK\n\nThe 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.\n\nThe 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/>.\n\nFor 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>.\n\n## Example Usage\n\n```python\nfrom ai_api_client_sdk.ai_api_v2_client import AIAPIV2Client\n\n# Instantiate the client\nclient = AIAPIV2Client(base_url=AI_API_URL,\n auth_url=AUTH_URL,\n client_id=CLIENT_ID,\n client_secret=CLIENT_SECRET, resource_group=RESOURCE_GROUP)\n\n# Make some queries, e.g.\nscenarios = client.scenario.query()\n\nfor scenario in scenarios.resources:\n print(scenario.id)\n\n# Find a deployable executables in scenario 1111\nexecutables = client.executable.query(scenario_id=\"1111\")\nfor executable in executables.resources:\n if executable.deployable == False:\n break\nprint(executable.id)\n\n# Inspect the required parameters for the executable\nfor parameter in executable.parameters:\n print(\"Parameter:{}, Type: {}\".format(parameter.name, parameter.type))\n\n# Create a configuration\nparameter_epochs = ParameterBinding(key=\"training-epochs\", value=\"1\")\nmyConfiguration = client.configuration.create(name=\"test\", scenario_id=\"1111\" executable_id=\"argo-mnist-0.2.1\", parameter_bindings=[parameter_epochs])\n```\n\n",
"bugtrack_url": null,
"license": "SAP DEVELOPER LICENSE AGREEMENT",
"summary": "AI API Client SDK",
"version": "2.4.0",
"project_urls": {
"Download": "https://pypi.python.org/pypi/ai-api-client-sdk",
"Homepage": "https://www.sap.com/"
},
"split_keywords": [
"sap",
"ai",
"core"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a6974f311c781e2ca3e3802fa29de2b407fe4e1a5374a25cf60d9a82f7994c2e",
"md5": "51772ad5803b70fc5d9bf8aa0de99750",
"sha256": "6a42f089723340bea9ca062a315f3fd48131d5e60b0a9480beeb4003ac9e4b3c"
},
"downloads": -1,
"filename": "ai_api_client_sdk-2.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "51772ad5803b70fc5d9bf8aa0de99750",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 264023,
"upload_time": "2024-11-04T14:28:19",
"upload_time_iso_8601": "2024-11-04T14:28:19.712957Z",
"url": "https://files.pythonhosted.org/packages/a6/97/4f311c781e2ca3e3802fa29de2b407fe4e1a5374a25cf60d9a82f7994c2e/ai_api_client_sdk-2.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-04 14:28:19",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ai-api-client-sdk"
}