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.23"
".": "0.2.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 28
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-d5b31b4bbf540f07391766a9217f0dc872e3c9015dc2282b7b346f6594acbe0c.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-1b1dd59a8326d972ab26f979561252cda4bcaeeb0cc7eb1ab2b8fe2522f90ec0.yml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The REST API documentation can be found on [runloop.ai](https://runloop.ai). The

```sh
# install from PyPI
pip install --pre runloop_api_client
pip install runloop_api_client
```

## Usage
Expand Down
6 changes: 5 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Shared Types

```python
from runloop_api_client.types import FunctionInvocationExecutionDetailView, ProjectLogsView
from runloop_api_client.types import (
FunctionInvocationExecutionDetailView,
LauchParameters,
ProjectLogsView,
)
```

# Account
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.23"
version = "0.2.0"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
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.1.0-alpha.23" # x-release-please-version
__version__ = "0.2.0" # x-release-please-version
9 changes: 5 additions & 4 deletions src/runloop_api_client/resources/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from ..types.blueprint_preview_view import BlueprintPreviewView
from ..types.code_mount_parameters_param import CodeMountParametersParam
from ..types.blueprint_build_logs_list_view import BlueprintBuildLogsListView
from ..types.shared_params.lauch_parameters import LauchParameters

__all__ = ["BlueprintsResource", "AsyncBlueprintsResource"]

Expand Down Expand Up @@ -57,7 +58,7 @@ def create(
code_mounts: Iterable[CodeMountParametersParam] | NotGiven = NOT_GIVEN,
dockerfile: str | NotGiven = NOT_GIVEN,
file_mounts: Dict[str, str] | NotGiven = NOT_GIVEN,
launch_parameters: blueprint_create_params.LaunchParameters | NotGiven = NOT_GIVEN,
launch_parameters: LauchParameters | NotGiven = NOT_GIVEN,
system_setup_commands: 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 Down Expand Up @@ -237,7 +238,7 @@ def preview(
code_mounts: Iterable[CodeMountParametersParam] | NotGiven = NOT_GIVEN,
dockerfile: str | NotGiven = NOT_GIVEN,
file_mounts: Dict[str, str] | NotGiven = NOT_GIVEN,
launch_parameters: blueprint_preview_params.LaunchParameters | NotGiven = NOT_GIVEN,
launch_parameters: LauchParameters | NotGiven = NOT_GIVEN,
system_setup_commands: 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 Down Expand Up @@ -319,7 +320,7 @@ async def create(
code_mounts: Iterable[CodeMountParametersParam] | NotGiven = NOT_GIVEN,
dockerfile: str | NotGiven = NOT_GIVEN,
file_mounts: Dict[str, str] | NotGiven = NOT_GIVEN,
launch_parameters: blueprint_create_params.LaunchParameters | NotGiven = NOT_GIVEN,
launch_parameters: LauchParameters | NotGiven = NOT_GIVEN,
system_setup_commands: 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 Down Expand Up @@ -499,7 +500,7 @@ async def preview(
code_mounts: Iterable[CodeMountParametersParam] | NotGiven = NOT_GIVEN,
dockerfile: str | NotGiven = NOT_GIVEN,
file_mounts: Dict[str, str] | NotGiven = NOT_GIVEN,
launch_parameters: blueprint_preview_params.LaunchParameters | NotGiven = NOT_GIVEN,
launch_parameters: LauchParameters | NotGiven = NOT_GIVEN,
system_setup_commands: 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 Down
5 changes: 3 additions & 2 deletions src/runloop_api_client/resources/devboxes/devboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
from ...types.devbox_execution_detail_view import DevboxExecutionDetailView
from ...types.devbox_create_ssh_key_response import DevboxCreateSSHKeyResponse
from ...types.devbox_disk_snapshots_response import DevboxDiskSnapshotsResponse
from ...types.shared_params.lauch_parameters import LauchParameters
from ...types.devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView

__all__ = ["DevboxesResource", "AsyncDevboxesResource"]
Expand Down Expand Up @@ -105,7 +106,7 @@ def create(
entrypoint: str | NotGiven = NOT_GIVEN,
environment_variables: Dict[str, str] | NotGiven = NOT_GIVEN,
file_mounts: Dict[str, str] | NotGiven = NOT_GIVEN,
launch_parameters: devbox_create_params.LaunchParameters | NotGiven = NOT_GIVEN,
launch_parameters: LauchParameters | NotGiven = NOT_GIVEN,
metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
prebuilt: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -688,7 +689,7 @@ async def create(
entrypoint: str | NotGiven = NOT_GIVEN,
environment_variables: Dict[str, str] | NotGiven = NOT_GIVEN,
file_mounts: Dict[str, str] | NotGiven = NOT_GIVEN,
launch_parameters: devbox_create_params.LaunchParameters | NotGiven = NOT_GIVEN,
launch_parameters: LauchParameters | NotGiven = NOT_GIVEN,
metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
prebuilt: str | NotGiven = NOT_GIVEN,
Expand Down
1 change: 1 addition & 0 deletions src/runloop_api_client/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

from .shared import (
LauchParameters as LauchParameters,
ProjectLogsView as ProjectLogsView,
FunctionInvocationExecutionDetailView as FunctionInvocationExecutionDetailView,
)
Expand Down
20 changes: 3 additions & 17 deletions src/runloop_api_client/types/blueprint_build_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,10 @@
from typing import Dict, List, Optional

from .._models import BaseModel
from .resource_size import ResourceSize
from .code_mount_parameters import CodeMountParameters
from .shared.lauch_parameters import LauchParameters

__all__ = ["BlueprintBuildParameters", "LaunchParameters"]


class LaunchParameters(BaseModel):
keep_alive_time_seconds: Optional[int] = None
"""Time in seconds after which Devbox will automatically shutdown.

Default is 1 hour.
"""

launch_commands: Optional[List[str]] = None
"""Set of commands to be run at launch time, before the entrypoint process is run."""

resource_size_request: Optional[ResourceSize] = None
"""Manual resource configuration for Devbox. If not set, defaults will be used."""
__all__ = ["BlueprintBuildParameters"]


class BlueprintBuildParameters(BaseModel):
Expand All @@ -36,7 +22,7 @@ class BlueprintBuildParameters(BaseModel):
file_mounts: Optional[Dict[str, str]] = None
"""(Optional) Map of paths and file contents to write before setup.."""

launch_parameters: Optional[LaunchParameters] = None
launch_parameters: Optional[LauchParameters] = None
"""Parameters to configure your Devbox at launch time."""

system_setup_commands: Optional[List[str]] = None
Expand Down
20 changes: 3 additions & 17 deletions src/runloop_api_client/types/blueprint_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from typing import Dict, List, Iterable
from typing_extensions import Required, TypedDict

from .resource_size import ResourceSize
from .code_mount_parameters_param import CodeMountParametersParam
from .shared_params.lauch_parameters import LauchParameters

__all__ = ["BlueprintCreateParams", "LaunchParameters"]
__all__ = ["BlueprintCreateParams"]


class BlueprintCreateParams(TypedDict, total=False):
Expand All @@ -24,22 +24,8 @@ class BlueprintCreateParams(TypedDict, total=False):
file_mounts: Dict[str, str]
"""(Optional) Map of paths and file contents to write before setup.."""

launch_parameters: LaunchParameters
launch_parameters: LauchParameters
"""Parameters to configure your Devbox at launch time."""

system_setup_commands: List[str]
"""A list of commands to run to set up your system."""


class LaunchParameters(TypedDict, total=False):
keep_alive_time_seconds: int
"""Time in seconds after which Devbox will automatically shutdown.

Default is 1 hour.
"""

launch_commands: List[str]
"""Set of commands to be run at launch time, before the entrypoint process is run."""

resource_size_request: ResourceSize
"""Manual resource configuration for Devbox. If not set, defaults will be used."""
20 changes: 3 additions & 17 deletions src/runloop_api_client/types/blueprint_preview_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from typing import Dict, List, Iterable
from typing_extensions import Required, TypedDict

from .resource_size import ResourceSize
from .code_mount_parameters_param import CodeMountParametersParam
from .shared_params.lauch_parameters import LauchParameters

__all__ = ["BlueprintPreviewParams", "LaunchParameters"]
__all__ = ["BlueprintPreviewParams"]


class BlueprintPreviewParams(TypedDict, total=False):
Expand All @@ -24,22 +24,8 @@ class BlueprintPreviewParams(TypedDict, total=False):
file_mounts: Dict[str, str]
"""(Optional) Map of paths and file contents to write before setup.."""

launch_parameters: LaunchParameters
launch_parameters: LauchParameters
"""Parameters to configure your Devbox at launch time."""

system_setup_commands: List[str]
"""A list of commands to run to set up your system."""


class LaunchParameters(TypedDict, total=False):
keep_alive_time_seconds: int
"""Time in seconds after which Devbox will automatically shutdown.

Default is 1 hour.
"""

launch_commands: List[str]
"""Set of commands to be run at launch time, before the entrypoint process is run."""

resource_size_request: ResourceSize
"""Manual resource configuration for Devbox. If not set, defaults will be used."""
20 changes: 3 additions & 17 deletions src/runloop_api_client/types/devbox_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from typing import Dict, List, Iterable
from typing_extensions import TypedDict

from .resource_size import ResourceSize
from .code_mount_parameters_param import CodeMountParametersParam
from .shared_params.lauch_parameters import LauchParameters

__all__ = ["DevboxCreateParams", "LaunchParameters"]
__all__ = ["DevboxCreateParams"]


class DevboxCreateParams(TypedDict, total=False):
Expand Down Expand Up @@ -41,7 +41,7 @@ class DevboxCreateParams(TypedDict, total=False):
file_mounts: Dict[str, str]
"""(Optional) Map of paths and file contents to write before setup.."""

launch_parameters: LaunchParameters
launch_parameters: LauchParameters
"""Parameters to configure the resources and launch time behavior of the Devbox."""

metadata: Dict[str, str]
Expand All @@ -62,17 +62,3 @@ class DevboxCreateParams(TypedDict, total=False):

snapshot_id: str
"""Snapshot ID to use for the Devbox."""


class LaunchParameters(TypedDict, total=False):
keep_alive_time_seconds: int
"""Time in seconds after which Devbox will automatically shutdown.

Default is 1 hour.
"""

launch_commands: List[str]
"""Set of commands to be run at launch time, before the entrypoint process is run."""

resource_size_request: ResourceSize
"""Manual resource configuration for Devbox. If not set, defaults will be used."""
22 changes: 4 additions & 18 deletions src/runloop_api_client/types/devbox_view.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Dict, List, Optional
from typing import Dict, Optional
from typing_extensions import Literal

from .._models import BaseModel
from .resource_size import ResourceSize
from .shared.lauch_parameters import LauchParameters

__all__ = ["DevboxView", "LaunchParameters"]


class LaunchParameters(BaseModel):
keep_alive_time_seconds: Optional[int] = None
"""Time in seconds after which Devbox will automatically shutdown.

Default is 1 hour.
"""

launch_commands: Optional[List[str]] = None
"""Set of commands to be run at launch time, before the entrypoint process is run."""

resource_size_request: Optional[ResourceSize] = None
"""Manual resource configuration for Devbox. If not set, defaults will be used."""
__all__ = ["DevboxView"]


class DevboxView(BaseModel):
Expand All @@ -36,7 +22,7 @@ class DevboxView(BaseModel):
initiator_type: Literal["unknown", "api", "invocation"]
"""The initiator of the devbox."""

launch_parameters: LaunchParameters
launch_parameters: LauchParameters
"""The launch parameters used to create the Devbox."""

metadata: Dict[str, str]
Expand Down
1 change: 1 addition & 0 deletions src/runloop_api_client/types/shared/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .lauch_parameters import LauchParameters as LauchParameters
from .project_logs_view import ProjectLogsView as ProjectLogsView
from .function_invocation_execution_detail_view import (
FunctionInvocationExecutionDetailView as FunctionInvocationExecutionDetailView,
Expand Down
22 changes: 22 additions & 0 deletions src/runloop_api_client/types/shared/lauch_parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional

from ..._models import BaseModel
from ..resource_size import ResourceSize

__all__ = ["LauchParameters"]


class LauchParameters(BaseModel):
keep_alive_time_seconds: Optional[int] = None
"""Time in seconds after which Devbox will automatically shutdown.

Default is 1 hour.
"""

launch_commands: Optional[List[str]] = None
"""Set of commands to be run at launch time, before the entrypoint process is run."""

resource_size_request: Optional[ResourceSize] = None
"""Manual resource configuration for Devbox. If not set, defaults will be used."""
3 changes: 3 additions & 0 deletions src/runloop_api_client/types/shared_params/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .lauch_parameters import LauchParameters as LauchParameters
25 changes: 25 additions & 0 deletions src/runloop_api_client/types/shared_params/lauch_parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import List
from typing_extensions import TypedDict

from .resource_size import ResourceSize
from ..resource_size import ResourceSize

__all__ = ["LauchParameters"]


class LauchParameters(TypedDict, total=False):
keep_alive_time_seconds: int
"""Time in seconds after which Devbox will automatically shutdown.

Default is 1 hour.
"""

launch_commands: List[str]
"""Set of commands to be run at launch time, before the entrypoint process is run."""

resource_size_request: ResourceSize
"""Manual resource configuration for Devbox. If not set, defaults will be used."""