GMI Sandbox SDK Reference
Python SDK for the GMI Sandbox control plane and sandbox data plane.Installation
Configuration
The client reads these environment variables when explicit arguments are not provided:Client
client.health() returns local client information:
Basic Workflow
idc_name is optional for sandbox and template creation: when omitted, the service falls back to the organization’s configured default IDC.
Sandboxes
client.sandboxes.create()
Returns a
Sandbox.
client.sandboxes.list()
state accepts a string or a sequence of strings. Metadata is encoded as metadata[key] query parameters.
client.sandboxes.get()
client.sandboxes.connect()
Sandbox
Properties:
Lifecycle states include
provisioning, running, checkpointing, updating, and failed.
Methods:
Files
All file methods use the sandbox data plane and requireconnect() first.
download() always returns bytes. destination is an additional local write.
Command Execution
Execution properties:
pending, running, canceling, succeeded, failed, and canceled.
Methods:
Templates
Create
resources supports preset or custom values.
Preset:
idempotency_key is required for template creation.
Returns a Template. The returned object can be used with template instance methods such as update(), delete(), builds(), build(), and build_logs().
List and Get
Update and Delete
idc_name is reused automatically when present in the template response.
Builds and Logs
Product Specifications
Pagination
List methods return aPage object:
Page fields:
Errors
All SDK exceptions derive fromSandboxSDKError.
APIError fields: