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.1.0-alpha.13"
".": "0.1.0-alpha.14"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8c7e1b2377a7a76ebd891bda5df65c28f1574bae085e0460b8f614811bb193fe.yml
configured_endpoints: 36
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-ea589851f2dbba35fea6c010ac4c577cad56aa44e1d5bd4e5b472c802b2f13c4.yml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Error codes are as followed:

### Retries

Certain errors are automatically retried 0 times by default, with a short exponential backoff.
Certain errors are automatically retried 2 times by default, with a short exponential backoff.
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
429 Rate Limit, and >=500 Internal errors are all retried by default.

Expand Down
64 changes: 55 additions & 9 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,37 @@ Types:
from runloop_api_client.types import CodeMountParameters
```

# Deployments

Types:

```python
from runloop_api_client.types import (
DeploymentRetrieveResponse,
DeploymentGetResponse,
DeploymentLogsResponse,
DeploymentRedeployResponse,
DeploymentTailResponse,
)
```

Methods:

- <code title="get /v1/deployments/{deployment_id}">client.deployments.<a href="./src/runloop_api_client/resources/deployments.py">retrieve</a>(deployment_id) -> <a href="./src/runloop_api_client/types/deployment_retrieve_response.py">DeploymentRetrieveResponse</a></code>
- <code title="get /v1/deployments">client.deployments.<a href="./src/runloop_api_client/resources/deployments.py">get</a>(\*\*<a href="src/runloop_api_client/types/deployment_get_params.py">params</a>) -> <a href="./src/runloop_api_client/types/deployment_get_response.py">DeploymentGetResponse</a></code>
- <code title="get /v1/deployments/{deployment_id}/logs">client.deployments.<a href="./src/runloop_api_client/resources/deployments.py">logs</a>(deployment_id) -> <a href="./src/runloop_api_client/types/deployment_logs_response.py">DeploymentLogsResponse</a></code>
- <code title="post /v1/deployments/{deployment_id}/redeploy">client.deployments.<a href="./src/runloop_api_client/resources/deployments.py">redeploy</a>(deployment_id) -> <a href="./src/runloop_api_client/types/deployment_redeploy_response.py">DeploymentRedeployResponse</a></code>
- <code title="get /v1/deployments/{deployment_id}/logs/tail">client.deployments.<a href="./src/runloop_api_client/resources/deployments.py">tail</a>(deployment_id) -> <a href="./src/runloop_api_client/types/deployment_tail_response.py">DeploymentTailResponse</a></code>

# Devboxes

Types:

```python
from runloop_api_client.types import (
DevboxExecutionDetailView,
DevboxListView,
DevboxView,
DevboxListResponse,
DevboxCreateSSHKeyResponse,
DevboxReadFileContentsResponse,
DevboxUploadFileResponse,
)
Expand All @@ -61,52 +83,76 @@ Methods:

- <code title="post /v1/devboxes">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">create</a>(\*\*<a href="src/runloop_api_client/types/devbox_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
- <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>
- <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>
- <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>
- <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_response.py">DevboxListResponse</a></code>
- <code title="post /v1/devboxes/{id}/create_ssh_key">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">create_ssh_key</a>(id) -> <a href="./src/runloop_api_client/types/devbox_create_ssh_key_response.py">DevboxCreateSSHKeyResponse</a></code>
- <code title="post /v1/devboxes/{id}/executions/execute_async">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">execute_async</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_execute_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
- <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/devboxes/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
- <code title="post /v1/devboxes/{id}/read_file_contents">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">read_file_contents</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_read_file_contents_params.py">params</a>) -> str</code>
- <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>
- <code title="post /v1/devboxes/{id}/upload_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">upload_file</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_upload_file_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_upload_file_response.py">object</a></code>
- <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_write_file_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
- <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_write_file_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>

## Logs

Methods:

- <code title="get /v1/devboxes/{id}/logs">client.devboxes.logs.<a href="./src/runloop_api_client/resources/devboxes/logs.py">list</a>(id) -> <a href="./src/runloop_api_client/types/devboxes/devbox_logs_list_view.py">DevboxLogsListView</a></code>
- <code title="get /v1/devboxes/{id}/logs/tail">client.devboxes.logs.<a href="./src/runloop_api_client/resources/devboxes/logs.py">tail</a>(id) -> None</code>

