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.5"
".": "0.1.0-alpha.6"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 4
configured_endpoints: 3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d168b58fcf39dbd0458d132091793d3e2d0930070b7dda2d5f7f1baff20dd31b.yml
openapi_spec_hash: b7e0fd7ee1656d7dbad57209d1584d92
config_hash: 2d282609080a6011e3f6222451f72237
config_hash: 9139d1eb064baf60fd2265aac382f097
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0-alpha.6 (2025-05-11)

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

### Features

* **api:** update via SDK Studio ([d2d465e](https://github.com/onkernel/kernel-python-sdk/commit/d2d465ee112484eb9acd1b5f8714bc5650f2b4de))

## 0.1.0-alpha.5 (2025-05-10)

Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/onkernel/kernel-python-sdk/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)
Expand Down
3 changes: 1 addition & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
Types:

```python
from kernel.types import AppDeployResponse, AppInvokeResponse, AppRetrieveInvocationResponse
from kernel.types import AppDeployResponse, AppInvokeResponse
```

Methods:

- <code title="post /apps/deploy">client.apps.<a href="./src/kernel/resources/apps.py">deploy</a>(\*\*<a href="src/kernel/types/app_deploy_params.py">params</a>) -> <a href="./src/kernel/types/app_deploy_response.py">AppDeployResponse</a></code>
- <code title="post /apps/invoke">client.apps.<a href="./src/kernel/resources/apps.py">invoke</a>(\*\*<a href="src/kernel/types/app_invoke_params.py">params</a>) -> <a href="./src/kernel/types/app_invoke_response.py">AppInvokeResponse</a></code>
- <code title="get /apps/invocations/{id}">client.apps.<a href="./src/kernel/resources/apps.py">retrieve_invocation</a>(id) -> <a href="./src/kernel/types/app_retrieve_invocation_response.py">AppRetrieveInvocationResponse</a></code>

# Browser

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 = "kernel"
version = "0.1.0-alpha.5"
version = "0.1.0-alpha.6"
description = "The official Python library for the kernel API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/_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__ = "kernel"
__version__ = "0.1.0-alpha.5" # x-release-please-version
__version__ = "0.1.0-alpha.6" # x-release-please-version
79 changes: 0 additions & 79 deletions src/kernel/resources/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from .._base_client import make_request_options
from ..types.app_deploy_response import AppDeployResponse
from ..types.app_invoke_response import AppInvokeResponse
from ..types.app_retrieve_invocation_response import AppRetrieveInvocationResponse

__all__ = ["AppsResource", "AsyncAppsResource"]

Expand Down Expand Up @@ -153,39 +152,6 @@ def invoke(
cast_to=AppInvokeResponse,
)

def retrieve_invocation(
self,
id: str,
*,
# 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,
) -> AppRetrieveInvocationResponse:
"""
Get an app invocation by id

Args:
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
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._get(
f"/apps/invocations/{id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AppRetrieveInvocationResponse,
)


class AsyncAppsResource(AsyncAPIResource):
@cached_property
Expand Down Expand Up @@ -315,39 +281,6 @@ async def invoke(
cast_to=AppInvokeResponse,
)

async def retrieve_invocation(
self,
id: str,
*,
# 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,
) -> AppRetrieveInvocationResponse:
"""
Get an app invocation by id

Args:
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
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._get(
f"/apps/invocations/{id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AppRetrieveInvocationResponse,
)


class AppsResourceWithRawResponse:
def __init__(self, apps: AppsResource) -> None:
Expand All @@ -359,9 +292,6 @@ def __init__(self, apps: AppsResource) -> None:
self.invoke = to_raw_response_wrapper(
apps.invoke,
)
self.retrieve_invocation = to_raw_response_wrapper(
apps.retrieve_invocation,
)


class AsyncAppsResourceWithRawResponse:
Expand All @@ -374,9 +304,6 @@ def __init__(self, apps: AsyncAppsResource) -> None:
self.invoke = async_to_raw_response_wrapper(
apps.invoke,
)
self.retrieve_invocation = async_to_raw_response_wrapper(
apps.retrieve_invocation,
)


class AppsResourceWithStreamingResponse:
Expand All @@ -389,9 +316,6 @@ def __init__(self, apps: AppsResource) -> None:
self.invoke = to_streamed_response_wrapper(
apps.invoke,
)
self.retrieve_invocation = to_streamed_response_wrapper(
apps.retrieve_invocation,
)


class AsyncAppsResourceWithStreamingResponse:
Expand All @@ -404,6 +328,3 @@ def __init__(self, apps: AsyncAppsResource) -> None:
self.invoke = async_to_streamed_response_wrapper(
apps.invoke,
)
self.retrieve_invocation = async_to_streamed_response_wrapper(
apps.retrieve_invocation,
)
1 change: 0 additions & 1 deletion src/kernel/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
from .app_deploy_response import AppDeployResponse as AppDeployResponse
from .app_invoke_response import AppInvokeResponse as AppInvokeResponse
from .browser_create_session_response import BrowserCreateSessionResponse as BrowserCreateSessionResponse
from .app_retrieve_invocation_response import AppRetrieveInvocationResponse as AppRetrieveInvocationResponse
25 changes: 0 additions & 25 deletions src/kernel/types/app_retrieve_invocation_response.py

This file was deleted.

90 changes: 1 addition & 89 deletions tests/api_resources/test_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@

from kernel import Kernel, AsyncKernel
from tests.utils import assert_matches_type
from kernel.types import (
AppDeployResponse,
AppInvokeResponse,
AppRetrieveInvocationResponse,
)
from kernel.types import AppDeployResponse, AppInvokeResponse

base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")

Expand Down Expand Up @@ -115,48 +111,6 @@ def test_streaming_response_invoke(self, client: Kernel) -> None:

assert cast(Any, response.is_closed) is True

@pytest.mark.skip()
@parametrize
def test_method_retrieve_invocation(self, client: Kernel) -> None:
app = client.apps.retrieve_invocation(
"id",
)
assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"])

@pytest.mark.skip()
@parametrize
def test_raw_response_retrieve_invocation(self, client: Kernel) -> None:
response = client.apps.with_raw_response.retrieve_invocation(
"id",
)

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
app = response.parse()
assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"])

@pytest.mark.skip()
@parametrize
def test_streaming_response_retrieve_invocation(self, client: Kernel) -> None:
with client.apps.with_streaming_response.retrieve_invocation(
"id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

app = response.parse()
assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"])

assert cast(Any, response.is_closed) is True

@pytest.mark.skip()
@parametrize
def test_path_params_retrieve_invocation(self, client: Kernel) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
client.apps.with_raw_response.retrieve_invocation(
"",
)


class TestAsyncApps:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
Expand Down Expand Up @@ -254,45 +208,3 @@ async def test_streaming_response_invoke(self, async_client: AsyncKernel) -> Non
assert_matches_type(AppInvokeResponse, app, path=["response"])

assert cast(Any, response.is_closed) is True

@pytest.mark.skip()
@parametrize
async def test_method_retrieve_invocation(self, async_client: AsyncKernel) -> None:
app = await async_client.apps.retrieve_invocation(
"id",
)
assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"])

@pytest.mark.skip()
@parametrize
async def test_raw_response_retrieve_invocation(self, async_client: AsyncKernel) -> None:
response = await async_client.apps.with_raw_response.retrieve_invocation(
"id",
)

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
app = await response.parse()
assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"])

@pytest.mark.skip()
@parametrize
async def test_streaming_response_retrieve_invocation(self, async_client: AsyncKernel) -> None:
async with async_client.apps.with_streaming_response.retrieve_invocation(
"id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

app = await response.parse()
assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"])

assert cast(Any, response.is_closed) is True

@pytest.mark.skip()
@parametrize
async def test_path_params_retrieve_invocation(self, async_client: AsyncKernel) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
await async_client.apps.with_raw_response.retrieve_invocation(
"",
)