From ab1f806916ffa510799f2780ba1e770baedc0933 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 02:34:15 +0000 Subject: [PATCH 1/5] =?UTF-8?q?fix(ci):=20release-doctor=20=E2=80=94=20rep?= =?UTF-8?q?ort=20correct=20token=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/check-release-environment | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/check-release-environment b/bin/check-release-environment index 47a8dca..b845b0f 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -3,7 +3,7 @@ errors=() if [ -z "${PYPI_TOKEN}" ]; then - errors+=("The KERNEL_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") + errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") fi lenErrors=${#errors[@]} From ade788484f181ebfb516d831ee01aba9b9ef4037 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 17:02:22 +0000 Subject: [PATCH 2/5] feat(api): add GET deployments endpoint --- .stats.yml | 8 +- api.md | 4 +- src/kernel/resources/deployments.py | 91 ++++++++++++++++++- src/kernel/types/__init__.py | 3 + src/kernel/types/app_list_response.py | 12 ++- .../types/apps/deployment_create_response.py | 8 +- .../types/deployment_follow_response.py | 10 +- src/kernel/types/deployment_list_params.py | 12 +++ src/kernel/types/deployment_list_response.py | 38 ++++++++ src/kernel/types/shared/__init__.py | 1 + src/kernel/types/shared/app_action.py | 10 ++ tests/api_resources/test_deployments.py | 73 +++++++++++++++ 12 files changed, 247 insertions(+), 23 deletions(-) create mode 100644 src/kernel/types/deployment_list_params.py create mode 100644 src/kernel/types/deployment_list_response.py create mode 100644 src/kernel/types/shared/app_action.py diff --git a/.stats.yml b/.stats.yml index 60f163b..9625f4e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 16 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-ff8ccba8b5409eaa1128df9027582cb63f66e8accd75e511f70b7c27ef26c9ae.yml -openapi_spec_hash: 1dbacc339695a7c78718f90f791d3f01 -config_hash: b8e1fff080fbaa22656ab0a57b591777 +configured_endpoints: 17 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-2eeb61205775c5997abf8154cd6f6fe81a1e83870eff10050b17ed415aa7860b.yml +openapi_spec_hash: 63405add4a3f53718f8183cbb8c1a22f +config_hash: 00ec9df250b9dc077f8d3b93a442d252 diff --git a/api.md b/api.md index c8f114f..49538b6 100644 --- a/api.md +++ b/api.md @@ -1,7 +1,7 @@ # Shared Types ```python -from kernel.types import ErrorDetail, ErrorEvent, ErrorModel, HeartbeatEvent, LogEvent +from kernel.types import AppAction, ErrorDetail, ErrorEvent, ErrorModel, HeartbeatEvent, LogEvent ``` # Deployments @@ -13,6 +13,7 @@ from kernel.types import ( DeploymentStateEvent, DeploymentCreateResponse, DeploymentRetrieveResponse, + DeploymentListResponse, DeploymentFollowResponse, ) ``` @@ -21,6 +22,7 @@ Methods: - client.deployments.create(\*\*params) -> DeploymentCreateResponse - client.deployments.retrieve(id) -> DeploymentRetrieveResponse +- client.deployments.list(\*\*params) -> DeploymentListResponse - client.deployments.follow(id, \*\*params) -> DeploymentFollowResponse # Apps diff --git a/src/kernel/resources/deployments.py b/src/kernel/resources/deployments.py index f27c894..d54c4ec 100644 --- a/src/kernel/resources/deployments.py +++ b/src/kernel/resources/deployments.py @@ -7,7 +7,7 @@ import httpx -from ..types import deployment_create_params, deployment_follow_params +from ..types import deployment_list_params, deployment_create_params, deployment_follow_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from .._compat import cached_property @@ -20,6 +20,7 @@ ) from .._streaming import Stream, AsyncStream from .._base_client import make_request_options +from ..types.deployment_list_response import DeploymentListResponse from ..types.deployment_create_response import DeploymentCreateResponse from ..types.deployment_follow_response import DeploymentFollowResponse from ..types.deployment_retrieve_response import DeploymentRetrieveResponse @@ -146,6 +147,44 @@ def retrieve( cast_to=DeploymentRetrieveResponse, ) + def list( + self, + *, + app_name: 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> DeploymentListResponse: + """List deployments. + + Optionally filter by application name. + + Args: + app_name: Filter results by application name. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/deployments", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"app_name": app_name}, deployment_list_params.DeploymentListParams), + ), + cast_to=DeploymentListResponse, + ) + def follow( self, id: str, @@ -313,6 +352,44 @@ async def retrieve( cast_to=DeploymentRetrieveResponse, ) + async def list( + self, + *, + app_name: 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> DeploymentListResponse: + """List deployments. + + Optionally filter by application name. + + Args: + app_name: Filter results by application name. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + "/deployments", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform({"app_name": app_name}, deployment_list_params.DeploymentListParams), + ), + cast_to=DeploymentListResponse, + ) + async def follow( self, id: str, @@ -371,6 +448,9 @@ def __init__(self, deployments: DeploymentsResource) -> None: self.retrieve = to_raw_response_wrapper( deployments.retrieve, ) + self.list = to_raw_response_wrapper( + deployments.list, + ) self.follow = to_raw_response_wrapper( deployments.follow, ) @@ -386,6 +466,9 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None: self.retrieve = async_to_raw_response_wrapper( deployments.retrieve, ) + self.list = async_to_raw_response_wrapper( + deployments.list, + ) self.follow = async_to_raw_response_wrapper( deployments.follow, ) @@ -401,6 +484,9 @@ def __init__(self, deployments: DeploymentsResource) -> None: self.retrieve = to_streamed_response_wrapper( deployments.retrieve, ) + self.list = to_streamed_response_wrapper( + deployments.list, + ) self.follow = to_streamed_response_wrapper( deployments.follow, ) @@ -416,6 +502,9 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None: self.retrieve = async_to_streamed_response_wrapper( deployments.retrieve, ) + self.list = async_to_streamed_response_wrapper( + deployments.list, + ) self.follow = async_to_streamed_response_wrapper( deployments.follow, ) diff --git a/src/kernel/types/__init__.py b/src/kernel/types/__init__.py index c816cf1..c89d7d5 100644 --- a/src/kernel/types/__init__.py +++ b/src/kernel/types/__init__.py @@ -4,6 +4,7 @@ from .shared import ( LogEvent as LogEvent, + AppAction as AppAction, ErrorEvent as ErrorEvent, ErrorModel as ErrorModel, ErrorDetail as ErrorDetail, @@ -15,11 +16,13 @@ from .browser_create_params import BrowserCreateParams as BrowserCreateParams from .browser_delete_params import BrowserDeleteParams as BrowserDeleteParams from .browser_list_response import BrowserListResponse as BrowserListResponse +from .deployment_list_params import DeploymentListParams as DeploymentListParams from .deployment_state_event import DeploymentStateEvent as DeploymentStateEvent from .invocation_state_event import InvocationStateEvent as InvocationStateEvent from .browser_create_response import BrowserCreateResponse as BrowserCreateResponse from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams from .deployment_follow_params import DeploymentFollowParams as DeploymentFollowParams +from .deployment_list_response import DeploymentListResponse as DeploymentListResponse from .invocation_create_params import InvocationCreateParams as InvocationCreateParams from .invocation_update_params import InvocationUpdateParams as InvocationUpdateParams from .browser_persistence_param import BrowserPersistenceParam as BrowserPersistenceParam diff --git a/src/kernel/types/app_list_response.py b/src/kernel/types/app_list_response.py index cf8463e..bdbc3e6 100644 --- a/src/kernel/types/app_list_response.py +++ b/src/kernel/types/app_list_response.py @@ -1,9 +1,10 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from typing_extensions import Literal, TypeAlias from .._models import BaseModel +from .shared.app_action import AppAction __all__ = ["AppListResponse", "AppListResponseItem"] @@ -12,20 +13,23 @@ class AppListResponseItem(BaseModel): id: str """Unique identifier for the app version""" + actions: List[AppAction] + """List of actions available on the app""" + app_name: str """Name of the application""" deployment: str """Deployment ID""" + env_vars: Dict[str, str] + """Environment variables configured for this app version""" + region: Literal["aws.us-east-1a"] """Deployment region code""" version: str """Version label for the application""" - env_vars: Optional[Dict[str, str]] = None - """Environment variables configured for this app version""" - AppListResponse: TypeAlias = List[AppListResponseItem] diff --git a/src/kernel/types/apps/deployment_create_response.py b/src/kernel/types/apps/deployment_create_response.py index f801195..8696a0f 100644 --- a/src/kernel/types/apps/deployment_create_response.py +++ b/src/kernel/types/apps/deployment_create_response.py @@ -4,13 +4,9 @@ from typing_extensions import Literal from ..._models import BaseModel +from ..shared.app_action import AppAction -__all__ = ["DeploymentCreateResponse", "App", "AppAction"] - - -class AppAction(BaseModel): - name: str - """Name of the action""" +__all__ = ["DeploymentCreateResponse", "App"] class App(BaseModel): diff --git a/src/kernel/types/deployment_follow_response.py b/src/kernel/types/deployment_follow_response.py index 00f0685..ca3c512 100644 --- a/src/kernel/types/deployment_follow_response.py +++ b/src/kernel/types/deployment_follow_response.py @@ -7,23 +7,19 @@ from .._utils import PropertyInfo from .._models import BaseModel from .shared.log_event import LogEvent +from .shared.app_action import AppAction from .shared.error_event import ErrorEvent from .deployment_state_event import DeploymentStateEvent from .shared.heartbeat_event import HeartbeatEvent -__all__ = ["DeploymentFollowResponse", "AppVersionSummaryEvent", "AppVersionSummaryEventAction"] - - -class AppVersionSummaryEventAction(BaseModel): - name: str - """Name of the action""" +__all__ = ["DeploymentFollowResponse", "AppVersionSummaryEvent"] class AppVersionSummaryEvent(BaseModel): id: str """Unique identifier for the app version""" - actions: List[AppVersionSummaryEventAction] + actions: List[AppAction] """List of actions available on the app""" app_name: str diff --git a/src/kernel/types/deployment_list_params.py b/src/kernel/types/deployment_list_params.py new file mode 100644 index 0000000..05704a1 --- /dev/null +++ b/src/kernel/types/deployment_list_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["DeploymentListParams"] + + +class DeploymentListParams(TypedDict, total=False): + app_name: str + """Filter results by application name.""" diff --git a/src/kernel/types/deployment_list_response.py b/src/kernel/types/deployment_list_response.py new file mode 100644 index 0000000..ba7759d --- /dev/null +++ b/src/kernel/types/deployment_list_response.py @@ -0,0 +1,38 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional +from datetime import datetime +from typing_extensions import Literal, TypeAlias + +from .._models import BaseModel + +__all__ = ["DeploymentListResponse", "DeploymentListResponseItem"] + + +class DeploymentListResponseItem(BaseModel): + id: str + """Unique identifier for the deployment""" + + created_at: datetime + """Timestamp when the deployment was created""" + + region: Literal["aws.us-east-1a"] + """Deployment region code""" + + status: Literal["queued", "in_progress", "running", "failed", "stopped"] + """Current status of the deployment""" + + entrypoint_rel_path: Optional[str] = None + """Relative path to the application entrypoint""" + + env_vars: Optional[Dict[str, str]] = None + """Environment variables configured for this deployment""" + + status_reason: Optional[str] = None + """Status reason""" + + updated_at: Optional[datetime] = None + """Timestamp when the deployment was last updated""" + + +DeploymentListResponse: TypeAlias = List[DeploymentListResponseItem] diff --git a/src/kernel/types/shared/__init__.py b/src/kernel/types/shared/__init__.py index 60a8de8..ea360f1 100644 --- a/src/kernel/types/shared/__init__.py +++ b/src/kernel/types/shared/__init__.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from .log_event import LogEvent as LogEvent +from .app_action import AppAction as AppAction from .error_event import ErrorEvent as ErrorEvent from .error_model import ErrorModel as ErrorModel from .error_detail import ErrorDetail as ErrorDetail diff --git a/src/kernel/types/shared/app_action.py b/src/kernel/types/shared/app_action.py new file mode 100644 index 0000000..3d71136 --- /dev/null +++ b/src/kernel/types/shared/app_action.py @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from ..._models import BaseModel + +__all__ = ["AppAction"] + + +class AppAction(BaseModel): + name: str + """Name of the action""" diff --git a/tests/api_resources/test_deployments.py b/tests/api_resources/test_deployments.py index f68c9b0..3221416 100644 --- a/tests/api_resources/test_deployments.py +++ b/tests/api_resources/test_deployments.py @@ -10,6 +10,7 @@ from kernel import Kernel, AsyncKernel from tests.utils import assert_matches_type from kernel.types import ( + DeploymentListResponse, DeploymentCreateResponse, DeploymentRetrieveResponse, ) @@ -112,6 +113,42 @@ def test_path_params_retrieve(self, client: Kernel) -> None: "", ) + @pytest.mark.skip() + @parametrize + def test_method_list(self, client: Kernel) -> None: + deployment = client.deployments.list() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_method_list_with_all_params(self, client: Kernel) -> None: + deployment = client.deployments.list( + app_name="app_name", + ) + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_raw_response_list(self, client: Kernel) -> None: + response = client.deployments.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment = response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_streaming_response_list(self, client: Kernel) -> None: + with client.deployments.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment = response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip( reason="currently no good way to test endpoints with content type text/event-stream, Prism mock server will fail" ) @@ -270,6 +307,42 @@ async def test_path_params_retrieve(self, async_client: AsyncKernel) -> None: "", ) + @pytest.mark.skip() + @parametrize + async def test_method_list(self, async_client: AsyncKernel) -> None: + deployment = await async_client.deployments.list() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncKernel) -> None: + deployment = await async_client.deployments.list( + app_name="app_name", + ) + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_raw_response_list(self, async_client: AsyncKernel) -> None: + response = await async_client.deployments.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment = await response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_streaming_response_list(self, async_client: AsyncKernel) -> None: + async with async_client.deployments.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment = await response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip( reason="currently no good way to test endpoints with content type text/event-stream, Prism mock server will fail" ) From 93870c158c0b5b638483b0fa94ce1c2b1484db48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 17:02:46 +0000 Subject: [PATCH 3/5] feat(api): manual updates --- .stats.yml | 6 +- api.md | 2 - src/kernel/resources/deployments.py | 91 +------------------ src/kernel/types/__init__.py | 2 - src/kernel/types/app_list_response.py | 12 +-- .../types/apps/deployment_create_response.py | 8 +- src/kernel/types/deployment_list_params.py | 12 --- src/kernel/types/deployment_list_response.py | 38 -------- tests/api_resources/test_deployments.py | 73 --------------- 9 files changed, 14 insertions(+), 230 deletions(-) delete mode 100644 src/kernel/types/deployment_list_params.py delete mode 100644 src/kernel/types/deployment_list_response.py diff --git a/.stats.yml b/.stats.yml index 9625f4e..731478a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 17 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-2eeb61205775c5997abf8154cd6f6fe81a1e83870eff10050b17ed415aa7860b.yml -openapi_spec_hash: 63405add4a3f53718f8183cbb8c1a22f +configured_endpoints: 16 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-ff8ccba8b5409eaa1128df9027582cb63f66e8accd75e511f70b7c27ef26c9ae.yml +openapi_spec_hash: 1dbacc339695a7c78718f90f791d3f01 config_hash: 00ec9df250b9dc077f8d3b93a442d252 diff --git a/api.md b/api.md index 49538b6..ab8cb4f 100644 --- a/api.md +++ b/api.md @@ -13,7 +13,6 @@ from kernel.types import ( DeploymentStateEvent, DeploymentCreateResponse, DeploymentRetrieveResponse, - DeploymentListResponse, DeploymentFollowResponse, ) ``` @@ -22,7 +21,6 @@ Methods: - client.deployments.create(\*\*params) -> DeploymentCreateResponse - client.deployments.retrieve(id) -> DeploymentRetrieveResponse -- client.deployments.list(\*\*params) -> DeploymentListResponse - client.deployments.follow(id, \*\*params) -> DeploymentFollowResponse # Apps diff --git a/src/kernel/resources/deployments.py b/src/kernel/resources/deployments.py index d54c4ec..f27c894 100644 --- a/src/kernel/resources/deployments.py +++ b/src/kernel/resources/deployments.py @@ -7,7 +7,7 @@ import httpx -from ..types import deployment_list_params, deployment_create_params, deployment_follow_params +from ..types import deployment_create_params, deployment_follow_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from .._compat import cached_property @@ -20,7 +20,6 @@ ) from .._streaming import Stream, AsyncStream from .._base_client import make_request_options -from ..types.deployment_list_response import DeploymentListResponse from ..types.deployment_create_response import DeploymentCreateResponse from ..types.deployment_follow_response import DeploymentFollowResponse from ..types.deployment_retrieve_response import DeploymentRetrieveResponse @@ -147,44 +146,6 @@ def retrieve( cast_to=DeploymentRetrieveResponse, ) - def list( - self, - *, - app_name: 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentListResponse: - """List deployments. - - Optionally filter by application name. - - Args: - app_name: Filter results by application name. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get( - "/deployments", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform({"app_name": app_name}, deployment_list_params.DeploymentListParams), - ), - cast_to=DeploymentListResponse, - ) - def follow( self, id: str, @@ -352,44 +313,6 @@ async def retrieve( cast_to=DeploymentRetrieveResponse, ) - async def list( - self, - *, - app_name: 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. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentListResponse: - """List deployments. - - Optionally filter by application name. - - Args: - app_name: Filter results by application name. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return await self._get( - "/deployments", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform({"app_name": app_name}, deployment_list_params.DeploymentListParams), - ), - cast_to=DeploymentListResponse, - ) - async def follow( self, id: str, @@ -448,9 +371,6 @@ def __init__(self, deployments: DeploymentsResource) -> None: self.retrieve = to_raw_response_wrapper( deployments.retrieve, ) - self.list = to_raw_response_wrapper( - deployments.list, - ) self.follow = to_raw_response_wrapper( deployments.follow, ) @@ -466,9 +386,6 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None: self.retrieve = async_to_raw_response_wrapper( deployments.retrieve, ) - self.list = async_to_raw_response_wrapper( - deployments.list, - ) self.follow = async_to_raw_response_wrapper( deployments.follow, ) @@ -484,9 +401,6 @@ def __init__(self, deployments: DeploymentsResource) -> None: self.retrieve = to_streamed_response_wrapper( deployments.retrieve, ) - self.list = to_streamed_response_wrapper( - deployments.list, - ) self.follow = to_streamed_response_wrapper( deployments.follow, ) @@ -502,9 +416,6 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None: self.retrieve = async_to_streamed_response_wrapper( deployments.retrieve, ) - self.list = async_to_streamed_response_wrapper( - deployments.list, - ) self.follow = async_to_streamed_response_wrapper( deployments.follow, ) diff --git a/src/kernel/types/__init__.py b/src/kernel/types/__init__.py index c89d7d5..a0b086d 100644 --- a/src/kernel/types/__init__.py +++ b/src/kernel/types/__init__.py @@ -16,13 +16,11 @@ from .browser_create_params import BrowserCreateParams as BrowserCreateParams from .browser_delete_params import BrowserDeleteParams as BrowserDeleteParams from .browser_list_response import BrowserListResponse as BrowserListResponse -from .deployment_list_params import DeploymentListParams as DeploymentListParams from .deployment_state_event import DeploymentStateEvent as DeploymentStateEvent from .invocation_state_event import InvocationStateEvent as InvocationStateEvent from .browser_create_response import BrowserCreateResponse as BrowserCreateResponse from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams from .deployment_follow_params import DeploymentFollowParams as DeploymentFollowParams -from .deployment_list_response import DeploymentListResponse as DeploymentListResponse from .invocation_create_params import InvocationCreateParams as InvocationCreateParams from .invocation_update_params import InvocationUpdateParams as InvocationUpdateParams from .browser_persistence_param import BrowserPersistenceParam as BrowserPersistenceParam diff --git a/src/kernel/types/app_list_response.py b/src/kernel/types/app_list_response.py index bdbc3e6..cf8463e 100644 --- a/src/kernel/types/app_list_response.py +++ b/src/kernel/types/app_list_response.py @@ -1,10 +1,9 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List +from typing import Dict, List, Optional from typing_extensions import Literal, TypeAlias from .._models import BaseModel -from .shared.app_action import AppAction __all__ = ["AppListResponse", "AppListResponseItem"] @@ -13,23 +12,20 @@ class AppListResponseItem(BaseModel): id: str """Unique identifier for the app version""" - actions: List[AppAction] - """List of actions available on the app""" - app_name: str """Name of the application""" deployment: str """Deployment ID""" - env_vars: Dict[str, str] - """Environment variables configured for this app version""" - region: Literal["aws.us-east-1a"] """Deployment region code""" version: str """Version label for the application""" + env_vars: Optional[Dict[str, str]] = None + """Environment variables configured for this app version""" + AppListResponse: TypeAlias = List[AppListResponseItem] diff --git a/src/kernel/types/apps/deployment_create_response.py b/src/kernel/types/apps/deployment_create_response.py index 8696a0f..f801195 100644 --- a/src/kernel/types/apps/deployment_create_response.py +++ b/src/kernel/types/apps/deployment_create_response.py @@ -4,9 +4,13 @@ from typing_extensions import Literal from ..._models import BaseModel -from ..shared.app_action import AppAction -__all__ = ["DeploymentCreateResponse", "App"] +__all__ = ["DeploymentCreateResponse", "App", "AppAction"] + + +class AppAction(BaseModel): + name: str + """Name of the action""" class App(BaseModel): diff --git a/src/kernel/types/deployment_list_params.py b/src/kernel/types/deployment_list_params.py deleted file mode 100644 index 05704a1..0000000 --- a/src/kernel/types/deployment_list_params.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import TypedDict - -__all__ = ["DeploymentListParams"] - - -class DeploymentListParams(TypedDict, total=False): - app_name: str - """Filter results by application name.""" diff --git a/src/kernel/types/deployment_list_response.py b/src/kernel/types/deployment_list_response.py deleted file mode 100644 index ba7759d..0000000 --- a/src/kernel/types/deployment_list_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Dict, List, Optional -from datetime import datetime -from typing_extensions import Literal, TypeAlias - -from .._models import BaseModel - -__all__ = ["DeploymentListResponse", "DeploymentListResponseItem"] - - -class DeploymentListResponseItem(BaseModel): - id: str - """Unique identifier for the deployment""" - - created_at: datetime - """Timestamp when the deployment was created""" - - region: Literal["aws.us-east-1a"] - """Deployment region code""" - - status: Literal["queued", "in_progress", "running", "failed", "stopped"] - """Current status of the deployment""" - - entrypoint_rel_path: Optional[str] = None - """Relative path to the application entrypoint""" - - env_vars: Optional[Dict[str, str]] = None - """Environment variables configured for this deployment""" - - status_reason: Optional[str] = None - """Status reason""" - - updated_at: Optional[datetime] = None - """Timestamp when the deployment was last updated""" - - -DeploymentListResponse: TypeAlias = List[DeploymentListResponseItem] diff --git a/tests/api_resources/test_deployments.py b/tests/api_resources/test_deployments.py index 3221416..f68c9b0 100644 --- a/tests/api_resources/test_deployments.py +++ b/tests/api_resources/test_deployments.py @@ -10,7 +10,6 @@ from kernel import Kernel, AsyncKernel from tests.utils import assert_matches_type from kernel.types import ( - DeploymentListResponse, DeploymentCreateResponse, DeploymentRetrieveResponse, ) @@ -113,42 +112,6 @@ def test_path_params_retrieve(self, client: Kernel) -> None: "", ) - @pytest.mark.skip() - @parametrize - def test_method_list(self, client: Kernel) -> None: - deployment = client.deployments.list() - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_list_with_all_params(self, client: Kernel) -> None: - deployment = client.deployments.list( - app_name="app_name", - ) - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_list(self, client: Kernel) -> None: - response = client.deployments.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - deployment = response.parse() - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_list(self, client: Kernel) -> None: - with client.deployments.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - deployment = response.parse() - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - - assert cast(Any, response.is_closed) is True - @pytest.mark.skip( reason="currently no good way to test endpoints with content type text/event-stream, Prism mock server will fail" ) @@ -307,42 +270,6 @@ async def test_path_params_retrieve(self, async_client: AsyncKernel) -> None: "", ) - @pytest.mark.skip() - @parametrize - async def test_method_list(self, async_client: AsyncKernel) -> None: - deployment = await async_client.deployments.list() - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncKernel) -> None: - deployment = await async_client.deployments.list( - app_name="app_name", - ) - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_list(self, async_client: AsyncKernel) -> None: - response = await async_client.deployments.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - deployment = await response.parse() - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_list(self, async_client: AsyncKernel) -> None: - async with async_client.deployments.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - deployment = await response.parse() - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - - assert cast(Any, response.is_closed) is True - @pytest.mark.skip( reason="currently no good way to test endpoints with content type text/event-stream, Prism mock server will fail" ) From 681895c60447b9ac6deaa32cf4031618a242f274 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 17:04:01 +0000 Subject: [PATCH 4/5] feat(api): deployments --- .stats.yml | 6 +- api.md | 2 + src/kernel/resources/deployments.py | 91 ++++++++++++++++++- src/kernel/types/__init__.py | 2 + src/kernel/types/app_list_response.py | 12 ++- .../types/apps/deployment_create_response.py | 8 +- src/kernel/types/deployment_list_params.py | 12 +++ src/kernel/types/deployment_list_response.py | 38 ++++++++ tests/api_resources/test_deployments.py | 73 +++++++++++++++ 9 files changed, 230 insertions(+), 14 deletions(-) create mode 100644 src/kernel/types/deployment_list_params.py create mode 100644 src/kernel/types/deployment_list_response.py diff --git a/.stats.yml b/.stats.yml index 731478a..9625f4e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 16 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-ff8ccba8b5409eaa1128df9027582cb63f66e8accd75e511f70b7c27ef26c9ae.yml -openapi_spec_hash: 1dbacc339695a7c78718f90f791d3f01 +configured_endpoints: 17 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-2eeb61205775c5997abf8154cd6f6fe81a1e83870eff10050b17ed415aa7860b.yml +openapi_spec_hash: 63405add4a3f53718f8183cbb8c1a22f config_hash: 00ec9df250b9dc077f8d3b93a442d252 diff --git a/api.md b/api.md index ab8cb4f..49538b6 100644 --- a/api.md +++ b/api.md @@ -13,6 +13,7 @@ from kernel.types import ( DeploymentStateEvent, DeploymentCreateResponse, DeploymentRetrieveResponse, + DeploymentListResponse, DeploymentFollowResponse, ) ``` @@ -21,6 +22,7 @@ Methods: - client.deployments.create(\*\*params) -> DeploymentCreateResponse - client.deployments.retrieve(id) -> DeploymentRetrieveResponse +- client.deployments.list(\*\*params) -> DeploymentListResponse - client.deployments.follow(id, \*\*params) -> DeploymentFollowResponse # Apps diff --git a/src/kernel/resources/deployments.py b/src/kernel/resources/deployments.py index f27c894..d54c4ec 100644 --- a/src/kernel/resources/deployments.py +++ b/src/kernel/resources/deployments.py @@ -7,7 +7,7 @@ import httpx -from ..types import deployment_create_params, deployment_follow_params +from ..types import deployment_list_params, deployment_create_params, deployment_follow_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from .._compat import cached_property @@ -20,6 +20,7 @@ ) from .._streaming import Stream, AsyncStream from .._base_client import make_request_options +from ..types.deployment_list_response import DeploymentListResponse from ..types.deployment_create_response import DeploymentCreateResponse from ..types.deployment_follow_response import DeploymentFollowResponse from ..types.deployment_retrieve_response import DeploymentRetrieveResponse @@ -146,6 +147,44 @@ def retrieve( cast_to=DeploymentRetrieveResponse, ) + def list( + self, + *, + app_name: 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> DeploymentListResponse: + """List deployments. + + Optionally filter by application name. + + Args: + app_name: Filter results by application name. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/deployments", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"app_name": app_name}, deployment_list_params.DeploymentListParams), + ), + cast_to=DeploymentListResponse, + ) + def follow( self, id: str, @@ -313,6 +352,44 @@ async def retrieve( cast_to=DeploymentRetrieveResponse, ) + async def list( + self, + *, + app_name: 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> DeploymentListResponse: + """List deployments. + + Optionally filter by application name. + + Args: + app_name: Filter results by application name. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + "/deployments", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform({"app_name": app_name}, deployment_list_params.DeploymentListParams), + ), + cast_to=DeploymentListResponse, + ) + async def follow( self, id: str, @@ -371,6 +448,9 @@ def __init__(self, deployments: DeploymentsResource) -> None: self.retrieve = to_raw_response_wrapper( deployments.retrieve, ) + self.list = to_raw_response_wrapper( + deployments.list, + ) self.follow = to_raw_response_wrapper( deployments.follow, ) @@ -386,6 +466,9 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None: self.retrieve = async_to_raw_response_wrapper( deployments.retrieve, ) + self.list = async_to_raw_response_wrapper( + deployments.list, + ) self.follow = async_to_raw_response_wrapper( deployments.follow, ) @@ -401,6 +484,9 @@ def __init__(self, deployments: DeploymentsResource) -> None: self.retrieve = to_streamed_response_wrapper( deployments.retrieve, ) + self.list = to_streamed_response_wrapper( + deployments.list, + ) self.follow = to_streamed_response_wrapper( deployments.follow, ) @@ -416,6 +502,9 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None: self.retrieve = async_to_streamed_response_wrapper( deployments.retrieve, ) + self.list = async_to_streamed_response_wrapper( + deployments.list, + ) self.follow = async_to_streamed_response_wrapper( deployments.follow, ) diff --git a/src/kernel/types/__init__.py b/src/kernel/types/__init__.py index a0b086d..c89d7d5 100644 --- a/src/kernel/types/__init__.py +++ b/src/kernel/types/__init__.py @@ -16,11 +16,13 @@ from .browser_create_params import BrowserCreateParams as BrowserCreateParams from .browser_delete_params import BrowserDeleteParams as BrowserDeleteParams from .browser_list_response import BrowserListResponse as BrowserListResponse +from .deployment_list_params import DeploymentListParams as DeploymentListParams from .deployment_state_event import DeploymentStateEvent as DeploymentStateEvent from .invocation_state_event import InvocationStateEvent as InvocationStateEvent from .browser_create_response import BrowserCreateResponse as BrowserCreateResponse from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams from .deployment_follow_params import DeploymentFollowParams as DeploymentFollowParams +from .deployment_list_response import DeploymentListResponse as DeploymentListResponse from .invocation_create_params import InvocationCreateParams as InvocationCreateParams from .invocation_update_params import InvocationUpdateParams as InvocationUpdateParams from .browser_persistence_param import BrowserPersistenceParam as BrowserPersistenceParam diff --git a/src/kernel/types/app_list_response.py b/src/kernel/types/app_list_response.py index cf8463e..bdbc3e6 100644 --- a/src/kernel/types/app_list_response.py +++ b/src/kernel/types/app_list_response.py @@ -1,9 +1,10 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, List from typing_extensions import Literal, TypeAlias from .._models import BaseModel +from .shared.app_action import AppAction __all__ = ["AppListResponse", "AppListResponseItem"] @@ -12,20 +13,23 @@ class AppListResponseItem(BaseModel): id: str """Unique identifier for the app version""" + actions: List[AppAction] + """List of actions available on the app""" + app_name: str """Name of the application""" deployment: str """Deployment ID""" + env_vars: Dict[str, str] + """Environment variables configured for this app version""" + region: Literal["aws.us-east-1a"] """Deployment region code""" version: str """Version label for the application""" - env_vars: Optional[Dict[str, str]] = None - """Environment variables configured for this app version""" - AppListResponse: TypeAlias = List[AppListResponseItem] diff --git a/src/kernel/types/apps/deployment_create_response.py b/src/kernel/types/apps/deployment_create_response.py index f801195..8696a0f 100644 --- a/src/kernel/types/apps/deployment_create_response.py +++ b/src/kernel/types/apps/deployment_create_response.py @@ -4,13 +4,9 @@ from typing_extensions import Literal from ..._models import BaseModel +from ..shared.app_action import AppAction -__all__ = ["DeploymentCreateResponse", "App", "AppAction"] - - -class AppAction(BaseModel): - name: str - """Name of the action""" +__all__ = ["DeploymentCreateResponse", "App"] class App(BaseModel): diff --git a/src/kernel/types/deployment_list_params.py b/src/kernel/types/deployment_list_params.py new file mode 100644 index 0000000..05704a1 --- /dev/null +++ b/src/kernel/types/deployment_list_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["DeploymentListParams"] + + +class DeploymentListParams(TypedDict, total=False): + app_name: str + """Filter results by application name.""" diff --git a/src/kernel/types/deployment_list_response.py b/src/kernel/types/deployment_list_response.py new file mode 100644 index 0000000..ba7759d --- /dev/null +++ b/src/kernel/types/deployment_list_response.py @@ -0,0 +1,38 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional +from datetime import datetime +from typing_extensions import Literal, TypeAlias + +from .._models import BaseModel + +__all__ = ["DeploymentListResponse", "DeploymentListResponseItem"] + + +class DeploymentListResponseItem(BaseModel): + id: str + """Unique identifier for the deployment""" + + created_at: datetime + """Timestamp when the deployment was created""" + + region: Literal["aws.us-east-1a"] + """Deployment region code""" + + status: Literal["queued", "in_progress", "running", "failed", "stopped"] + """Current status of the deployment""" + + entrypoint_rel_path: Optional[str] = None + """Relative path to the application entrypoint""" + + env_vars: Optional[Dict[str, str]] = None + """Environment variables configured for this deployment""" + + status_reason: Optional[str] = None + """Status reason""" + + updated_at: Optional[datetime] = None + """Timestamp when the deployment was last updated""" + + +DeploymentListResponse: TypeAlias = List[DeploymentListResponseItem] diff --git a/tests/api_resources/test_deployments.py b/tests/api_resources/test_deployments.py index f68c9b0..3221416 100644 --- a/tests/api_resources/test_deployments.py +++ b/tests/api_resources/test_deployments.py @@ -10,6 +10,7 @@ from kernel import Kernel, AsyncKernel from tests.utils import assert_matches_type from kernel.types import ( + DeploymentListResponse, DeploymentCreateResponse, DeploymentRetrieveResponse, ) @@ -112,6 +113,42 @@ def test_path_params_retrieve(self, client: Kernel) -> None: "", ) + @pytest.mark.skip() + @parametrize + def test_method_list(self, client: Kernel) -> None: + deployment = client.deployments.list() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_method_list_with_all_params(self, client: Kernel) -> None: + deployment = client.deployments.list( + app_name="app_name", + ) + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_raw_response_list(self, client: Kernel) -> None: + response = client.deployments.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment = response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_streaming_response_list(self, client: Kernel) -> None: + with client.deployments.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment = response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip( reason="currently no good way to test endpoints with content type text/event-stream, Prism mock server will fail" ) @@ -270,6 +307,42 @@ async def test_path_params_retrieve(self, async_client: AsyncKernel) -> None: "", ) + @pytest.mark.skip() + @parametrize + async def test_method_list(self, async_client: AsyncKernel) -> None: + deployment = await async_client.deployments.list() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncKernel) -> None: + deployment = await async_client.deployments.list( + app_name="app_name", + ) + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_raw_response_list(self, async_client: AsyncKernel) -> None: + response = await async_client.deployments.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment = await response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_streaming_response_list(self, async_client: AsyncKernel) -> None: + async with async_client.deployments.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment = await response.parse() + assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip( reason="currently no good way to test endpoints with content type text/event-stream, Prism mock server will fail" ) From 66492587d4644302db9bcd0e23b157b90fddb369 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 17:04:54 +0000 Subject: [PATCH 5/5] release: 0.6.4 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ pyproject.toml | 2 +- src/kernel/_version.py | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5c87ad8..12aa896 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.6.3" + ".": "0.6.4" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cf0804..5dab9a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 0.6.4 (2025-06-27) + +Full Changelog: [v0.6.3...v0.6.4](https://github.com/onkernel/kernel-python-sdk/compare/v0.6.3...v0.6.4) + +### Features + +* **api:** add GET deployments endpoint ([ade7884](https://github.com/onkernel/kernel-python-sdk/commit/ade788484f181ebfb516d831ee01aba9b9ef4037)) +* **api:** deployments ([681895c](https://github.com/onkernel/kernel-python-sdk/commit/681895c60447b9ac6deaa32cf4031618a242f274)) +* **api:** manual updates ([93870c1](https://github.com/onkernel/kernel-python-sdk/commit/93870c158c0b5b638483b0fa94ce1c2b1484db48)) + + +### Bug Fixes + +* **ci:** release-doctor — report correct token name ([ab1f806](https://github.com/onkernel/kernel-python-sdk/commit/ab1f806916ffa510799f2780ba1e770baedc0933)) + ## 0.6.3 (2025-06-25) Full Changelog: [v0.6.2...v0.6.3](https://github.com/onkernel/kernel-python-sdk/compare/v0.6.2...v0.6.3) diff --git a/pyproject.toml b/pyproject.toml index cec894e..0c6e6ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "kernel" -version = "0.6.3" +version = "0.6.4" description = "The official Python library for the kernel API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/kernel/_version.py b/src/kernel/_version.py index 8903bb2..e0e69ec 100644 --- a/src/kernel/_version.py +++ b/src/kernel/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "kernel" -__version__ = "0.6.3" # x-release-please-version +__version__ = "0.6.4" # x-release-please-version