Konan Types

class konan_sdk.konan_types.KonanCredentials(email: str, password: str)

Bases: object

Credentials to use to authenticate with the Konan API.

__init__(email: str, password: str) None

Initialize a new KonanCredentials.

Parameters
  • email (str) – email address

  • password (str) – password

class konan_sdk.konan_types.KonanTokens(access: str, refresh: str)

Bases: object

API Token retrieved by successfully authenticating with the Konan API.

__init__(access: str, refresh: str) None

Initialize a new KonanTokens.

Parameters
  • access (str) – Konan access token

  • refresh (str) – Konan refresh token

class konan_sdk.konan_types.KonanPrediction(uuid: str, output: Dict)

Bases: object

Successful prediction registered with the Konan API.

__init__(uuid: str, output: Dict) None

Initialize a new KonanPrediction.

Parameters
  • uuid (str) – Prediction uuid

  • output (Dict) – Live model output

class konan_sdk.konan_types.KonanDockerCredentials(username: str, password: str)

Bases: object

Credentials to use to authenticate with the Docker ContainerRegistry.

__init__(username: str, password: str) None

Initialize a new KonanDockerCredentials.

Parameters
  • username (str) – username

  • password (str) – password

class konan_sdk.konan_types.KonanDockerImage(url: str, exposed_port: int)

Bases: object

Docker image to use for Konan Model creation.

__init__(url: str, exposed_port: int) None

Initialize a new KonanDockerImage.

Parameters
  • url (str) – URL of the docker image

  • exposed_port (int) – Port number that hte docker image exposes its services at

class konan_sdk.konan_types.KonanDeploymentCreationRequest(name: str, docker_credentials: konan_sdk.konan_types.KonanDockerCredentials, docker_image: konan_sdk.konan_types.KonanDockerImage)

Bases: object

Information required to issue a create a new Konan Deployment.

__init__(name: str, docker_credentials: konan_sdk.konan_types.KonanDockerCredentials, docker_image: konan_sdk.konan_types.KonanDockerImage) None

Initialize a new KonanDeploymentCreationRequest.

Parameters
  • name (str) – Name of the new Konan Deployment.

  • docker_credentials (KonanDockerCredentials) – Credentials of the Docker Container Registry to use

  • docker_image (KonanDockerImage) – Docker Image to use as the Konan Model

class konan_sdk.konan_types.KonanDeploymentErrorType(value)

Bases: enum.Enum

Different error types possibly returned by the Konan API when attempting to create a new Konan Deployment.

Parameters

Enum ([type]) – [description]

Image = 'image'

Deployment Image Error

HealthEndpoint = 'health_endpoint'

Healthz Error

ExposedPort = 'exposed_port'

Exposed Port Error

class konan_sdk.konan_types.KonanDeploymentError(type: konan_sdk.konan_types.KonanDeploymentErrorType, message: str)

Bases: object

Error returned by the Konan API when attempting to create a new Konan Deployment.

__init__(type: konan_sdk.konan_types.KonanDeploymentErrorType, message: str) None

Initialize a new KonanDeploymentError.

Parameters
class konan_sdk.konan_types.KonanDeployment(uuid: str, name: str, created_at: datetime.datetime)

Bases: object

Konan Deployment.

__init__(uuid: str, name: str, created_at: datetime.datetime) None

Initialize a new KonanDeployment.

Parameters
  • uuid (str) – UUID of the Konan Deployment

  • name (str) – Name of the Konan Deployment

  • created_at (datetime.datetime) – Konan Deployment creation date and time

class konan_sdk.konan_types.KonanDeploymentCreationResponse(deployment: konan_sdk.konan_types.KonanDeployment, errors: List[konan_sdk.konan_types.KonanDeploymentError], container_logs: str)

Bases: object

Information returned by the Konan API when attempting to create a new Konan Deployment.

__init__(deployment: konan_sdk.konan_types.KonanDeployment, errors: List[konan_sdk.konan_types.KonanDeploymentError], container_logs: str) None

Initialize a new KonanDeploymentCreationResponse.

Parameters
  • deployment (KonanDeployment) – Konan Deployment Created

  • errors (List[KonanDeploymentError]) – Errors encountered when attempting to create the new Konan Deployment

  • container_logs (str) – Container logs genered when creating the new Konan Deployment

class konan_sdk.konan_types.KonanTimeWindow(start_time: datetime.datetime, end_time: datetime.datetime)

Bases: object

Konan Time Window of certain events.

__init__(start_time: datetime.datetime, end_time: datetime.datetime) None

Initialize a new KonanTimeWindow.

Parameters
class konan_sdk.konan_types.KonanFeedbackSubmission(prediction_uuid: str, target: Union[Dict, str])

Bases: object

Konan Feedback to send to the Konan API.

__init__(prediction_uuid: str, target: Union[Dict, str]) None

Initialize a new KonanFeedbackSubmission.

Parameters
  • prediction_uuid (str) – Prediction UUID to provide the Feedback for

  • target (Union[Dict, str]) – Ground Truth Target

class konan_sdk.konan_types.KonanFeedbackStatus(prediction_uuid: str, status: int, message: str)

Bases: object

Feedback Status returned by the Konan API.

__init__(prediction_uuid: str, status: int, message: str) None

Initialize a new KonanFeedbackStatus.

Parameters
  • prediction_uuid (str) – Prediction UUID

  • status (int) – Feedback status integer

  • message (str) – Feedback status message

class konan_sdk.konan_types.KonanFeedbacksResult(feedbacks_status: List[konan_sdk.konan_types.KonanFeedbackStatus], success_count: int, failure_count: int, total_count: int)

Bases: object

Bulk results of the Konan API when submitting Feedbacks.

__init__(feedbacks_status: List[konan_sdk.konan_types.KonanFeedbackStatus], success_count: int, failure_count: int, total_count: int) None

Initialize a new KonanFeedbacksResult.

Parameters
  • feedbacks_status (List[KonanFeedbackStatus]) – Status of all submitted Feedbacks

  • success_count (int) – Number of successfully created Feedbacks

  • failure_count (int) – Number of failed Feedbacks to create

  • total_count (int) – Total number of Feedbacks submitted