Skip to content

Commit 14c45c0

Browse files
committed
Merge branch 'main' of github.com:runloopai/api-client-python
2 parents fe9abbd + 1bd9450 commit 14c45c0

68 files changed

Lines changed: 2413 additions & 386 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.69.0"
2+
".": "1.0.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 97
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-0dd27c6877ed117c50fe0af95cee4d54c646d2484368e131b8e3315eba3fffcc.yml
3-
openapi_spec_hash: 68f663172747aef8e66f2b23289efc7b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-cb2d725f71e87810cd872eacd70e867ca10f94980fdf9c78bb2844c02ee47bf3.yml
3+
openapi_spec_hash: 16ce3e9184fc2afdee66db18a83a96e8
44
config_hash: 2363f563f42501d2b1587a4f64bdccaf

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Changelog
22

3+
## 1.0.0 (2025-12-02)
4+
5+
Full Changelog: [v0.69.0...v1.0.0](https://github.com/runloopai/api-client-python/compare/v0.69.0...v1.0.0)
6+
7+
### ⚠ BREAKING CHANGES
8+
9+
* **devbox:** made command positional arg in exec and exec_async ([#695](https://github.com/runloopai/api-client-python/issues/695))
10+
11+
### Features
12+
13+
* **blueprints:** Add build context to the OpenAPI spec ([#6494](https://github.com/runloopai/api-client-python/issues/6494)) ([d202b94](https://github.com/runloopai/api-client-python/commit/d202b942c07614ca954a8bbe3a9a6302e9a04216))
14+
* **devbox:** added devbox.shell(shellName) command and stateful shell class to SDK ([#696](https://github.com/runloopai/api-client-python/issues/696)) ([c1e8f09](https://github.com/runloopai/api-client-python/commit/c1e8f0965a419ff53d830ba3c43a1c9a29dae5c7))
15+
* **devbox:** made command positional arg in exec and exec_async ([#695](https://github.com/runloopai/api-client-python/issues/695)) ([6cc8c2f](https://github.com/runloopai/api-client-python/commit/6cc8c2fd4f904e8cc4386d81558157ca6fb69bfa))
16+
* **sdk:** added scorer classes to sdk ([#698](https://github.com/runloopai/api-client-python/issues/698)) ([85f798f](https://github.com/runloopai/api-client-python/commit/85f798f2d8a7727b783e01a260ff0a52bdf01d78))
17+
18+
19+
### Bug Fixes
20+
21+
* **api:** don't ignore devbox keep_alive, suspend and resume in api ([fe3589f](https://github.com/runloopai/api-client-python/commit/fe3589f5fbb36a5b79f1d4a25e86f88676556fdb))
22+
* **devbox:** launch parameter typo ([1c9c346](https://github.com/runloopai/api-client-python/commit/1c9c346e475b64fc389928fee0f7140e532c4f9c))
23+
* **scenarios:** update parameters for manually maintained start_run_and_await_env_ready methods ([#692](https://github.com/runloopai/api-client-python/issues/692)) ([8000495](https://github.com/runloopai/api-client-python/commit/8000495f70b2e6f4f12742fb8a6d641dbbc088ca))
24+
* **scorer:** fixed RL_TEST_CONTEXT to RL_SCORER_CONTEXT ([df43a42](https://github.com/runloopai/api-client-python/commit/df43a42a45b9ce67aba27835a41c9a0ebfc6a407))
25+
26+
27+
### Chores
28+
29+
* **blueprints:** Add build context examples ([#694](https://github.com/runloopai/api-client-python/issues/694)) ([6e63928](https://github.com/runloopai/api-client-python/commit/6e6392864b3cde20dfea5d173fed9a156b960ccd))
30+
* hide build context APIs ([159a38f](https://github.com/runloopai/api-client-python/commit/159a38f0980c00430a1b949541076b0d63df2df2))
31+
* **mounts:** Update documentation for deprecated fields to direct the user to the replacement API ([4936844](https://github.com/runloopai/api-client-python/commit/4936844989ec7a0d37c835dd37b8007e8caba944))
32+
333
## 0.69.0 (2025-11-21)
434

535
Full Changelog: [v0.68.0...v0.69.0](https://github.com/runloopai/api-client-python/compare/v0.68.0...v0.69.0)

README-SDK.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ runloop = RunloopSDK()
3838

3939
# Create a ready-to-use devbox
4040
with runloop.devbox.create(name="my-devbox") as devbox:
41-
result = devbox.cmd.exec(command="echo 'Hello from Runloop!'")
41+
result = devbox.cmd.exec("echo 'Hello from Runloop!'")
4242
print(result.stdout())
4343

4444
# Stream stdout in real time
4545
devbox.cmd.exec(
46-
command="ls -la",
46+
"ls -la",
4747
stdout=lambda line: print("stdout:", line),
4848
)
4949

@@ -68,13 +68,13 @@ from runloop_api_client import AsyncRunloopSDK
6868
async def main():
6969
runloop = AsyncRunloopSDK()
7070
async with await runloop.devbox.create(name="async-devbox") as devbox:
71-
result = await devbox.cmd.exec(command="pwd")
71+
result = await devbox.cmd.exec("pwd")
7272
print(await result.stdout())
7373

7474
def capture(line: str) -> None:
7575
print(">>", line)
7676

77-
await devbox.cmd.exec(command="ls", stdout=capture)
77+
await devbox.cmd.exec("ls", stdout=capture)
7878

7979
asyncio.run(main())
8080
```
@@ -147,13 +147,13 @@ Execute commands synchronously or asynchronously:
147147

148148
```python
149149
# Synchronous command execution (waits for completion)
150-
result = devbox.cmd.exec(command="ls -la")
150+
result = devbox.cmd.exec("ls -la")
151151
print("Output:", result.stdout())
152152
print("Exit code:", result.exit_code)
153153
print("Success:", result.success)
154154

155155
# Asynchronous command execution (returns immediately)
156-
execution = devbox.cmd.exec_async(command="npm run dev")
156+
execution = devbox.cmd.exec_async("npm run dev")
157157

158158
# Check execution status
159159
state = execution.get_state()
@@ -173,7 +173,7 @@ The `Execution` object provides fine-grained control over asynchronous command e
173173

174174
```python
175175
# Start a long-running process
176-
execution = devbox.cmd.exec_async(command="python train_model.py")
176+
execution = devbox.cmd.exec_async("python train_model.py")
177177

178178
# Get the execution ID
179179
print("Execution ID:", execution.execution_id)
@@ -208,10 +208,10 @@ The `ExecutionResult` object contains the output and exit status of a completed
208208

209209
```python
210210
# From synchronous execution
211-
result = devbox.cmd.exec(command="ls -la /tmp")
211+
result = devbox.cmd.exec("ls -la /tmp")
212212

213213
# Or from asynchronous execution
214-
execution = devbox.cmd.exec_async(command="echo 'test'")
214+
execution = devbox.cmd.exec_async("echo 'test'")
215215
result = execution.result()
216216

217217
# Access execution results
@@ -250,7 +250,7 @@ def handle_output(line: str) -> None:
250250
print("LOG:", line)
251251

252252
result = devbox.cmd.exec(
253-
command="python train.py",
253+
"python train.py",
254254
stdout=handle_output,
255255
stderr=lambda line: print("ERR:", line),
256256
output=lambda line: print("ANY:", line),
@@ -267,7 +267,7 @@ def capture(line: str) -> None:
267267
log_queue.put_nowait(line)
268268

269269
await devbox.cmd.exec(
270-
command="tail -f /var/log/app.log",
270+
"tail -f /var/log/app.log",
271271
stdout=capture,
272272
)
273273
```
@@ -365,13 +365,13 @@ Devboxes support context managers for automatic cleanup:
365365
```python
366366
# Synchronous
367367
with runloop.devbox.create(name="temp-devbox") as devbox:
368-
result = devbox.cmd.exec(command="echo 'Hello'")
368+
result = devbox.cmd.exec("echo 'Hello'")
369369
print(result.stdout())
370370
# devbox is automatically shutdown when exiting the context
371371

372372
# Asynchronous
373373
async with await runloop.devbox.create(name="temp-devbox") as devbox:
374-
result = await devbox.cmd.exec(command="echo 'Hello'")
374+
result = await devbox.cmd.exec("echo 'Hello'")
375375
print(await result.stdout())
376376
# devbox is automatically shutdown when exiting the context
377377
```
@@ -586,7 +586,7 @@ devbox = runloop.devbox.create(
586586
)
587587

588588
# The storage object is now accessible at /home/user/data.txt in the devbox
589-
result = devbox.cmd.exec(command="cat /home/user/data.txt")
589+
result = devbox.cmd.exec("cat /home/user/data.txt")
590590
print(result.stdout()) # "Hello, World!"
591591

592592
# Mount archived objects (tar, tgz, gzip) - they get extracted to a directory
@@ -607,7 +607,7 @@ devbox_with_archive = runloop.devbox.create(
607607
)
608608

609609
# Access extracted archive contents
610-
result = devbox_with_archive.cmd.exec(command="ls -la /home/user/project/")
610+
result = devbox_with_archive.cmd.exec("ls -la /home/user/project/")
611611
print(result.stdout())
612612
```
613613

@@ -634,7 +634,7 @@ runloop = RunloopSDK()
634634

635635
try:
636636
devbox = runloop.devbox.create(name="example-devbox")
637-
result = devbox.cmd.exec(command="invalid-command")
637+
result = devbox.cmd.exec("invalid-command")
638638
except runloop_api_client.APIConnectionError as e:
639639
print("The server could not be reached")
640640
print(e.__cause__) # an underlying Exception, likely raised within httpx.
@@ -694,14 +694,14 @@ async def main():
694694

695695
# All the same operations, but with await
696696
async with await runloop.devbox.create(name="async-devbox") as devbox:
697-
result = await devbox.cmd.exec(command="pwd")
697+
result = await devbox.cmd.exec("pwd")
698698
print(await result.stdout())
699699

700700
# Streaming (note: callbacks must be synchronous)
701701
def capture(line: str) -> None:
702702
print(">>", line)
703703

704-
await devbox.cmd.exec(command="ls", stdout=capture)
704+
await devbox.cmd.exec("ls", stdout=capture)
705705

706706
# Async file operations
707707
await devbox.file.write(path="/tmp/test.txt", contents="Hello")

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Synchronous Example
3434
3535
# Create a ready-to-use devbox
3636
with runloop.devbox.create(name="my-devbox") as devbox:
37-
result = devbox.cmd.exec(command="echo 'Hello from Runloop!'")
37+
result = devbox.cmd.exec("echo 'Hello from Runloop!'")
3838
print(result.stdout())
3939
4040
Asynchronous Example
@@ -49,7 +49,7 @@ Asynchronous Example
4949
runloop = AsyncRunloopSDK()
5050
5151
async with await runloop.devbox.create(name="my-devbox") as devbox:
52-
result = await devbox.cmd.exec(command="echo 'Hello from Runloop!'")
52+
result = await devbox.cmd.exec("echo 'Hello from Runloop!'")
5353
print(await result.stdout())
5454
5555
asyncio.run(main())

docs/sdk/async/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ Asynchronous resource classes for working with devboxes, blueprints, snapshots,
2626
blueprint
2727
snapshot
2828
storage_object
29+
scorer
2930

docs/sdk/async/scorer.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Scorer
2+
======
3+
4+
The ``AsyncScorer`` class provides asynchronous methods for managing custom scenario scorers.
5+
6+
.. automodule:: runloop_api_client.sdk.async_scorer
7+
:members:
8+
9+

docs/sdk/sync/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ Synchronous resource classes for working with devboxes, blueprints, snapshots, a
2626
blueprint
2727
snapshot
2828
storage_object
29+
scorer
2930

docs/sdk/sync/scorer.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Scorer
2+
======
3+
4+
The ``Scorer`` class provides synchronous methods for managing custom scenario scorers.
5+
6+
.. automodule:: runloop_api_client.sdk.scorer
7+
:members:
8+
9+

docs/sdk/types.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@ These TypeDicts define parameters for storage object creation, listing, and down
7878

7979
.. autotypeddict:: runloop_api_client.sdk._types.SDKObjectDownloadParams
8080

81+
Scorer Parameters
82+
-----------------
83+
84+
These TypeDicts define parameters for scorer creation, listing, updating, and validation.
85+
86+
.. autotypeddict:: runloop_api_client.sdk._types.SDKScorerCreateParams
87+
88+
.. autotypeddict:: runloop_api_client.sdk._types.SDKScorerListParams
89+
90+
.. autotypeddict:: runloop_api_client.sdk._types.SDKScorerUpdateParams
91+
92+
.. autotypeddict:: runloop_api_client.sdk._types.SDKScorerValidateParams
93+
8194
Core Request Options
8295
--------------------
8396

0 commit comments

Comments
 (0)