The Python Server-Side SDK provides convenient access to the Server-Side API from any Python 3.8+ application. The SDK offers the following features:
- Type Safety: Full type hints and Pydantic models
- Async Support: Both synchronous and asynchronous clients
- Automatic Retries: Built-in retry logic for transient failures
For detailed documentation, examples, and advanced usage, visit the Python Server-Side SDK repository.
Install
pip install miru_server_sdk
Quick start
import os
from miru_server_sdk import Miru
# Initialize the client with your API key
client = Miru(
api_key=os.environ.get("MIRU_API_KEY"), # defaults to MIRU_API_KEY env var
)
# List devices in your workspace
devices = client.devices.list()
print(f"Found {len(devices.data)} devices")
# Get a specific device
device = client.devices.retrieve(device_id="dvc_123")
print(f"Device: {device.name}")
Async usage
The SDK also provides full async support:
import os
import asyncio
from miru_server_sdk import AsyncMiru
client = AsyncMiru(
api_key=os.environ.get("MIRU_API_KEY"), # uses the MIRU_API_KEY environment variable
)
async def main() -> None:
devices = await client.devices.list()
print(f"Found {len(devices.data)} devices")
# Get a specific device
device = await client.devices.retrieve(device_id="dvc_123")
print(f"Device: {device.name}")
asyncio.run(main())
Last modified on February 5, 2026