Konan Types
- class konan_sdk.konan_types.KonanCredentials(email: str, password: str)
Bases:
object
Credentials to use to authenticate with the Konan API.
- class konan_sdk.konan_types.KonanTokens(access: str, refresh: str)
Bases:
object
API Token retrieved by successfully authenticating with the Konan API.
- class konan_sdk.konan_types.KonanPrediction(uuid: str, output: Dict)
Bases:
object
Successful prediction registered with the Konan API.
- class konan_sdk.konan_types.KonanDockerCredentials(username: str, password: str)
Bases:
object
Credentials to use to authenticate with the Docker ContainerRegistry.
- class konan_sdk.konan_types.KonanDockerImage(url: str, exposed_port: int)
Bases:
object
Docker image to use for Konan Model creation.
- 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
type (KonanDeploymentErrorType) – Type of the error encountered
message (str) – Message of the error encountered
- 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
start_time (datetime.datetime) – Starting date and time of events to consider
end_time (datetime.datetime) – Ending date and time of events to consider
- class konan_sdk.konan_types.KonanFeedbackSubmission(prediction_uuid: str, target: Union[Dict, str])
Bases:
object
Konan Feedback to send to the Konan API.
- class konan_sdk.konan_types.KonanFeedbackStatus(prediction_uuid: str, status: int, message: str)
Bases:
object
Feedback Status returned by the Konan API.
- 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