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.1"
".": "0.1.0-alpha.2"
}
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
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-e642528081bcfbb78b52900cb9b8b1407a9c7a8653c57ab021a79d4d52585695.yml
openapi_spec_hash: 8d91d1ac100906977531a93b9f4ae380
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d168b58fcf39dbd0458d132091793d3e2d0930070b7dda2d5f7f1baff20dd31b.yml
openapi_spec_hash: b7e0fd7ee1656d7dbad57209d1584d92
config_hash: 75c0b894355904e2a91b70445072d4b4
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.2 (2025-05-09)

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

### Features

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

## 0.1.0-alpha.1 (2025-05-08)

Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/onkernel/kernel-python-sdk/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
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.1"
version = "0.1.0-alpha.2"
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.1" # x-release-please-version
__version__ = "0.1.0-alpha.2" # x-release-please-version
8 changes: 8 additions & 0 deletions src/kernel/resources/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def deploy(
def invoke(
self,
*,
action_name: str,
app_name: str,
payload: object,
version: str,
Expand All @@ -119,6 +120,8 @@ def invoke(
Invoke an application

Args:
action_name: Name of the action to invoke

app_name: Name of the application

payload: Input data for the application
Expand All @@ -137,6 +140,7 @@ def invoke(
"/apps/invoke",
body=maybe_transform(
{
"action_name": action_name,
"app_name": app_name,
"payload": payload,
"version": version,
Expand Down Expand Up @@ -263,6 +267,7 @@ async def deploy(
async def invoke(
self,
*,
action_name: str,
app_name: str,
payload: object,
version: str,
Expand All @@ -277,6 +282,8 @@ async def invoke(
Invoke an application

Args:
action_name: Name of the action to invoke

app_name: Name of the application

payload: Input data for the application
Expand All @@ -295,6 +302,7 @@ async def invoke(
"/apps/invoke",
body=await async_maybe_transform(
{
"action_name": action_name,
"app_name": app_name,
"payload": payload,
"version": version,
Expand Down
3 changes: 3 additions & 0 deletions src/kernel/types/app_invoke_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@


class AppInvokeParams(TypedDict, total=False):
action_name: Required[Annotated[str, PropertyInfo(alias="actionName")]]
"""Name of the action to invoke"""

app_name: Required[Annotated[str, PropertyInfo(alias="appName")]]
"""Name of the application"""

Expand Down
8 changes: 7 additions & 1 deletion src/kernel/types/app_invoke_response.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from .._models import BaseModel

__all__ = ["AppInvokeResponse"]
Expand All @@ -9,5 +12,8 @@ class AppInvokeResponse(BaseModel):
id: str
"""ID of the invocation"""

status: str
status: Literal["QUEUED", "RUNNING", "SUCCEEDED", "FAILED"]
"""Status of the invocation"""

output: Optional[str] = None
"""Output from the invocation (if available)"""
6 changes: 6 additions & 0 deletions tests/api_resources/test_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def test_streaming_response_deploy(self, client: Kernel) -> None:
@parametrize
def test_method_invoke(self, client: Kernel) -> None:
app = client.apps.invoke(
action_name="analyze",
app_name="my-awesome-app",
payload='{ "data": "example input" }',
version="1.0.0",
Expand All @@ -86,6 +87,7 @@ def test_method_invoke(self, client: Kernel) -> None:
@parametrize
def test_raw_response_invoke(self, client: Kernel) -> None:
response = client.apps.with_raw_response.invoke(
action_name="analyze",
app_name="my-awesome-app",
payload='{ "data": "example input" }',
version="1.0.0",
Expand All @@ -100,6 +102,7 @@ def test_raw_response_invoke(self, client: Kernel) -> None:
@parametrize
def test_streaming_response_invoke(self, client: Kernel) -> None:
with client.apps.with_streaming_response.invoke(
action_name="analyze",
app_name="my-awesome-app",
payload='{ "data": "example input" }',
version="1.0.0",
Expand Down Expand Up @@ -213,6 +216,7 @@ async def test_streaming_response_deploy(self, async_client: AsyncKernel) -> Non
@parametrize
async def test_method_invoke(self, async_client: AsyncKernel) -> None:
app = await async_client.apps.invoke(
action_name="analyze",
app_name="my-awesome-app",
payload='{ "data": "example input" }',
version="1.0.0",
Expand All @@ -223,6 +227,7 @@ async def test_method_invoke(self, async_client: AsyncKernel) -> None:
@parametrize
async def test_raw_response_invoke(self, async_client: AsyncKernel) -> None:
response = await async_client.apps.with_raw_response.invoke(
action_name="analyze",
app_name="my-awesome-app",
payload='{ "data": "example input" }',
version="1.0.0",
Expand All @@ -237,6 +242,7 @@ async def test_raw_response_invoke(self, async_client: AsyncKernel) -> None:
@parametrize
async def test_streaming_response_invoke(self, async_client: AsyncKernel) -> None:
async with async_client.apps.with_streaming_response.invoke(
action_name="analyze",
app_name="my-awesome-app",
payload='{ "data": "example input" }',
version="1.0.0",
Expand Down
Loading