Skip to content

Python SDK Reference

Choose Sync for regular scripts and synchronous applications, or Async for asyncio services and concurrent runtime operations. Both styles use the same Shared models, configuration objects, enums, and errors.

Style Entry point Best for
Sync Runta Scripts, CLI tools, notebooks, and synchronous applications
Async AsyncRunta asyncio services and concurrent runtime operations
from runta import Runta
with Runta() as client:
runtime = client.runtimes.create()
result = runtime.exec("python --version")
print(result.stdout_text)
from runta import AsyncRunta
async with AsyncRunta() as client:
runtime = await client.runtimes.create()
result = await runtime.exec("python --version")
print(result.stdout_text)
Component Role Description
Runta Client Main synchronous client for runtimes, secrets, and checkpoints.
Runtime Runtime handle Controls lifecycle, commands, files, networking, and secrets for one runtime.
RuntimeManager Manager Creates, lists, and resolves runtimes for a synchronous client.
SecretManager Manager Manages stored tenant secrets and default secret-injection stubs.
CheckpointManager Manager Lists, resolves, waits for, and deletes tenant checkpoints.
EgressManager Manager Reads and updates the network egress policy for a runtime.
FileManager Manager Reads, writes, uploads, and downloads files for a runtime.
RuntimeSecretManager Manager Configures and inspects secret-injection stubs for a runtime.
RuntimeCheckpointManager Manager Creates, lists, and deletes checkpoints for a runtime.
Component Role Description
AsyncRunta Client Main asynchronous client for runtimes, secrets, and checkpoints.
AsyncRuntime Runtime handle Controls one runtime through asynchronous lifecycle and I/O operations.
AsyncRuntimeManager Manager Creates, lists, and resolves runtimes asynchronously.
AsyncSecretManager Manager Manages stored tenant secrets and default stubs asynchronously.
AsyncCheckpointManager Manager Lists, resolves, waits for, and deletes checkpoints asynchronously.
AsyncEgressManager Manager Reads and updates a runtime egress policy asynchronously.
AsyncFileManager Manager Reads, writes, uploads, and downloads runtime files asynchronously.
AsyncRuntimeSecretManager Manager Configures runtime secret-injection stubs asynchronously.
AsyncRuntimeCheckpointManager Manager Creates, lists, and deletes runtime checkpoints asynchronously.
Component Role Description
CheckpointInfo Model Checkpoint metadata returned by the Runta API.
CommandResult Model Buffered command result returned by runtime execution methods.
DefaultSecretStubInfo Model Default secret stub metadata copied to new runtimes.
RuntimeInfo Model Runtime metadata returned by the Runta API.
SecretInfo Model Stored tenant secret metadata.
SecretStubInfo Model Runtime-scoped secret stub metadata.
CreateRuntimeResourceRequests Configuration Resource requests accepted while creating a runtime.
CreateRuntimeResources Configuration Structured resource configuration used while creating a runtime.
EgressPolicy Configuration Network egress policy attached to a runtime.
IngressSpec Configuration Ingress protocol and runtime port mapping.
PatchRuntimeResourceRequests Configuration Resource requests accepted while updating a runtime.
PatchRuntimeResources Configuration Structured resource configuration used while updating a runtime.
RuntimeResourceLimits Configuration Maximum runtime memory allocation.
RuntimeResourceRequests Configuration Requested runtime memory and CPU allocation.
RuntimeResources Configuration Effective runtime resource requests and limits.
SecretStubConfig Configuration Header or query-parameter injection configuration for a secret stub.
CheckpointState Enum Creation state reported for a checkpoint.
EgressMode Enum Supported runtime egress policy modes.
RuntimeStatus Enum Lifecycle state reported for a runtime.
ApiError Error Control-plane RPC failed.
CommandError Error A runtime command failed.
ConfigError Error Configuration is missing or invalid.
RuntaError Error Base class for SDK errors.