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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efe836ef3424d14f941562125dabc1c6e6c9be4fe049dc72e9a86d206e01e560
|
|
| MD5 |
6e5924bf72aa78593d95254d3a90cf2a
|
|
| BLAKE2b-256 |
0d7647e3fd28cf95fb5c7e042cc1e0925f1beb559edda75e8a8796d2534dabf0
|
Provenance
The following attestation bundles were made for trentai_sdk-0.0.9.tar.gz:
Publisher:
sdk-release.yaml on trnt-ai/sdks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trentai_sdk-0.0.9.tar.gz -
Subject digest:
efe836ef3424d14f941562125dabc1c6e6c9be4fe049dc72e9a86d206e01e560 - Sigstore transparency entry: 1085843307
- Sigstore integration time:
-
Permalink:
trnt-ai/sdks@df9fb3fff95177819ae8c41596c5948fe0de8342 -
Branch / Tag:
refs/tags/v0.0.9 - Owner: https://github.com/trnt-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-release.yaml@df9fb3fff95177819ae8c41596c5948fe0de8342 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f47bdf3797872355a0ed12f4612fc5c347ddb05b864544883f73fdaf5de8b266
|
|
| MD5 |
42045f5530757fcd728f7556da2e573a
|
|
| BLAKE2b-256 |
8475c0a2fae615fe226f080d178974d87fb38778bc8cd89c3cc21e4f40d71924
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trentai_sdk-0.0.9-py3-none-any.whl -
Subject digest:
f47bdf3797872355a0ed12f4612fc5c347ddb05b864544883f73fdaf5de8b266 - Sigstore transparency entry: 1085843355
- Sigstore integration time:
-
Permalink:
trnt-ai/sdks@df9fb3fff95177819ae8c41596c5948fe0de8342 -
Branch / Tag:
refs/tags/v0.0.9 - Owner: https://github.com/trnt-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-release.yaml@df9fb3fff95177819ae8c41596c5948fe0de8342 -
Trigger Event:
push
-
Statement type: