Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.48.2"
".": "0.49.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 92
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-75c0dc94dd629772c98b3e6f763d8b3a1bdb732aa3eb92d49a59fb446fb2410d.yml
openapi_spec_hash: 12286e648ea1156bfa23020ed0c7598b
config_hash: aeb178e14a85ac4cd585f0667484c7c3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-b3ce005070de130c689c5e82a0decb0515feedc16f6aed5b68a620c0e2c33c99.yml
openapi_spec_hash: a6d282538829a82c412ed65565d33c9c
config_hash: 60681f589a9e641fdb7f19af2021a033
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.49.0 (2025-07-15)

Full Changelog: [v0.48.2...v0.49.0](https://github.com/runloopai/api-client-python/compare/v0.48.2...v0.49.0)

### Features

* **api:** api update ([6022768](https://github.com/runloopai/api-client-python/commit/60227681f91e9eabc2b8da030fc6ef61834ce761))
* **api:** api update ([27c4579](https://github.com/runloopai/api-client-python/commit/27c4579ac003a2e211c5b421a1cc4714f86c6e57))
* clean up environment call outs ([e3a125d](https://github.com/runloopai/api-client-python/commit/e3a125d0bde927ff142d1817ce4c40489a3217c0))


### Bug Fixes

* **client:** don't send Content-Type header on GET requests ([5d9b833](https://github.com/runloopai/api-client-python/commit/5d9b8330d37d53bb5c1e8393c5d9798323a0a2ca))

## 0.48.2 (2025-07-11)

Full Changelog: [v0.48.1...v0.48.2](https://github.com/runloopai/api-client-python/compare/v0.48.1...v0.48.2)
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,14 @@ pip install runloop_api_client[aiohttp]
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import os
import asyncio
from runloop_api_client import DefaultAioHttpClient
from runloop_api_client import AsyncRunloop


async def main() -> None:
async with AsyncRunloop(
bearer_token=os.environ.get("RUNLOOP_API_KEY"), # This is the default and can be omitted
bearer_token="My Bearer Token",
http_client=DefaultAioHttpClient(),
) as client:
devbox_view = await client.devboxes.create()
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "runloop_api_client"
version = "0.48.2"
version = "0.49.0"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
Expand Down Expand Up @@ -39,7 +39,7 @@ Homepage = "https://github.com/runloopai/api-client-python"
Repository = "https://github.com/runloopai/api-client-python"

[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]

[tool.rye]
managed = true
Expand Down
11 changes: 9 additions & 2 deletions src/runloop_api_client/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,15 @@ def _build_request(
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}

is_body_allowed = options.method.lower() != "get"

if is_body_allowed:
kwargs["json"] = json_data if is_given(json_data) else None
kwargs["files"] = files
else:
headers.pop("Content-Type", None)
kwargs.pop("data", None)

# TODO: report this error to httpx
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
headers=headers,
Expand All @@ -540,8 +549,6 @@ def _build_request(
# so that passing a `TypedDict` doesn't cause an error.
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
json=json_data if is_given(json_data) else None,
files=files,
**kwargs,
)

Expand Down
2 changes: 1 addition & 1 deletion src/runloop_api_client/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "runloop_api_client"
__version__ = "0.48.2" # x-release-please-version
__version__ = "0.49.0" # x-release-please-version
28 changes: 28 additions & 0 deletions src/runloop_api_client/resources/benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def create(
*,
name: str,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -87,6 +88,9 @@ def create(

metadata: User defined metadata to attach to the benchmark for organization.

required_environment_variables: Environment variables required to run the benchmark. If these variables are not
supplied, the benchmark will fail to start

scenario_ids: The Scenario IDs that make up the Benchmark.

extra_headers: Send extra headers
Expand All @@ -105,6 +109,7 @@ def create(
{
"name": name,
"metadata": metadata,
"required_environment_variables": required_environment_variables,
"scenario_ids": scenario_ids,
},
benchmark_create_params.BenchmarkCreateParams,
Expand Down Expand Up @@ -158,6 +163,7 @@ def update(
*,
name: str,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -175,6 +181,9 @@ def update(

metadata: User defined metadata to attach to the benchmark for organization.

required_environment_variables: Environment variables required to run the benchmark. If these variables are not
supplied, the benchmark will fail to start

scenario_ids: The Scenario IDs that make up the Benchmark.

extra_headers: Send extra headers
Expand All @@ -195,6 +204,7 @@ def update(
{
"name": name,
"metadata": metadata,
"required_environment_variables": required_environment_variables,
"scenario_ids": scenario_ids,
},
benchmark_update_params.BenchmarkUpdateParams,
Expand Down Expand Up @@ -358,6 +368,7 @@ def start_run(
benchmark_id: str,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
run_name: Optional[str] | NotGiven = NOT_GIVEN,
run_profile: Optional[benchmark_start_run_params.RunProfile] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -376,6 +387,8 @@ def start_run(

run_name: Display name of the run.

run_profile: Runtime configuration to use for this benchmark run

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -393,6 +406,7 @@ def start_run(
"benchmark_id": benchmark_id,
"metadata": metadata,
"run_name": run_name,
"run_profile": run_profile,
},
benchmark_start_run_params.BenchmarkStartRunParams,
),
Expand Down Expand Up @@ -436,6 +450,7 @@ async def create(
*,
name: str,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -453,6 +468,9 @@ async def create(

metadata: User defined metadata to attach to the benchmark for organization.

required_environment_variables: Environment variables required to run the benchmark. If these variables are not
supplied, the benchmark will fail to start

scenario_ids: The Scenario IDs that make up the Benchmark.

extra_headers: Send extra headers
Expand All @@ -471,6 +489,7 @@ async def create(
{
"name": name,
"metadata": metadata,
"required_environment_variables": required_environment_variables,
"scenario_ids": scenario_ids,
},
benchmark_create_params.BenchmarkCreateParams,
Expand Down Expand Up @@ -524,6 +543,7 @@ async def update(
*,
name: str,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -541,6 +561,9 @@ async def update(

metadata: User defined metadata to attach to the benchmark for organization.

required_environment_variables: Environment variables required to run the benchmark. If these variables are not
supplied, the benchmark will fail to start

scenario_ids: The Scenario IDs that make up the Benchmark.

extra_headers: Send extra headers
Expand All @@ -561,6 +584,7 @@ async def update(
{
"name": name,
"metadata": metadata,
"required_environment_variables": required_environment_variables,
"scenario_ids": scenario_ids,
},
benchmark_update_params.BenchmarkUpdateParams,
Expand Down Expand Up @@ -724,6 +748,7 @@ async def start_run(
benchmark_id: str,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
run_name: Optional[str] | NotGiven = NOT_GIVEN,
run_profile: Optional[benchmark_start_run_params.RunProfile] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -742,6 +767,8 @@ async def start_run(

run_name: Display name of the run.

run_profile: Runtime configuration to use for this benchmark run

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -759,6 +786,7 @@ async def start_run(
"benchmark_id": benchmark_id,
"metadata": metadata,
"run_name": run_name,
"run_profile": run_profile,
},
benchmark_start_run_params.BenchmarkStartRunParams,
),
Expand Down
28 changes: 24 additions & 4 deletions src/runloop_api_client/resources/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def create(
self,
*,
name: str,
base_blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
Expand All @@ -78,11 +79,14 @@ def create(
Args:
name: Name of the Blueprint.

base_blueprint_id: (Optional) ID of previously built blueprint to use as a base blueprint for this
build.

code_mounts: A list of code mounts to be included in the Blueprint.

dockerfile: Dockerfile contents to be used to build the Blueprint.

file_mounts: (Optional) Map of paths and file contents to write before setup..
file_mounts: (Optional) Map of paths and file contents to write before setup.

launch_parameters: Parameters to configure your Devbox at launch time.

Expand All @@ -103,6 +107,7 @@ def create(
body=maybe_transform(
{
"name": name,
"base_blueprint_id": base_blueprint_id,
"code_mounts": code_mounts,
"dockerfile": dockerfile,
"file_mounts": file_mounts,
Expand Down Expand Up @@ -395,6 +400,7 @@ def preview(
self,
*,
name: str,
base_blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
Expand All @@ -416,11 +422,14 @@ def preview(
Args:
name: Name of the Blueprint.

base_blueprint_id: (Optional) ID of previously built blueprint to use as a base blueprint for this
build.

code_mounts: A list of code mounts to be included in the Blueprint.

dockerfile: Dockerfile contents to be used to build the Blueprint.

file_mounts: (Optional) Map of paths and file contents to write before setup..
file_mounts: (Optional) Map of paths and file contents to write before setup.

launch_parameters: Parameters to configure your Devbox at launch time.

Expand All @@ -441,6 +450,7 @@ def preview(
body=maybe_transform(
{
"name": name,
"base_blueprint_id": base_blueprint_id,
"code_mounts": code_mounts,
"dockerfile": dockerfile,
"file_mounts": file_mounts,
Expand Down Expand Up @@ -484,6 +494,7 @@ async def create(
self,
*,
name: str,
base_blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
Expand All @@ -507,11 +518,14 @@ async def create(
Args:
name: Name of the Blueprint.

base_blueprint_id: (Optional) ID of previously built blueprint to use as a base blueprint for this
build.

code_mounts: A list of code mounts to be included in the Blueprint.

dockerfile: Dockerfile contents to be used to build the Blueprint.

file_mounts: (Optional) Map of paths and file contents to write before setup..
file_mounts: (Optional) Map of paths and file contents to write before setup.

launch_parameters: Parameters to configure your Devbox at launch time.

Expand All @@ -532,6 +546,7 @@ async def create(
body=await async_maybe_transform(
{
"name": name,
"base_blueprint_id": base_blueprint_id,
"code_mounts": code_mounts,
"dockerfile": dockerfile,
"file_mounts": file_mounts,
Expand Down Expand Up @@ -824,6 +839,7 @@ async def preview(
self,
*,
name: str,
base_blueprint_id: Optional[str] | NotGiven = NOT_GIVEN,
code_mounts: Optional[Iterable[CodeMountParameters]] | NotGiven = NOT_GIVEN,
dockerfile: Optional[str] | NotGiven = NOT_GIVEN,
file_mounts: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
Expand All @@ -845,11 +861,14 @@ async def preview(
Args:
name: Name of the Blueprint.

base_blueprint_id: (Optional) ID of previously built blueprint to use as a base blueprint for this
build.

code_mounts: A list of code mounts to be included in the Blueprint.

dockerfile: Dockerfile contents to be used to build the Blueprint.

file_mounts: (Optional) Map of paths and file contents to write before setup..
file_mounts: (Optional) Map of paths and file contents to write before setup.

launch_parameters: Parameters to configure your Devbox at launch time.

Expand All @@ -870,6 +889,7 @@ async def preview(
body=await async_maybe_transform(
{
"name": name,
"base_blueprint_id": base_blueprint_id,
"code_mounts": code_mounts,
"dockerfile": dockerfile,
"file_mounts": file_mounts,
Expand Down
Loading