Simplismart client methods below (e.g. client.create_deployment(...)).
create_deployment
Creates a deployment for a model repo.
Use env for model repo UUID and organization ID (e.g.
ORG_ID); do not hardcode secrets.DeploymentCreate
A deployment scales using one of two approaches, and they cannot be combined:
- Traffic-based (
scale_to_zero_enabled=True): scales down when the deployment is idle. - Cron-based / schedule-based (
cronScaling): runs on a fixed schedule. Setmin_pod_replicas=0if you also want it to scale to zero outside the scheduled window.
AutoscaleConfig
The
percentile field is only supported when metric is set to latency.Cron-based Scaling
Cron-based scaling (called schedule-based scaling on the Simplismart platform) runs your deployment on a fixed schedule. Use it when traffic is predictable: for example, keep the deployment up during weekday business hours and shut it down outside that window. Add acronScaling config to autoscale_config, and set min_pod_replicas=0 if you want it to scale to zero outside the scheduled window.
desiredReplicas) on weekdays 9am to 6pm UTC, and because min_pod_replicas=0 it scales to zero outside that window.
CronScalingRule fields
Each entry incronScaling is validated against this shape. Unknown keys are rejected.
list_deployments
Lists deployments with optional filtering.
Deployment Status Options
list_model_deployments
Lists all model deployments for an organization.
get_model_deployment
Gets deployment details by ID. Set DEPLOYMENT_ID in env or use an id from list_deployments.
uuid, name, status, model_repo, org, autoscale_config, healthcheck, ports, min_pod_replicas, max_pod_replicas, etc.
get_deployment
Get deployment details by ID.
update_deployment
Updates deployment configuration.
stop_deployment
Stops a running deployment.
start_deployment
Starts a stopped deployment.
restart_deployment
Restarts a deployment.
fetch_deployment_health
Gets deployment health status.
update_deployment_autoscaling
Updates the autoscaling configuration of a live deployment.
cronScaling, targets, scaleDownBehavior, and scaleUpBehavior are top-level fields here — unlike create_private_deployment / update_deployment, where they nest inside autoscale_config. Two rules are enforced client-side before the request, so you get a clear ValueError instead of a backend 400:min_replicas=0is only allowed together withcron_scaling.scale_to_zeroandcron_scalingcannot both be set.
AutoscaleTarget and HPAScalingBehavior / HPAScalingPolicy validate locally before the request: percentile is only valid for the latency metric and must be one of 50, 75, 90, 95; HPA policy type is Pods or Percent, value must be a positive integer (≤ 100 for Percent), periodSeconds ∈ [1, 1800], and stabilizationWindowSeconds ∈ [0, 3600].delete_deployment
Deletes a deployment.
Error Handling
The SDK raisesSimplismartError for all API errors.
SimplismartError Attributes
BYOC Deployment
Create a BYOC deployment with a payload (cluster, nodegroup, etc.). See Bring your own compute and Deploy on imported cluster.create_byoc_deployment takes a raw dict (no typed model). BYOC scheduling fields such as nodegroups and cluster are intentionally not part of DeploymentCreate.