## Executions

Types:

```python
from runloop_api_client.types.devboxes import DevboxLogsListView
from runloop_api_client.types.devboxes import (
DevboxAsyncExecutionDetailView,
DevboxExecutionDetailView,
DevboxLogsListView,
)
```

Methods:

- <code title="get /v1/devboxes/{id}/logs">client.devboxes.logs.<a href="./src/runloop_api_client/resources/devboxes/logs.py">list</a>(id) -> <a href="./src/runloop_api_client/types/devboxes/devbox_logs_list_view.py">DevboxLogsListView</a></code>
- <code title="post /v1/devboxes/{id}/executions/{exeId}">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">retrieve</a>(exe_id, \*, id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_retrieve_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
- <code title="post /v1/devboxes/{id}/executions/execute_async">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">execute_async</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_execute_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">execute_sync</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_execute_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
- <code title="post /v1/devboxes/{id}/executions/{exeId}/kill">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">kill</a>(exe_id, \*, id) -> <a href="./src/runloop_api_client/types/devboxes/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
- <code title="get /v1/devboxes/{id}/executions/{execution_id}/logs">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">logs</a>(execution_id, \*, id) -> <a href="./src/runloop_api_client/types/devboxes/devbox_logs_list_view.py">DevboxLogsListView</a></code>
- <code title="get /v1/devboxes/{id}/executions/{execution_id}/logs/tail">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">tail</a>(execution_id, \*, id) -> None</code>

# Functions

Types:

```python
from runloop_api_client.types import FunctionListView
from runloop_api_client.types import FunctionListView, FunctionListOpenAPIResponse
```

Methods:

- <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>
- <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>
- <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>
- <code title="get /v1/functions/openapi">client.functions.<a href="./src/runloop_api_client/resources/functions/functions.py">list_openapi</a>() -> <a href="./src/runloop_api_client/types/function_list_openapi_response.py">object</a></code>

## Invocations

Types:

```python
from runloop_api_client.types.functions import FunctionInvocationListView, KillOperationResponse
from runloop_api_client.types.functions import (
FunctionInvocationListView,
KillOperationResponse,
InvocationLogsResponse,
)
```

Methods:

- <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>
- <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>
- <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>
- <code title="get /v1/functions/invocations/{invocation_id}/logs">client.functions.invocations.<a href="./src/runloop_api_client/resources/functions/invocations.py">logs</a>(invocation_id) -> <a href="./src/runloop_api_client/types/functions/invocation_logs_response.py">InvocationLogsResponse</a></code>

# Projects

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "runloop_api_client"
version = "0.1.0-alpha.13"
version = "0.1.0-alpha.14"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
Expand Down
8 changes: 8 additions & 0 deletions src/runloop_api_client/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

class Runloop(SyncAPIClient):
blueprints: resources.BlueprintsResource
deployments: resources.DeploymentsResource
devboxes: resources.DevboxesResource
functions: resources.FunctionsResource
projects: resources.ProjectsResource
Expand Down Expand Up @@ -108,6 +109,7 @@ def __init__(
)

