Official Python SDK for the RunRL API
Project description
RunRL Python SDK (v0.2.0)
The RunRL Python SDK provides a friendly, fully typed interface to the RunRL REST API. It supports both synchronous and asynchronous workflows and introduces a principled futures system inspired by distributed ML orchestration platforms. Use the SDK to automate training runs, monitor progress, manipulate files, deploy checkpoints, and integrate RunRL into your ML pipelines.
Installation
pip install runrl
Quick Start
from runrl import RunRLClient
client = RunRLClient(api_key="rl_your_api_key")
# Upload a reward function
reward = client.files.create_from_content(
name="latency_reward",
content="""def reward_fn(prompt, response):\n return 1 - response['latency']""",
file_type="reward_function",
)
# Launch a training run (returns a Future immediately)
future = client.runs.create(
model="Qwen/Qwen3-8B",
prompt_file_id="PROMPT_UUID",
reward_file_id=reward.id,
completion_length=1024,
)
# Wait for completion (polls RunRL behind the scenes)
run = future.result()
print(run.status)
print(run.metrics_url)
Features
- Unified Client – simple configuration, automatic retries, pagination helpers.
- Futures System – wait for long-running operations with rich status metadata.
- Sync & Async – mirrored APIs for both paradigms (
RunRLClient/AsyncRunRLClient). - Typed Models – Pydantic models to validate API responses and guide development.
- Extensive Docs – tutorials, futures guide, and endpoint-level reference in
docs/.
See docs/index.md for the full documentation set.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file runrl-0.2.1.tar.gz.
File metadata
- Download URL: runrl-0.2.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
533c25ebda5116450a32254cb243951f3db7e2cf19f72a868c751b73664f50e0
|
|
| MD5 |
c0c9cc6e5caac1dbae28dd4340af023c
|
|
| BLAKE2b-256 |
952470ea207ee9ac6dbcea1f72e3d0b1c29c838ab0e3d6c775903258d690e9b9
|
File details
Details for the file runrl-0.2.1-py3-none-any.whl.
File metadata
- Download URL: runrl-0.2.1-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6277acc95bf4fdc796867923cf50cf4f0fe661dbbd03a4231e5309c4059f827d
|
|
| MD5 |
40a40ed928b0f1e3d58729a30e168528
|
|
| BLAKE2b-256 |
5aa63e83e48a2164a65827981fe450761d210fe912fa4093b1c12e5a8c581d80
|