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.

StyleEntry pointBest for
SyncRuntaScripts, CLI tools, notebooks, and synchronous applications
AsyncAsyncRuntaasyncio 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)
ComponentRoleDescription
RuntaClientMain synchronous client for runtimes, secrets, and checkpoints.
RuntimeRuntime handleControls lifecycle, commands, files, networking, and secrets for one runtime.
RuntimeManagerManagerCreates, lists, and resolves runtimes for a synchronous client.
SecretManagerManagerManages stored tenant secrets and default secret-injection stubs.
CheckpointManagerManagerLists, resolves, waits for, and deletes tenant checkpoints.
EgressManagerManagerReads and updates the network egress policy for a runtime.
FileManagerManagerReads, writes, uploads, and downloads files for a runtime.
RuntimeSecretManagerManagerConfigures and inspects secret-injection stubs for a runtime.
RuntimeCheckpointManagerManagerCreates, lists, and deletes checkpoints for a runtime.
ComponentRoleDescription
AsyncRuntaClientMain asynchronous client for runtimes, secrets, and checkpoints.
AsyncRuntimeRuntime handleControls one runtime through asynchronous lifecycle and I/O operations.
AsyncRuntimeManagerManagerCreates, lists, and resolves runtimes asynchronously.
AsyncSecretManagerManagerManages stored tenant secrets and default stubs asynchronously.
AsyncCheckpointManagerManagerLists, resolves, waits for, and deletes checkpoints asynchronously.
AsyncEgressManagerManagerReads and updates a runtime egress policy asynchronously.
AsyncFileManagerManagerReads, writes, uploads, and downloads runtime files asynchronously.
AsyncRuntimeSecretManagerManagerConfigures runtime secret-injection stubs asynchronously.
AsyncRuntimeCheckpointManagerManagerCreates, lists, and deletes runtime checkpoints asynchronously.
ComponentRoleDescription
CheckpointInfoModelCheckpoint metadata returned by the Runta API.
CommandResultModelBuffered command result returned by runtime execution methods.
DefaultSecretStubInfoModelDefault secret stub metadata copied to new runtimes.
RuntimeInfoModelRuntime metadata returned by the Runta API.
SecretInfoModelStored tenant secret metadata.
SecretStubInfoModelRuntime-scoped secret stub metadata.
CreateRuntimeResourceRequestsConfigurationResource requests accepted while creating a runtime.
CreateRuntimeResourcesConfigurationStructured resource configuration used while creating a runtime.
EgressPolicyConfigurationNetwork egress policy attached to a runtime.
IngressSpecConfigurationIngress protocol and runtime port mapping.
PatchRuntimeResourceRequestsConfigurationResource requests accepted while updating a runtime.
PatchRuntimeResourcesConfigurationStructured resource configuration used while updating a runtime.
RuntimeResourceLimitsConfigurationMaximum runtime memory allocation.
RuntimeResourceRequestsConfigurationRequested runtime memory and CPU allocation.
RuntimeResourcesConfigurationEffective runtime resource requests and limits.
SecretStubConfigConfigurationHeader or query-parameter injection configuration for a secret stub.
CheckpointStateEnumCreation state reported for a checkpoint.
EgressModeEnumSupported runtime egress policy modes.
RuntimeStatusEnumLifecycle state reported for a runtime.
ApiErrorErrorControl-plane RPC failed.
CommandErrorErrorA runtime command failed.
ConfigErrorErrorConfiguration is missing or invalid.
RuntaErrorErrorBase class for SDK errors.