Runloop Python SDK Documentation¶
The Runloop Python SDK provides a Pythonic, object-oriented interface for managing devboxes, blueprints, snapshots, and storage objects. The SDK offers both synchronous and asynchronous variants to match your runtime requirements.
Installation¶
Install the SDK using pip:
pip install runloop_api_client
Quick Start¶
Synchronous Example¶
from runloop_api_client import RunloopSDK
runloop = RunloopSDK()
# Create a ready-to-use devbox
with runloop.devbox.create(name="my-devbox") as devbox:
result = devbox.cmd.exec(command="echo 'Hello from Runloop!'")
print(result.stdout())
Asynchronous Example¶
import asyncio
from runloop_api_client import AsyncRunloopSDK
async def main():
runloop = AsyncRunloopSDK()
async with await runloop.devbox.create(name="my-devbox") as devbox:
result = await devbox.cmd.exec(command="echo 'Hello from Runloop!'")
print(await result.stdout())
asyncio.run(main())