Skip to main content

trentai sdk

This project has been archived.

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

Project description

trentai-sdk

This service serves inference requests for prompt guard.

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

  • API version: 0.0.9
  • Package version: 0.0.9
  • Generator version: 7.20.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://trent.ai

Requirements.

Python 3.9++

Installation & Usage

pip install

Install the SDK from PyPI:

pip install trentai-sdk

Then import the package:

import trentai

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import trentai
from trentai.rest import ApiException
from pprint import pprint

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

# 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 API key authorization: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with trentai.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = trentai.(api_client)
    
    try:
        api_response = api_instance.()
        print("The response of ->:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ->: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.trent.ai/inference

Class Method HTTP request Description
PromptGuardApi analyze_prompt POST /v1/prompt-guard Analyze prompt for security threats

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

apiKey

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

Author

brajesh@trent.ai

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

trentai_sdk-0.0.9.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

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

trentai_sdk-0.0.9-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file trentai_sdk-0.0.9.tar.gz.

File metadata

  • Download URL: trentai_sdk-0.0.9.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for trentai_sdk-0.0.9.tar.gz
Algorithm Hash digest
SHA256 efe836ef3424d14f941562125dabc1c6e6c9be4fe049dc72e9a86d206e01e560
MD5 6e5924bf72aa78593d95254d3a90cf2a
BLAKE2b-256 0d7647e3fd28cf95fb5c7e042cc1e0925f1beb559edda75e8a8796d2534dabf0

See more details on using hashes here.

Provenance

The following attestation bundles were made for trentai_sdk-0.0.9.tar.gz:

Publisher: sdk-release.yaml on trnt-ai/sdks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trentai_sdk-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: trentai_sdk-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for trentai_sdk-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f47bdf3797872355a0ed12f4612fc5c347ddb05b864544883f73fdaf5de8b266
MD5 42045f5530757fcd728f7556da2e573a
BLAKE2b-256 8475c0a2fae615fe226f080d178974d87fb38778bc8cd89c3cc21e4f40d71924

See more details on using hashes here.

Provenance

The following attestation bundles were made for trentai_sdk-0.0.9-py3-none-any.whl:

Publisher: sdk-release.yaml on trnt-ai/sdks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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