Skip to content

adriangonz/seldon-deploy-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seldon Deploy SDK

This repository holds different SDK implementations to interact with the Seldon Deploy API.

⚠️ NOTE: The Seldon Deploy SDK only supports Seldon Deploy >=0.9.

Python

Installation

To install the Python version of the SDK run:

pip install seldon-deploy-sdk

Usage

The Python version of the SDK includes support for common authentication workflows.

You can see an example usage below:

from seldon_deploy_sdk import EnvironmentApi, Configuration, ApiClient
from seldon_deploy_sdk.auth import OIDCAuthenticator

config = Configuration()
config.host = "http://X.X.X.X/seldon-deploy/api/v1alpha1"
config.oidc_client_id = "sd-api"
config.oidc_server = "http://X.X.X.X/auth/realms/deploy-realm"
config.username = "*******"
config.password = "*******"
config.auth_method = 'password_grant'

auth = OIDCAuthenticator(config)
config.access_token = auth.authenticate()

api_client = ApiClient(config, auth)

env_api = EnvironmentApi(api_client)
user = env_api.read_user()

print(user)

You can find more details on the Python SDK documentation.

SDK Generation

To generate a new version of the SDK, you can use the Makefile targets available. For example, for Python you could do:

make python

Templates

There is some custom logic added on top of each client. These extra files and customisation can be found in the ./templates folder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.2%
  • Mustache 1.6%
  • Other 0.2%