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.71.0"
".": "0.72.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 124
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-4fb45d71a99648425c84bdc8e5780920105cede4ee2d4eac67276d0609ac1e94.yml
openapi_spec_hash: 1f04cb5b36e92db81dfa264c2a59c32a
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-4c243ff089133bd49322d98a6943647589972f71ecadc993fe9e5029972b3995.yml
openapi_spec_hash: a2cb637a19a070d07a1a4343c75444ee
config_hash: fb167e754ebb3a14649463725891c9d0
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.72.0 (2026-06-26)

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

### Bug Fixes

* **api:** browser pool profile omits save_changes (BrowserPoolProfile) ([34423fb](https://github.com/kernel/kernel-python-sdk/commit/34423fb99af7f43b7b9a6a023a4ec85902b1bcb2))

## 0.71.0 (2026-06-26)

Full Changelog: [v0.70.0...v0.71.0](https://github.com/kernel/kernel-python-sdk/compare/v0.70.0...v0.71.0)
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.71.0"
version = "0.72.0"
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.71.0" # x-release-please-version
__version__ = "0.72.0" # x-release-please-version
75 changes: 50 additions & 25 deletions src/kernel/resources/browser_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from ..types.tags_param import TagsParam
from ..types.browser_pool import BrowserPool
from ..types.browser_pool_acquire_response import BrowserPoolAcquireResponse
from ..types.shared_params.browser_profile import BrowserProfile
from ..types.shared_params.browser_viewport import BrowserViewport
from ..types.shared_params.browser_extension import BrowserExtension

Expand Down Expand Up @@ -68,7 +67,7 @@ def create(
headless: bool | Omit = omit,
kiosk_mode: bool | Omit = omit,
name: str | Omit = omit,
profile: BrowserProfile | Omit = omit,
profile: browser_pool_create_params.Profile | Omit = omit,
proxy_id: str | Omit = omit,
start_url: str | Omit = omit,
stealth: bool | Omit = omit,
Expand All @@ -81,8 +80,12 @@ def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrowserPool:
"""
Create a new browser pool with the specified configuration and size.
"""Create a new browser pool with the specified configuration and size.

Pooled
browsers load their profile read-only: any save_changes on the profile is
ignored (not rejected), so pooled browsers never persist changes back to the
profile.

Args:
size: Number of browsers to maintain in the pool. The maximum size is determined by
Expand All @@ -107,9 +110,12 @@ def create(

name: Optional name for the browser pool. Must be unique within the project.

profile: Profile selection for the browser session. Provide either id or name. If
specified, the matching profile will be loaded into the browser session.
Profiles must be created beforehand.
profile: Profile selection for browsers in a pool. Provide either id or name. The
matching profile is loaded into every browser in the pool. Profiles must be
created beforehand. Unlike single browser sessions, pools load the profile
read-only and never persist changes back to it, so save_changes is omitted here.
Any save_changes value sent on a pool profile is silently ignored rather than
rejected, so callers reusing a single-session profile object will not error.

proxy_id: Optional proxy to associate to the browser session. Must reference a proxy in
the same project as the browser session.
Expand Down Expand Up @@ -217,7 +223,7 @@ def update(
headless: bool | Omit = omit,
kiosk_mode: bool | Omit = omit,
name: str | Omit = omit,
profile: BrowserProfile | Omit = omit,
profile: browser_pool_update_params.Profile | Omit = omit,
proxy_id: str | Omit = omit,
size: int | Omit = omit,
start_url: str | Omit = omit,
Expand All @@ -231,8 +237,11 @@ def update(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrowserPool:
"""
Updates the configuration used to create browsers in the pool.
"""Updates the configuration used to create browsers in the pool.

As with creation,
save_changes on the pool profile is ignored (not rejected); pooled browsers
never persist changes back to the profile.

Args:
chrome_policy: Custom Chrome enterprise policy overrides applied to all browsers in this pool.
Expand All @@ -256,9 +265,12 @@ def update(

name: Optional name for the browser pool. Must be unique within the project.

profile: Profile selection for the browser session. Provide either id or name. If
specified, the matching profile will be loaded into the browser session.
Profiles must be created beforehand.
profile: Profile selection for browsers in a pool. Provide either id or name. The
matching profile is loaded into every browser in the pool. Profiles must be
created beforehand. Unlike single browser sessions, pools load the profile
read-only and never persist changes back to it, so save_changes is omitted here.
Any save_changes value sent on a pool profile is silently ignored rather than
rejected, so callers reusing a single-session profile object will not error.

proxy_id: Optional proxy to associate to the browser session. Must reference a proxy in
the same project as the browser session.
Expand Down Expand Up @@ -603,7 +615,7 @@ async def create(
headless: bool | Omit = omit,
kiosk_mode: bool | Omit = omit,
name: str | Omit = omit,
profile: BrowserProfile | Omit = omit,
profile: browser_pool_create_params.Profile | Omit = omit,
proxy_id: str | Omit = omit,
start_url: str | Omit = omit,
stealth: bool | Omit = omit,
Expand All @@ -616,8 +628,12 @@ async def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrowserPool:
"""
Create a new browser pool with the specified configuration and size.
"""Create a new browser pool with the specified configuration and size.

Pooled
browsers load their profile read-only: any save_changes on the profile is
ignored (not rejected), so pooled browsers never persist changes back to the
profile.

Args:
size: Number of browsers to maintain in the pool. The maximum size is determined by
Expand All @@ -642,9 +658,12 @@ async def create(

name: Optional name for the browser pool. Must be unique within the project.

profile: Profile selection for the browser session. Provide either id or name. If
specified, the matching profile will be loaded into the browser session.
Profiles must be created beforehand.
profile: Profile selection for browsers in a pool. Provide either id or name. The
matching profile is loaded into every browser in the pool. Profiles must be
created beforehand. Unlike single browser sessions, pools load the profile
read-only and never persist changes back to it, so save_changes is omitted here.
Any save_changes value sent on a pool profile is silently ignored rather than
rejected, so callers reusing a single-session profile object will not error.

proxy_id: Optional proxy to associate to the browser session. Must reference a proxy in
the same project as the browser session.
Expand Down Expand Up @@ -752,7 +771,7 @@ async def update(
headless: bool | Omit = omit,
kiosk_mode: bool | Omit = omit,
name: str | Omit = omit,
profile: BrowserProfile | Omit = omit,
profile: browser_pool_update_params.Profile | Omit = omit,
proxy_id: str | Omit = omit,
size: int | Omit = omit,
start_url: str | Omit = omit,
Expand All @@ -766,8 +785,11 @@ async def update(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrowserPool:
"""
Updates the configuration used to create browsers in the pool.
"""Updates the configuration used to create browsers in the pool.

As with creation,
save_changes on the pool profile is ignored (not rejected); pooled browsers
never persist changes back to the profile.

Args:
chrome_policy: Custom Chrome enterprise policy overrides applied to all browsers in this pool.
Expand All @@ -791,9 +813,12 @@ async def update(

name: Optional name for the browser pool. Must be unique within the project.

profile: Profile selection for the browser session. Provide either id or name. If
specified, the matching profile will be loaded into the browser session.
Profiles must be created beforehand.
profile: Profile selection for browsers in a pool. Provide either id or name. The
matching profile is loaded into every browser in the pool. Profiles must be
created beforehand. Unlike single browser sessions, pools load the profile
read-only and never persist changes back to it, so save_changes is omitted here.
Any save_changes value sent on a pool profile is silently ignored rather than
rejected, so callers reusing a single-session profile object will not error.

proxy_id: Optional proxy to associate to the browser session. Must reference a proxy in
the same project as the browser session.
Expand Down
35 changes: 29 additions & 6 deletions src/kernel/types/browser_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,30 @@
from datetime import datetime

from .._models import BaseModel
from .shared.browser_profile import BrowserProfile
from .shared.browser_viewport import BrowserViewport
from .shared.browser_extension import BrowserExtension

__all__ = ["BrowserPool", "BrowserPoolConfig"]
__all__ = ["BrowserPool", "BrowserPoolConfig", "BrowserPoolConfigProfile"]


class BrowserPoolConfigProfile(BaseModel):
"""Profile selection for browsers in a pool.

Provide either id or name. The matching profile is
loaded into every browser in the pool. Profiles must be created beforehand. Unlike single
browser sessions, pools load the profile read-only and never persist changes back to it, so
save_changes is omitted here. Any save_changes value sent on a pool profile is silently
ignored rather than rejected, so callers reusing a single-session profile object will not error.
"""

id: Optional[str] = None
"""Profile ID to load for browsers in this pool"""

name: Optional[str] = None
"""Profile name to load for browsers in this pool (instead of id).

Must be 1-255 characters, using letters, numbers, dots, underscores, or hyphens.
"""


class BrowserPoolConfig(BaseModel):
Expand Down Expand Up @@ -54,11 +73,15 @@ class BrowserPoolConfig(BaseModel):
name: Optional[str] = None
"""Optional name for the browser pool. Must be unique within the project."""

profile: Optional[BrowserProfile] = None
"""Profile selection for the browser session.
profile: Optional[BrowserPoolConfigProfile] = None
"""Profile selection for browsers in a pool.

Provide either id or name. If specified, the matching profile will be loaded
into the browser session. Profiles must be created beforehand.
Provide either id or name. The matching profile is loaded into every browser in
the pool. Profiles must be created beforehand. Unlike single browser sessions,
pools load the profile read-only and never persist changes back to it, so
save_changes is omitted here. Any save_changes value sent on a pool profile is
silently ignored rather than rejected, so callers reusing a single-session
profile object will not error.
"""

proxy_id: Optional[str] = None
Expand Down
35 changes: 29 additions & 6 deletions src/kernel/types/browser_pool_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
from typing import Dict, Iterable
from typing_extensions import Required, TypedDict

from .shared_params.browser_profile import BrowserProfile
from .shared_params.browser_viewport import BrowserViewport
from .shared_params.browser_extension import BrowserExtension

__all__ = ["BrowserPoolCreateParams"]
__all__ = ["BrowserPoolCreateParams", "Profile"]


class BrowserPoolCreateParams(TypedDict, total=False):
Expand Down Expand Up @@ -53,11 +52,15 @@ class BrowserPoolCreateParams(TypedDict, total=False):
name: str
"""Optional name for the browser pool. Must be unique within the project."""

profile: BrowserProfile
"""Profile selection for the browser session.
profile: Profile
"""Profile selection for browsers in a pool.

Provide either id or name. If specified, the matching profile will be loaded
into the browser session. Profiles must be created beforehand.
Provide either id or name. The matching profile is loaded into every browser in
the pool. Profiles must be created beforehand. Unlike single browser sessions,
pools load the profile read-only and never persist changes back to it, so
save_changes is omitted here. Any save_changes value sent on a pool profile is
silently ignored rather than rejected, so callers reusing a single-session
profile object will not error.
"""

proxy_id: str
Expand Down Expand Up @@ -102,3 +105,23 @@ class BrowserPoolCreateParams(TypedDict, total=False):
based on the resolution (higher resolutions use lower refresh rates to keep
bandwidth reasonable).
"""


class Profile(TypedDict, total=False):
"""Profile selection for browsers in a pool.

Provide either id or name. The matching profile is
loaded into every browser in the pool. Profiles must be created beforehand. Unlike single
browser sessions, pools load the profile read-only and never persist changes back to it, so
save_changes is omitted here. Any save_changes value sent on a pool profile is silently
ignored rather than rejected, so callers reusing a single-session profile object will not error.
"""

id: str
"""Profile ID to load for browsers in this pool"""

name: str
"""Profile name to load for browsers in this pool (instead of id).

Must be 1-255 characters, using letters, numbers, dots, underscores, or hyphens.
"""
35 changes: 29 additions & 6 deletions src/kernel/types/browser_pool_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
from typing import Dict, Iterable
from typing_extensions import TypedDict

from .shared_params.browser_profile import BrowserProfile
from .shared_params.browser_viewport import BrowserViewport
from .shared_params.browser_extension import BrowserExtension

__all__ = ["BrowserPoolUpdateParams"]
__all__ = ["BrowserPoolUpdateParams", "Profile"]


class BrowserPoolUpdateParams(TypedDict, total=False):
Expand Down Expand Up @@ -52,11 +51,15 @@ class BrowserPoolUpdateParams(TypedDict, total=False):
name: str
"""Optional name for the browser pool. Must be unique within the project."""

profile: BrowserProfile
"""Profile selection for the browser session.
profile: Profile
"""Profile selection for browsers in a pool.

Provide either id or name. If specified, the matching profile will be loaded
into the browser session. Profiles must be created beforehand.
Provide either id or name. The matching profile is loaded into every browser in
the pool. Profiles must be created beforehand. Unlike single browser sessions,
pools load the profile read-only and never persist changes back to it, so
save_changes is omitted here. Any save_changes value sent on a pool profile is
silently ignored rather than rejected, so callers reusing a single-session
profile object will not error.
"""

proxy_id: str
Expand Down Expand Up @@ -108,3 +111,23 @@ class BrowserPoolUpdateParams(TypedDict, total=False):
based on the resolution (higher resolutions use lower refresh rates to keep
bandwidth reasonable).
"""


class Profile(TypedDict, total=False):
"""Profile selection for browsers in a pool.

Provide either id or name. The matching profile is
loaded into every browser in the pool. Profiles must be created beforehand. Unlike single
browser sessions, pools load the profile read-only and never persist changes back to it, so
save_changes is omitted here. Any save_changes value sent on a pool profile is silently
ignored rather than rejected, so callers reusing a single-session profile object will not error.
"""

id: str
"""Profile ID to load for browsers in this pool"""

name: str
"""Profile name to load for browsers in this pool (instead of id).

Must be 1-255 characters, using letters, numbers, dots, underscores, or hyphens.
"""
Loading
Loading