self.blueprints = resources.BlueprintsResource(self)
self.deployments = resources.DeploymentsResource(self)
self.devboxes = resources.DevboxesResource(self)
self.functions = resources.FunctionsResource(self)
self.projects = resources.ProjectsResource(self)
Expand Down Expand Up @@ -221,6 +223,7 @@ def _make_status_error(

class AsyncRunloop(AsyncAPIClient):
blueprints: resources.AsyncBlueprintsResource
deployments: resources.AsyncDeploymentsResource
devboxes: resources.AsyncDevboxesResource
functions: resources.AsyncFunctionsResource
projects: resources.AsyncProjectsResource
Expand Down Expand Up @@ -282,6 +285,7 @@ def __init__(
)

self.blueprints = resources.AsyncBlueprintsResource(self)
self.deployments = resources.AsyncDeploymentsResource(self)
self.devboxes = resources.AsyncDevboxesResource(self)
self.functions = resources.AsyncFunctionsResource(self)
self.projects = resources.AsyncProjectsResource(self)
Expand Down Expand Up @@ -396,6 +400,7 @@ def _make_status_error(
class RunloopWithRawResponse:
def __init__(self, client: Runloop) -> None:
self.blueprints = resources.BlueprintsResourceWithRawResponse(client.blueprints)
self.deployments = resources.DeploymentsResourceWithRawResponse(client.deployments)
self.devboxes = resources.DevboxesResourceWithRawResponse(client.devboxes)
self.functions = resources.FunctionsResourceWithRawResponse(client.functions)
self.projects = resources.ProjectsResourceWithRawResponse(client.projects)
Expand All @@ -404,6 +409,7 @@ def __init__(self, client: Runloop) -> None:
class AsyncRunloopWithRawResponse:
def __init__(self, client: AsyncRunloop) -> None:
self.blueprints = resources.AsyncBlueprintsResourceWithRawResponse(client.blueprints)
self.deployments = resources.AsyncDeploymentsResourceWithRawResponse(client.deployments)
self.devboxes = resources.AsyncDevboxesResourceWithRawResponse(client.devboxes)
self.functions = resources.AsyncFunctionsResourceWithRawResponse(client.functions)
self.projects = resources.AsyncProjectsResourceWithRawResponse(client.projects)
Expand All @@ -412,6 +418,7 @@ def __init__(self, client: AsyncRunloop) -> None:
class RunloopWithStreamedResponse:
def __init__(self, client: Runloop) -> None:
self.blueprints = resources.BlueprintsResourceWithStreamingResponse(client.blueprints)
self.deployments = resources.DeploymentsResourceWithStreamingResponse(client.deployments)
self.devboxes = resources.DevboxesResourceWithStreamingResponse(client.devboxes)
self.functions = resources.FunctionsResourceWithStreamingResponse(client.functions)
self.projects = resources.ProjectsResourceWithStreamingResponse(client.projects)
Expand All @@ -420,6 +427,7 @@ def __init__(self, client: Runloop) -> None:
class AsyncRunloopWithStreamedResponse:
def __init__(self, client: AsyncRunloop) -> None:
self.blueprints = resources.AsyncBlueprintsResourceWithStreamingResponse(client.blueprints)
self.deployments = resources.AsyncDeploymentsResourceWithStreamingResponse(client.deployments)
self.devboxes = resources.AsyncDevboxesResourceWithStreamingResponse(client.devboxes)
self.functions = resources.AsyncFunctionsResourceWithStreamingResponse(client.functions)
self.projects = resources.AsyncProjectsResourceWithStreamingResponse(client.projects)
Expand Down
6 changes: 3 additions & 3 deletions src/runloop_api_client/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

# default timeout is 1 minute
DEFAULT_TIMEOUT = httpx.Timeout(timeout=60.0, connect=5.0)
DEFAULT_MAX_RETRIES = 0
DEFAULT_MAX_RETRIES = 2
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)

INITIAL_RETRY_DELAY = 1.0
MAX_RETRY_DELAY = 5.0
INITIAL_RETRY_DELAY = 0.5
MAX_RETRY_DELAY = 8.0
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.1.0-alpha.13" # x-release-please-version
__version__ = "0.1.0-alpha.14" # x-release-please-version
14 changes: 14 additions & 0 deletions src/runloop_api_client/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
BlueprintsResourceWithStreamingResponse,
AsyncBlueprintsResourceWithStreamingResponse,
)
from .deployments import (
DeploymentsResource,
AsyncDeploymentsResource,
DeploymentsResourceWithRawResponse,
AsyncDeploymentsResourceWithRawResponse,
DeploymentsResourceWithStreamingResponse,
AsyncDeploymentsResourceWithStreamingResponse,
)

__all__ = [
"BlueprintsResource",
Expand All @@ -40,6 +48,12 @@
"AsyncBlueprintsResourceWithRawResponse",
"BlueprintsResourceWithStreamingResponse",
"AsyncBlueprintsResourceWithStreamingResponse",
"DeploymentsResource",
"AsyncDeploymentsResource",
"DeploymentsResourceWithRawResponse",
"AsyncDeploymentsResourceWithRawResponse",
"DeploymentsResourceWithStreamingResponse",
"AsyncDeploymentsResourceWithStreamingResponse",
"DevboxesResource",
"AsyncDevboxesResource",
"DevboxesResourceWithRawResponse",
Expand Down
Loading