Skip to content

Commit ed42599

Browse files
authored
Merge pull request #14 from onkernel/release-please--branches--main--changes--next
release: 0.1.0-alpha.12
2 parents ca58200 + d31fd22 commit ed42599

15 files changed

+546
-8
lines changed

.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.11"
2+
".": "0.1.0-alpha.12"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 5
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-1fe396b957ced73281fc0a61a69b630836aa5c89a8dccce2c5a1716bc9775e80.yml
3-
openapi_spec_hash: 9a0d67fb0781be034b77839584109638
4-
config_hash: df889df131f7438197abd59faace3c77
1+
configured_endpoints: 7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-c9d64df733f286f09d2203f4e3d820ce57e8d4c629c5e2db4e2bfac91fbc1598.yml
3+
openapi_spec_hash: fa407611fc566d55f403864fbfaa6c23
4+
config_hash: 7f67c5b95af1e4b39525515240b72275

CHANGELOG.md

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

3+
## 0.1.0-alpha.12 (2025-05-19)
4+
5+
Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/onkernel/kernel-python-sdk/compare/v0.1.0-alpha.11...v0.1.0-alpha.12)
6+
7+
### Features
8+
9+
* **api:** update via SDK Studio ([7ae75cc](https://github.com/onkernel/kernel-python-sdk/commit/7ae75cc86e63a349ba4cd0d3e7a5e9814865766e))
10+
* **api:** update via SDK Studio ([6359d12](https://github.com/onkernel/kernel-python-sdk/commit/6359d1225c4859929868fd58b67bbe00146951de))
11+
312
## 0.1.0-alpha.11 (2025-05-19)
413

514
Full Changelog: [v0.1.0-alpha.10...v0.1.0-alpha.11](https://github.com/onkernel/kernel-python-sdk/compare/v0.1.0-alpha.10...v0.1.0-alpha.11)

api.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
# Apps
22

3+
Types:
4+
5+
```python
6+
from kernel.types import AppListResponse
7+
```
8+
9+
Methods:
10+
11+
- <code title="get /apps">client.apps.<a href="./src/kernel/resources/apps/apps.py">list</a>(\*\*<a href="src/kernel/types/app_list_params.py">params</a>) -> <a href="./src/kernel/types/app_list_response.py">AppListResponse</a></code>
12+
313
## Deployments
414

515
Types:
616

717
```python
8-
from kernel.types.apps import DeploymentCreateResponse
18+
from kernel.types.apps import DeploymentCreateResponse, DeploymentFollowResponse
919
```
1020

1121
Methods:
1222

1323
- <code title="post /deploy">client.apps.deployments.<a href="./src/kernel/resources/apps/deployments.py">create</a>(\*\*<a href="src/kernel/types/apps/deployment_create_params.py">params</a>) -> <a href="./src/kernel/types/apps/deployment_create_response.py">DeploymentCreateResponse</a></code>
24+
- <code title="get /apps/{id}/events">client.apps.deployments.<a href="./src/kernel/resources/apps/deployments.py">follow</a>(id) -> <a href="./src/kernel/types/apps/deployment_follow_response.py">DeploymentFollowResponse</a></code>
1425

1526
## Invocations
1627

pyproject.toml

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

src/kernel/_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__ = "kernel"
4-
__version__ = "0.1.0-alpha.11" # x-release-please-version
4+
__version__ = "0.1.0-alpha.12" # x-release-please-version

src/kernel/resources/apps/apps.py

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@
22

33
from __future__ import annotations
44

5+
import httpx
6+
7+
from ...types import app_list_params
8+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
9+
from ..._utils import maybe_transform, async_maybe_transform
510
from ..._compat import cached_property
611
from ..._resource import SyncAPIResource, AsyncAPIResource
12+
from ..._response import (
13+
to_raw_response_wrapper,
14+
to_streamed_response_wrapper,
15+
async_to_raw_response_wrapper,
16+
async_to_streamed_response_wrapper,
17+
)
718
from .deployments import (
819
DeploymentsResource,
920
AsyncDeploymentsResource,
@@ -20,6 +31,8 @@
2031
InvocationsResourceWithStreamingResponse,
2132
AsyncInvocationsResourceWithStreamingResponse,
2233
)
34+
from ..._base_client import make_request_options
35+
from ...types.app_list_response import AppListResponse
2336

2437
__all__ = ["AppsResource", "AsyncAppsResource"]
2538

@@ -52,6 +65,54 @@ def with_streaming_response(self) -> AppsResourceWithStreamingResponse:
5265
"""
5366
return AppsResourceWithStreamingResponse(self)
5467

68+
def list(
69+
self,
70+
*,
71+
app_name: str | NotGiven = NOT_GIVEN,
72+
version: str | NotGiven = NOT_GIVEN,
73+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
74+
# The extra values given here take precedence over values defined on the client or passed to this method.
75+
extra_headers: Headers | None = None,
76+
extra_query: Query | None = None,
77+
extra_body: Body | None = None,
78+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
79+
) -> AppListResponse:
80+
"""List application versions for the authenticated user.
81+
82+
Optionally filter by app
83+
name and/or version label.
84+
85+
Args:
86+
app_name: Filter results by application name.
87+
88+
version: Filter results by version label.
89+
90+
extra_headers: Send extra headers
91+
92+
extra_query: Add additional query parameters to the request
93+
94+
extra_body: Add additional JSON properties to the request
95+
96+
timeout: Override the client-level default timeout for this request, in seconds
97+
"""
98+
return self._get(
99+
"/apps",
100+
options=make_request_options(
101+
extra_headers=extra_headers,
102+
extra_query=extra_query,
103+
extra_body=extra_body,
104+
timeout=timeout,
105+
query=maybe_transform(
106+
{
107+
"app_name": app_name,
108+
"version": version,
109+
},
110+
app_list_params.AppListParams,
111+
),
112+
),
113+
cast_to=AppListResponse,
114+
)
115+
55116

56117
class AsyncAppsResource(AsyncAPIResource):
57118
@cached_property
@@ -81,11 +142,63 @@ def with_streaming_response(self) -> AsyncAppsResourceWithStreamingResponse:
81142
"""
82143
return AsyncAppsResourceWithStreamingResponse(self)
83144

145+
async def list(
146+
self,
147+
*,
148+
app_name: str | NotGiven = NOT_GIVEN,
149+
version: str | NotGiven = NOT_GIVEN,
150+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
151+
# The extra values given here take precedence over values defined on the client or passed to this method.
152+
extra_headers: Headers | None = None,
153+
extra_query: Query | None = None,
154+
extra_body: Body | None = None,
155+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
156+
) -> AppListResponse:
157+
"""List application versions for the authenticated user.
158+
159+
Optionally filter by app
160+
name and/or version label.
161+
162+
Args:
163+
app_name: Filter results by application name.
164+
165+
version: Filter results by version label.
166+
167+
extra_headers: Send extra headers
168+
169+
extra_query: Add additional query parameters to the request
170+
171+
extra_body: Add additional JSON properties to the request
172+
173+
timeout: Override the client-level default timeout for this request, in seconds
174+
"""
175+
return await self._get(
176+
"/apps",
177+
options=make_request_options(
178+
extra_headers=extra_headers,
179+
extra_query=extra_query,
180+
extra_body=extra_body,
181+
timeout=timeout,
182+
query=await async_maybe_transform(
183+
{
184+
"app_name": app_name,
185+
"version": version,
186+
},
187+
app_list_params.AppListParams,
188+
),
189+
),
190+
cast_to=AppListResponse,
191+
)
192+
84193

85194
class AppsResourceWithRawResponse:
86195
def __init__(self, apps: AppsResource) -> None:
87196
self._apps = apps
88197

198+
self.list = to_raw_response_wrapper(
199+
apps.list,
200+
)
201+
89202
@cached_property
90203
def deployments(self) -> DeploymentsResourceWithRawResponse:
91204
return DeploymentsResourceWithRawResponse(self._apps.deployments)
@@ -99,6 +212,10 @@ class AsyncAppsResourceWithRawResponse:
99212
def __init__(self, apps: AsyncAppsResource) -> None:
100213
self._apps = apps
101214

215+
self.list = async_to_raw_response_wrapper(
216+
apps.list,
217+
)
218+
102219
@cached_property
103220
def deployments(self) -> AsyncDeploymentsResourceWithRawResponse:
104221
return AsyncDeploymentsResourceWithRawResponse(self._apps.deployments)
@@ -112,6 +229,10 @@ class AppsResourceWithStreamingResponse:
112229
def __init__(self, apps: AppsResource) -> None:
113230
self._apps = apps
114231

232+
self.list = to_streamed_response_wrapper(
233+
apps.list,
234+
)
235+
115236
@cached_property
116237
def deployments(self) -> DeploymentsResourceWithStreamingResponse:
117238
return DeploymentsResourceWithStreamingResponse(self._apps.deployments)
@@ -125,6 +246,10 @@ class AsyncAppsResourceWithStreamingResponse:
125246
def __init__(self, apps: AsyncAppsResource) -> None:
126247
self._apps = apps
127248

249+
self.list = async_to_streamed_response_wrapper(
250+
apps.list,
251+
)
252+
128253
@cached_property
129254
def deployments(self) -> AsyncDeploymentsResourceWithStreamingResponse:
130255
return AsyncDeploymentsResourceWithStreamingResponse(self._apps.deployments)

src/kernel/resources/apps/deployments.py

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
async_to_raw_response_wrapper,
1818
async_to_streamed_response_wrapper,
1919
)
20+
from ..._streaming import Stream, AsyncStream
2021
from ...types.apps import deployment_create_params
2122
from ..._base_client import make_request_options
2223
from ...types.apps.deployment_create_response import DeploymentCreateResponse
24+
from ...types.apps.deployment_follow_response import DeploymentFollowResponse
2325

2426
__all__ = ["DeploymentsResource", "AsyncDeploymentsResource"]
2527

@@ -110,6 +112,44 @@ def create(
110112
cast_to=DeploymentCreateResponse,
111113
)
112114

115+
def follow(
116+
self,
117+
id: str,
118+
*,
119+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
120+
# The extra values given here take precedence over values defined on the client or passed to this method.
121+
extra_headers: Headers | None = None,
122+
extra_query: Query | None = None,
123+
extra_body: Body | None = None,
124+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
125+
) -> Stream[DeploymentFollowResponse]:
126+
"""
127+
Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
128+
status updates for a deployed application. The stream terminates automatically
129+
once the application reaches a terminal state.
130+
131+
Args:
132+
extra_headers: Send extra headers
133+
134+
extra_query: Add additional query parameters to the request
135+
136+
extra_body: Add additional JSON properties to the request
137+
138+
timeout: Override the client-level default timeout for this request, in seconds
139+
"""
140+
if not id:
141+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
142+
extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
143+
return self._get(
144+
f"/apps/{id}/events",
145+
options=make_request_options(
146+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
147+
),
148+
cast_to=DeploymentFollowResponse,
149+
stream=True,
150+
stream_cls=Stream[DeploymentFollowResponse],
151+
)
152+
113153

114154
class AsyncDeploymentsResource(AsyncAPIResource):
115155
@cached_property
@@ -197,6 +237,44 @@ async def create(
197237
cast_to=DeploymentCreateResponse,
198238
)
199239

240+
async def follow(
241+
self,
242+
id: str,
243+
*,
244+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
245+
# The extra values given here take precedence over values defined on the client or passed to this method.
246+
extra_headers: Headers | None = None,
247+
extra_query: Query | None = None,
248+
extra_body: Body | None = None,
249+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
250+
) -> AsyncStream[DeploymentFollowResponse]:
251+
"""
252+
Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
253+
status updates for a deployed application. The stream terminates automatically
254+
once the application reaches a terminal state.
255+
256+
Args:
257+
extra_headers: Send extra headers
258+
259+
extra_query: Add additional query parameters to the request
260+
261+
extra_body: Add additional JSON properties to the request
262+
263+
timeout: Override the client-level default timeout for this request, in seconds
264+
"""
265+
if not id:
266+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
267+
extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
268+
return await self._get(
269+
f"/apps/{id}/events",
270+
options=make_request_options(
271+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
272+
),
273+
cast_to=DeploymentFollowResponse,
274+
stream=True,
275+
stream_cls=AsyncStream[DeploymentFollowResponse],
276+
)
277+
200278

201279
class DeploymentsResourceWithRawResponse:
202280
def __init__(self, deployments: DeploymentsResource) -> None:
@@ -205,6 +283,9 @@ def __init__(self, deployments: DeploymentsResource) -> None:
205283
self.create = to_raw_response_wrapper(
206284
deployments.create,
207285
)
286+
self.follow = to_raw_response_wrapper(
287+
deployments.follow,
288+
)
208289

209290

210291
class AsyncDeploymentsResourceWithRawResponse:
@@ -214,6 +295,9 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None:
214295
self.create = async_to_raw_response_wrapper(
215296
deployments.create,
216297
)
298+
self.follow = async_to_raw_response_wrapper(
299+
deployments.follow,
300+
)
217301

218302

219303
class DeploymentsResourceWithStreamingResponse:
@@ -223,6 +307,9 @@ def __init__(self, deployments: DeploymentsResource) -> None:
223307
self.create = to_streamed_response_wrapper(
224308
deployments.create,
225309
)
310+
self.follow = to_streamed_response_wrapper(
311+
deployments.follow,
312+
)
226313

227314

228315
class AsyncDeploymentsResourceWithStreamingResponse:
@@ -232,3 +319,6 @@ def __init__(self, deployments: AsyncDeploymentsResource) -> None:
232319
self.create = async_to_streamed_response_wrapper(
233320
deployments.create,
234321
)
322+
self.follow = async_to_streamed_response_wrapper(
323+
deployments.follow,
324+
)

0 commit comments

Comments
 (0)