Skip to content

Commit 42ab77f

Browse files
authored
Merge pull request #61 from runloopai/release-please--branches--main--changes--next
release: 0.1.0-alpha.9
2 parents 901c481 + acc2335 commit 42ab77f

21 files changed

Lines changed: 387 additions & 188 deletions

.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.1.0-alpha.8"
2+
".": "0.1.0-alpha.9"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 19
1+
configured_endpoints: 21
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8ed7237714dcf00d5e186095c38ac8afb3300d4773e0d836042d89f3b53c7ffc.yml

CHANGELOG.md

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

3+
## 0.1.0-alpha.9 (2024-08-01)
4+
5+
Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/runloopai/api-client-python/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
6+
7+
### Chores
8+
9+
* update SDK settings ([#60](https://github.com/runloopai/api-client-python/issues/60)) ([0ccfd28](https://github.com/runloopai/api-client-python/commit/0ccfd28645206b0dedc2dac42e17fcaec14c293e))
10+
311
## 0.1.0-alpha.8 (2024-08-01)
412

513
Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/runloopai/api-client-python/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)

api.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Shared Types
22

33
```python
4-
from runloop_api_client.types import ProjectLogsView
4+
from runloop_api_client.types import FunctionInvocationExecutionDetailView, ProjectLogsView
55
```
66

77
# Account
@@ -57,7 +57,9 @@ Methods:
5757
- <code title="get /v1/devboxes/{id}">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
5858
- <code title="get /v1/devboxes">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">list</a>(\*\*<a href="src/runloop_api_client/types/devbox_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_list_view.py">DevboxListView</a></code>
5959
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">execute_sync</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_execute_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
60+
- <code title="post /v1/devboxes/{id}/read_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">read_file</a>(id) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
6061
- <code title="post /v1/devboxes/{id}/shutdown">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">shutdown</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
62+
- <code title="post /v1/devboxes/{id}/write_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">write_file</a>(id) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
6163

6264
## Logs
6365

@@ -76,36 +78,28 @@ Methods:
7678
Types:
7779

7880
```python
79-
from runloop_api_client.types import (
80-
FunctionListView,
81-
FunctionInvokeAsyncResponse,
82-
FunctionInvokeSyncResponse,
83-
)
81+
from runloop_api_client.types import FunctionListView
8482
```
8583

8684
Methods:
8785

8886
- <code title="get /v1/functions">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">list</a>() -> <a href="./src/runloop_api_client/types/function_list_view.py">FunctionListView</a></code>
89-
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_async">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">invoke_async</a>(function_name, \*, project_name, \*\*<a href="src/runloop_api_client/types/function_invoke_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/function_invoke_async_response.py">FunctionInvokeAsyncResponse</a></code>
90-
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_sync">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">invoke_sync</a>(function_name, \*, project_name, \*\*<a href="src/runloop_api_client/types/function_invoke_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/function_invoke_sync_response.py">FunctionInvokeSyncResponse</a></code>
87+
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_async">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">invoke_async</a>(function_name, \*, project_name, \*\*<a href="src/runloop_api_client/types/function_invoke_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/shared/function_invocation_execution_detail_view.py">FunctionInvocationExecutionDetailView</a></code>
88+
- <code title="post /v1/functions/{project_name}/{function_name}/invoke_sync">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">invoke_sync</a>(function_name, \*, project_name, \*\*<a href="src/runloop_api_client/types/function_invoke_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/shared/function_invocation_execution_detail_view.py">FunctionInvocationExecutionDetailView</a></code>
9189

9290
## Invocations
9391

9492
Types:
9593

9694
```python
97-
from runloop_api_client.types.functions import (
98-
FunctionInvocationListView,
99-
KillOperationResponse,
100-
InvocationRetrieveResponse,
101-
)
95+
from runloop_api_client.types.functions import FunctionInvocationListView, KillOperationResponse
10296
```
10397

10498
Methods:
10599

106-
- <code title="get /v1/functions/invocations/{invocationId}">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations/invocations.py">retrieve</a>(invocation_id) -> <a href="./src/runloop_api_client/types/functions/invocation_retrieve_response.py">InvocationRetrieveResponse</a></code>
107-
- <code title="get /v1/functions/invocations">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations/invocations.py">list</a>(\*\*<a href="src/runloop_api_client/types/functions/invocation_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/functions/function_invocation_list_view.py">FunctionInvocationListView</a></code>
108-
- <code title="post /v1/functions/invocations/{invocationId}/kill">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations/invocations.py">kill</a>(invocation_id) -> <a href="./src/runloop_api_client/types/functions/kill_operation_response.py">object</a></code>
100+
- <code title="get /v1/functions/invocations/{invocationId}">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations.py">retrieve</a>(invocation_id) -> <a href="./src/runloop_api_client/types/shared/function_invocation_execution_detail_view.py">FunctionInvocationExecutionDetailView</a></code>
101+
- <code title="get /v1/functions/invocations">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations.py">list</a>(\*\*<a href="src/runloop_api_client/types/functions/invocation_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/functions/function_invocation_list_view.py">FunctionInvocationListView</a></code>
102+
- <code title="post /v1/functions/invocations/{invocationId}/kill">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations.py">kill</a>(invocation_id) -> <a href="./src/runloop_api_client/types/functions/kill_operation_response.py">object</a></code>
109103

110104
# Projects
111105

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "runloop_api_client"
3-
version = "0.1.0-alpha.8"
3+
version = "0.1.0-alpha.9"
44
description = "The official Python library for the runloop API"
55
dynamic = ["readme"]
66
license = "MIT"

src/runloop_api_client/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "runloop_api_client"
4-
__version__ = "0.1.0-alpha.8" # x-release-please-version
4+
__version__ = "0.1.0-alpha.9" # x-release-please-version

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,39 @@ def execute_sync(
247247
cast_to=DevboxExecutionDetailView,
248248
)
249249

250+
def read_file(
251+
self,
252+
id: str,
253+
*,
254+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
255+
# The extra values given here take precedence over values defined on the client or passed to this method.
256+
extra_headers: Headers | None = None,
257+
extra_query: Query | None = None,
258+
extra_body: Body | None = None,
259+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
260+
) -> DevboxExecutionDetailView:
261+
"""
262+
Read file contents from a file on given Devbox.
263+
264+
Args:
265+
extra_headers: Send extra headers
266+
267+
extra_query: Add additional query parameters to the request
268+
269+
extra_body: Add additional JSON properties to the request
270+
271+
timeout: Override the client-level default timeout for this request, in seconds
272+
"""
273+
if not id:
274+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
275+
return self._post(
276+
f"/v1/devboxes/{id}/read_file",
277+
options=make_request_options(
278+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
279+
),
280+
cast_to=DevboxExecutionDetailView,
281+
)
282+
250283
def shutdown(
251284
self,
252285
id: str,
@@ -281,6 +314,39 @@ def shutdown(
281314
cast_to=DevboxView,
282315
)
283316

317+
def write_file(
318+
self,
319+
id: str,
320+
*,
321+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
322+
# The extra values given here take precedence over values defined on the client or passed to this method.
323+
extra_headers: Headers | None = None,
324+
extra_query: Query | None = None,
325+
extra_body: Body | None = None,
326+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
327+
) -> DevboxExecutionDetailView:
328+
"""
329+
Write contents to a file at path on the Devbox.
330+
331+
Args:
332+
extra_headers: Send extra headers
333+
334+
extra_query: Add additional query parameters to the request
335+
336+
extra_body: Add additional JSON properties to the request
337+
338+
timeout: Override the client-level default timeout for this request, in seconds
339+
"""
340+
if not id:
341+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
342+
return self._post(
343+
f"/v1/devboxes/{id}/write_file",
344+
options=make_request_options(
345+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
346+
),
347+
cast_to=DevboxExecutionDetailView,
348+
)
349+
284350

285351
class AsyncDevboxesResource(AsyncAPIResource):
286352
@cached_property
@@ -493,6 +559,39 @@ async def execute_sync(
493559
cast_to=DevboxExecutionDetailView,
494560
)
495561

562+
async def read_file(
563+
self,
564+
id: str,
565+
*,
566+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
567+
# The extra values given here take precedence over values defined on the client or passed to this method.
568+
extra_headers: Headers | None = None,
569+
extra_query: Query | None = None,
570+
extra_body: Body | None = None,
571+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
572+
) -> DevboxExecutionDetailView:
573+
"""
574+
Read file contents from a file on given Devbox.
575+
576+
Args:
577+
extra_headers: Send extra headers
578+
579+
extra_query: Add additional query parameters to the request
580+
581+
extra_body: Add additional JSON properties to the request
582+
583+
timeout: Override the client-level default timeout for this request, in seconds
584+
"""
585+
if not id:
586+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
587+
return await self._post(
588+
f"/v1/devboxes/{id}/read_file",
589+
options=make_request_options(
590+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
591+
),
592+
cast_to=DevboxExecutionDetailView,
593+
)
594+
496595
async def shutdown(
497596
self,
498597
id: str,
@@ -527,6 +626,39 @@ async def shutdown(
527626
cast_to=DevboxView,
528627
)
529628

629+
async def write_file(
630+
self,
631+
id: str,
632+
*,
633+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
634+
# The extra values given here take precedence over values defined on the client or passed to this method.
635+
extra_headers: Headers | None = None,
636+
extra_query: Query | None = None,
637+
extra_body: Body | None = None,
638+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
639+
) -> DevboxExecutionDetailView:
640+
"""
641+
Write contents to a file at path on the Devbox.
642+
643+
Args:
644+
extra_headers: Send extra headers
645+
646+
extra_query: Add additional query parameters to the request
647+
648+
extra_body: Add additional JSON properties to the request
649+
650+
timeout: Override the client-level default timeout for this request, in seconds
651+
"""
652+
if not id:
653+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
654+
return await self._post(
655+
f"/v1/devboxes/{id}/write_file",
656+
options=make_request_options(
657+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
658+
),
659+
cast_to=DevboxExecutionDetailView,
660+
)
661+
530662

531663
class DevboxesResourceWithRawResponse:
532664
def __init__(self, devboxes: DevboxesResource) -> None:
@@ -544,9 +676,15 @@ def __init__(self, devboxes: DevboxesResource) -> None:
544676
self.execute_sync = to_raw_response_wrapper(
545677
devboxes.execute_sync,
546678
)
679+
self.read_file = to_raw_response_wrapper(
680+
devboxes.read_file,
681+
)
547682
self.shutdown = to_raw_response_wrapper(
548683
devboxes.shutdown,
549684
)
685+
self.write_file = to_raw_response_wrapper(
686+
devboxes.write_file,
687+
)
550688

551689
@cached_property
552690
def logs(self) -> LogsResourceWithRawResponse:
@@ -569,9 +707,15 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
569707
self.execute_sync = async_to_raw_response_wrapper(
570708
devboxes.execute_sync,
571709
)
710+
self.read_file = async_to_raw_response_wrapper(
711+
devboxes.read_file,
712+
)
572713
self.shutdown = async_to_raw_response_wrapper(
573714
devboxes.shutdown,
574715
)
716+
self.write_file = async_to_raw_response_wrapper(
717+
devboxes.write_file,
718+
)
575719

576720
@cached_property
577721
def logs(self) -> AsyncLogsResourceWithRawResponse:
@@ -594,9 +738,15 @@ def __init__(self, devboxes: DevboxesResource) -> None:
594738
self.execute_sync = to_streamed_response_wrapper(
595739
devboxes.execute_sync,
596740
)
741+
self.read_file = to_streamed_response_wrapper(
742+
devboxes.read_file,
743+
)
597744
self.shutdown = to_streamed_response_wrapper(
598745
devboxes.shutdown,
599746
)
747+
self.write_file = to_streamed_response_wrapper(
748+
devboxes.write_file,
749+
)
600750

601751
@cached_property
602752
def logs(self) -> LogsResourceWithStreamingResponse:
@@ -619,9 +769,15 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
619769
self.execute_sync = async_to_streamed_response_wrapper(
620770
devboxes.execute_sync,
621771
)
772+
self.read_file = async_to_streamed_response_wrapper(
773+
devboxes.read_file,
774+
)
622775
self.shutdown = async_to_streamed_response_wrapper(
623776
devboxes.shutdown,
624777
)
778+
self.write_file = async_to_streamed_response_wrapper(
779+
devboxes.write_file,
780+
)
625781

626782
@cached_property
627783
def logs(self) -> AsyncLogsResourceWithStreamingResponse:

0 commit comments

Comments
 (0)