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 RuntaScripts, CLI tools, notebooks, and synchronous applications Async AsyncRuntaasyncio services and concurrent runtime operations
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 RuntaClient Main synchronous client for runtimes, secrets, and checkpoints. RuntimeRuntime handle Controls lifecycle, commands, files, networking, and secrets for one runtime. RuntimeManagerManager Creates, lists, and resolves runtimes for a synchronous client. SecretManagerManager Manages stored tenant secrets and default secret-injection stubs. CheckpointManagerManager Lists, resolves, waits for, and deletes tenant checkpoints. EgressManagerManager Reads and updates the network egress policy for a runtime. FileManagerManager Reads, writes, uploads, and downloads files for a runtime. RuntimeSecretManagerManager Configures and inspects secret-injection stubs for a runtime. RuntimeCheckpointManagerManager Creates, lists, and deletes checkpoints for a runtime.
Component Role Description AsyncRuntaClient Main asynchronous client for runtimes, secrets, and checkpoints. AsyncRuntimeRuntime handle Controls one runtime through asynchronous lifecycle and I/O operations. AsyncRuntimeManagerManager Creates, lists, and resolves runtimes asynchronously. AsyncSecretManagerManager Manages stored tenant secrets and default stubs asynchronously. AsyncCheckpointManagerManager Lists, resolves, waits for, and deletes checkpoints asynchronously. AsyncEgressManagerManager Reads and updates a runtime egress policy asynchronously. AsyncFileManagerManager Reads, writes, uploads, and downloads runtime files asynchronously. AsyncRuntimeSecretManagerManager Configures runtime secret-injection stubs asynchronously. AsyncRuntimeCheckpointManagerManager Creates, lists, and deletes runtime checkpoints asynchronously.