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.47.0"
".": "0.48.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 104
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-ac10847d991ef8ed89124b5550922cb5726af2b4a4c3396ee6ff82938302fc25.yml
openapi_spec_hash: 0d902563108fe2461708c05336eab40a
config_hash: 16e4457a0bb26e98a335a1c2a572290a
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-49a1a92e00d1eb87e91e8527275cb0705fce2edea30e70fea745f134dd451fbd.yml
openapi_spec_hash: 3aa6ab6939790f538332054162fbdedc
config_hash: 9818dd634f87b677410eefd013d7a179
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 0.48.0 (2026-04-10)

Full Changelog: [v0.47.0...v0.48.0](https://github.com/kernel/kernel-python-sdk/compare/v0.47.0...v0.48.0)

### Features

* [kernel-1116] add base_url field to browser session response ([335d9e0](https://github.com/kernel/kernel-python-sdk/commit/335d9e04998dd9e581f47d8869dd7f07a8f2db74))


### Bug Fixes

* **client:** preserve hardcoded query params when merging with user params ([6dfd882](https://github.com/kernel/kernel-python-sdk/commit/6dfd8826b84ed191d72ac114df986c398fa83c5c))


### Chores

* retrigger Stainless codegen for projects resource ([ca22fd9](https://github.com/kernel/kernel-python-sdk/commit/ca22fd9dc4b5f4cd70e15ecb1ddd3607d8a99df8))

## 0.47.0 (2026-04-07)

Full Changelog: [v0.46.0...v0.47.0](https://github.com/kernel/kernel-python-sdk/compare/v0.46.0...v0.47.0)
Expand Down
29 changes: 29 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,35 @@ Methods:
- <code title="delete /credentials/{id_or_name}">client.credentials.<a href="./src/kernel/resources/credentials.py">delete</a>(id_or_name) -> None</code>
- <code title="get /credentials/{id_or_name}/totp-code">client.credentials.<a href="./src/kernel/resources/credentials.py">totp_code</a>(id_or_name) -> <a href="./src/kernel/types/credential_totp_code_response.py">CredentialTotpCodeResponse</a></code>

# Projects

Types:

```python
from kernel.types import CreateProjectRequest, Project, UpdateProjectRequest
```

Methods:

- <code title="post /projects">client.projects.<a href="./src/kernel/resources/projects/projects.py">create</a>(\*\*<a href="src/kernel/types/project_create_params.py">params</a>) -> <a href="./src/kernel/types/project.py">Project</a></code>
- <code title="get /projects/{id}">client.projects.<a href="./src/kernel/resources/projects/projects.py">retrieve</a>(id) -> <a href="./src/kernel/types/project.py">Project</a></code>
- <code title="patch /projects/{id}">client.projects.<a href="./src/kernel/resources/projects/projects.py">update</a>(id, \*\*<a href="src/kernel/types/project_update_params.py">params</a>) -> <a href="./src/kernel/types/project.py">Project</a></code>
- <code title="get /projects">client.projects.<a href="./src/kernel/resources/projects/projects.py">list</a>(\*\*<a href="src/kernel/types/project_list_params.py">params</a>) -> <a href="./src/kernel/types/project.py">SyncOffsetPagination[Project]</a></code>
- <code title="delete /projects/{id}">client.projects.<a href="./src/kernel/resources/projects/projects.py">delete</a>(id) -> None</code>

## Limits

Types:

```python
from kernel.types.projects import ProjectLimits, UpdateProjectLimitsRequest
```

Methods:

- <code title="get /projects/{id}/limits">client.projects.limits.<a href="./src/kernel/resources/projects/limits.py">retrieve</a>(id) -> <a href="./src/kernel/types/projects/project_limits.py">ProjectLimits</a></code>
- <code title="patch /projects/{id}/limits">client.projects.limits.<a href="./src/kernel/resources/projects/limits.py">update</a>(id, \*\*<a href="src/kernel/types/projects/limit_update_params.py">params</a>) -> <a href="./src/kernel/types/projects/project_limits.py">ProjectLimits</a></code>

# CredentialProviders

Types:
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.47.0"
version = "0.48.0"
description = "The official Python library for the kernel API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
4 changes: 4 additions & 0 deletions src/kernel/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,10 @@ def _build_request(
files = cast(HttpxRequestFiles, ForceMultipartDict())

prepared_url = self._prepare_url(options.url)
# preserve hard-coded query params from the url
if params and prepared_url.query:
params = {**dict(prepared_url.params.items()), **params}
prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0])
if "_" in prepared_url.host:
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
Expand Down
44 changes: 44 additions & 0 deletions src/kernel/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
proxies,
browsers,
profiles,
projects,
extensions,
credentials,
deployments,
Expand All @@ -54,6 +55,7 @@
from .resources.invocations import InvocationsResource, AsyncInvocationsResource
from .resources.browser_pools import BrowserPoolsResource, AsyncBrowserPoolsResource
from .resources.browsers.browsers import BrowsersResource, AsyncBrowsersResource
from .resources.projects.projects import ProjectsResource, AsyncProjectsResource
from .resources.credential_providers import CredentialProvidersResource, AsyncCredentialProvidersResource

__all__ = [
Expand Down Expand Up @@ -222,6 +224,13 @@ def credentials(self) -> CredentialsResource:

return CredentialsResource(self)

@cached_property
def projects(self) -> ProjectsResource:
"""Create and manage projects for resource isolation within an organization."""
from .resources.projects import ProjectsResource

return ProjectsResource(self)

@cached_property
def credential_providers(self) -> CredentialProvidersResource:
"""Configure external credential providers like 1Password."""
Expand Down Expand Up @@ -492,6 +501,13 @@ def credentials(self) -> AsyncCredentialsResource:

return AsyncCredentialsResource(self)

@cached_property
def projects(self) -> AsyncProjectsResource:
"""Create and manage projects for resource isolation within an organization."""
from .resources.projects import AsyncProjectsResource

return AsyncProjectsResource(self)

@cached_property
def credential_providers(self) -> AsyncCredentialProvidersResource:
"""Configure external credential providers like 1Password."""
Expand Down Expand Up @@ -689,6 +705,13 @@ def credentials(self) -> credentials.CredentialsResourceWithRawResponse:

return CredentialsResourceWithRawResponse(self._client.credentials)

@cached_property
def projects(self) -> projects.ProjectsResourceWithRawResponse:
"""Create and manage projects for resource isolation within an organization."""
from .resources.projects import ProjectsResourceWithRawResponse

return ProjectsResourceWithRawResponse(self._client.projects)

@cached_property
def credential_providers(self) -> credential_providers.CredentialProvidersResourceWithRawResponse:
"""Configure external credential providers like 1Password."""
Expand Down Expand Up @@ -772,6 +795,13 @@ def credentials(self) -> credentials.AsyncCredentialsResourceWithRawResponse:

return AsyncCredentialsResourceWithRawResponse(self._client.credentials)

@cached_property
def projects(self) -> projects.AsyncProjectsResourceWithRawResponse:
"""Create and manage projects for resource isolation within an organization."""
from .resources.projects import AsyncProjectsResourceWithRawResponse

return AsyncProjectsResourceWithRawResponse(self._client.projects)

@cached_property
def credential_providers(self) -> credential_providers.AsyncCredentialProvidersResourceWithRawResponse:
"""Configure external credential providers like 1Password."""
Expand Down Expand Up @@ -855,6 +885,13 @@ def credentials(self) -> credentials.CredentialsResourceWithStreamingResponse:

return CredentialsResourceWithStreamingResponse(self._client.credentials)

@cached_property
def projects(self) -> projects.ProjectsResourceWithStreamingResponse:
"""Create and manage projects for resource isolation within an organization."""
from .resources.projects import ProjectsResourceWithStreamingResponse

return ProjectsResourceWithStreamingResponse(self._client.projects)

@cached_property
def credential_providers(self) -> credential_providers.CredentialProvidersResourceWithStreamingResponse:
"""Configure external credential providers like 1Password."""
Expand Down Expand Up @@ -938,6 +975,13 @@ def credentials(self) -> credentials.AsyncCredentialsResourceWithStreamingRespon

return AsyncCredentialsResourceWithStreamingResponse(self._client.credentials)

@cached_property
def projects(self) -> projects.AsyncProjectsResourceWithStreamingResponse:
"""Create and manage projects for resource isolation within an organization."""
from .resources.projects import AsyncProjectsResourceWithStreamingResponse

return AsyncProjectsResourceWithStreamingResponse(self._client.projects)

@cached_property
def credential_providers(self) -> credential_providers.AsyncCredentialProvidersResourceWithStreamingResponse:
"""Configure external credential providers like 1Password."""
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.47.0" # x-release-please-version
__version__ = "0.48.0" # x-release-please-version
14 changes: 14 additions & 0 deletions src/kernel/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@
ProfilesResourceWithStreamingResponse,
AsyncProfilesResourceWithStreamingResponse,
)
from .projects import (
ProjectsResource,
AsyncProjectsResource,
ProjectsResourceWithRawResponse,
AsyncProjectsResourceWithRawResponse,
ProjectsResourceWithStreamingResponse,
AsyncProjectsResourceWithStreamingResponse,
)
from .extensions import (
ExtensionsResource,
AsyncExtensionsResource,
Expand Down Expand Up @@ -150,6 +158,12 @@
"AsyncCredentialsResourceWithRawResponse",
"CredentialsResourceWithStreamingResponse",
"AsyncCredentialsResourceWithStreamingResponse",
"ProjectsResource",
"AsyncProjectsResource",
"ProjectsResourceWithRawResponse",
"AsyncProjectsResourceWithRawResponse",
"ProjectsResourceWithStreamingResponse",
"AsyncProjectsResourceWithStreamingResponse",
"CredentialProvidersResource",
"AsyncCredentialProvidersResource",
"CredentialProvidersResourceWithRawResponse",
Expand Down
33 changes: 33 additions & 0 deletions src/kernel/resources/projects/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .limits import (
LimitsResource,
AsyncLimitsResource,
LimitsResourceWithRawResponse,
AsyncLimitsResourceWithRawResponse,
LimitsResourceWithStreamingResponse,
AsyncLimitsResourceWithStreamingResponse,
)
from .projects import (
ProjectsResource,
AsyncProjectsResource,
ProjectsResourceWithRawResponse,
AsyncProjectsResourceWithRawResponse,
ProjectsResourceWithStreamingResponse,
AsyncProjectsResourceWithStreamingResponse,
)

__all__ = [
"LimitsResource",
"AsyncLimitsResource",
"LimitsResourceWithRawResponse",
"AsyncLimitsResourceWithRawResponse",
"LimitsResourceWithStreamingResponse",
"AsyncLimitsResourceWithStreamingResponse",
"ProjectsResource",
"AsyncProjectsResource",
"ProjectsResourceWithRawResponse",
"AsyncProjectsResourceWithRawResponse",
"ProjectsResourceWithStreamingResponse",
"AsyncProjectsResourceWithStreamingResponse",
]
Loading