Installation & Setup
Install the RunRL Python SDK and configure authentication.
Installation & Setup
The RunRL Python SDK (runrl) provides a typed client for the RunRL REST API. This page covers
installation, authentication, and a minimal smoke test.
1. Install the SDK
pip install runrl==0.2.1The package supports Python 3.9+ and ships with both synchronous and asynchronous clients. It does not install heavy ML dependencies—only standard HTTP tooling (httpx + pydantic).
2. Configure Credentials
Generate an API key from the RunRL dashboard and expose it to your environment. The client reads the
RUNRL_API_KEY variable automatically; you can also pass it explicitly.
export RUNRL_API_KEY="rl_your_api_key"
# Optional: target staging or local environments
export RUNRL_BASE_URL="https://staging.runrl.com/api/v1"3. Verify Connectivity
from runrl import RunRLClient
client = RunRLClient()
print(client.config.base_url)
# list your files to ensure auth works
files = client.files.list(per_page=5)
for file in files.items:
print(file.id, file.name, file.type)If this returns a AuthenticationError, double-check the API key. Network or SSL errors typically
indicate proxies/firewalls blocking the request.
4. Optional: Async Client
import asyncio
from runrl import AsyncRunRLClient
async def main():
async with AsyncRunRLClient() as client:
files = await client.files.list(per_page=3)
print([f.name for f in files.items])
asyncio.run(main())5. Local Development Helpers
- User agent: Overwrite via
RunRLClient(user_agent="my-app/0.1.0"). - Timeouts:
RunRLClient(timeout=60)adjusts HTTP timeouts. - Polling intervals:
RunRLClient(poll_interval=10)tunes future polling frequency.
With the SDK installed and authenticated, continue to Launch Your First Run or jump straight to the API Reference.