From 24905be21884e5ecefe9e1f631fff271052b5268 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 22:42:51 +0000 Subject: [PATCH 1/2] feat: Add proxy hostname bypass hosts --- .stats.yml | 4 ++-- src/kernel/resources/proxies.py | 10 +++++++++- src/kernel/types/proxy_check_response.py | 5 ++++- src/kernel/types/proxy_create_params.py | 5 +++++ src/kernel/types/proxy_create_response.py | 5 ++++- src/kernel/types/proxy_list_response.py | 3 +++ src/kernel/types/proxy_retrieve_response.py | 5 ++++- tests/api_resources/test_proxies.py | 2 ++ 8 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3e385c42..9538870c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 101 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-9462b3d8f055f8bda06da65583f5aa09a17d35254c5983796d8e84ebb3c62c47.yml -openapi_spec_hash: 1914dd35b8e0e5a21ccec91eac2a616d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d53de581fcac5c3b06940fc93667b9cd2a6a60dd3674da7c1f47484b0f442bf8.yml +openapi_spec_hash: 177d0c537b7e5357c815bb64175e6484 config_hash: c6b88eea9a15840f26130eb8ed3b42a0 diff --git a/src/kernel/resources/proxies.py b/src/kernel/resources/proxies.py index 6574a256..d42f7b04 100644 --- a/src/kernel/resources/proxies.py +++ b/src/kernel/resources/proxies.py @@ -7,7 +7,7 @@ import httpx from ..types import proxy_create_params -from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given +from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,6 +50,7 @@ def create( self, *, type: Literal["datacenter", "isp", "residential", "mobile", "custom"], + bypass_hosts: SequenceNotStr[str] | Omit = omit, config: proxy_create_params.Config | Omit = omit, name: str | Omit = omit, protocol: Literal["http", "https"] | Omit = omit, @@ -67,6 +68,8 @@ def create( type: Proxy type to use. In terms of quality for avoiding bot-detection, from best to worst: `mobile` > `residential` > `isp` > `datacenter`. + bypass_hosts: Hostnames that should bypass the parent proxy and connect directly. + config: Configuration specific to the selected proxy `type`. name: Readable name of the proxy. @@ -86,6 +89,7 @@ def create( body=maybe_transform( { "type": type, + "bypass_hosts": bypass_hosts, "config": config, "name": name, "protocol": protocol, @@ -243,6 +247,7 @@ async def create( self, *, type: Literal["datacenter", "isp", "residential", "mobile", "custom"], + bypass_hosts: SequenceNotStr[str] | Omit = omit, config: proxy_create_params.Config | Omit = omit, name: str | Omit = omit, protocol: Literal["http", "https"] | Omit = omit, @@ -260,6 +265,8 @@ async def create( type: Proxy type to use. In terms of quality for avoiding bot-detection, from best to worst: `mobile` > `residential` > `isp` > `datacenter`. + bypass_hosts: Hostnames that should bypass the parent proxy and connect directly. + config: Configuration specific to the selected proxy `type`. name: Readable name of the proxy. @@ -279,6 +286,7 @@ async def create( body=await async_maybe_transform( { "type": type, + "bypass_hosts": bypass_hosts, "config": config, "name": name, "protocol": protocol, diff --git a/src/kernel/types/proxy_check_response.py b/src/kernel/types/proxy_check_response.py index 26b6d0a1..c26d665d 100644 --- a/src/kernel/types/proxy_check_response.py +++ b/src/kernel/types/proxy_check_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional +from typing import List, Union, Optional from datetime import datetime from typing_extensions import Literal, TypeAlias @@ -179,6 +179,9 @@ class ProxyCheckResponse(BaseModel): id: Optional[str] = None + bypass_hosts: Optional[List[str]] = None + """Hostnames that should bypass the parent proxy and connect directly.""" + config: Optional[Config] = None """Configuration specific to the selected proxy `type`.""" diff --git a/src/kernel/types/proxy_create_params.py b/src/kernel/types/proxy_create_params.py index 0a3536f0..175b95ff 100644 --- a/src/kernel/types/proxy_create_params.py +++ b/src/kernel/types/proxy_create_params.py @@ -5,6 +5,8 @@ from typing import Union from typing_extensions import Literal, Required, TypeAlias, TypedDict +from .._types import SequenceNotStr + __all__ = [ "ProxyCreateParams", "Config", @@ -24,6 +26,9 @@ class ProxyCreateParams(TypedDict, total=False): `residential` > `isp` > `datacenter`. """ + bypass_hosts: SequenceNotStr[str] + """Hostnames that should bypass the parent proxy and connect directly.""" + config: Config """Configuration specific to the selected proxy `type`.""" diff --git a/src/kernel/types/proxy_create_response.py b/src/kernel/types/proxy_create_response.py index 939ec4f7..d317662f 100644 --- a/src/kernel/types/proxy_create_response.py +++ b/src/kernel/types/proxy_create_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional +from typing import List, Union, Optional from datetime import datetime from typing_extensions import Literal, TypeAlias @@ -179,6 +179,9 @@ class ProxyCreateResponse(BaseModel): id: Optional[str] = None + bypass_hosts: Optional[List[str]] = None + """Hostnames that should bypass the parent proxy and connect directly.""" + config: Optional[Config] = None """Configuration specific to the selected proxy `type`.""" diff --git a/src/kernel/types/proxy_list_response.py b/src/kernel/types/proxy_list_response.py index 2d1ffb99..bbbe17c7 100644 --- a/src/kernel/types/proxy_list_response.py +++ b/src/kernel/types/proxy_list_response.py @@ -180,6 +180,9 @@ class ProxyListResponseItem(BaseModel): id: Optional[str] = None + bypass_hosts: Optional[List[str]] = None + """Hostnames that should bypass the parent proxy and connect directly.""" + config: Optional[ProxyListResponseItemConfig] = None """Configuration specific to the selected proxy `type`.""" diff --git a/src/kernel/types/proxy_retrieve_response.py b/src/kernel/types/proxy_retrieve_response.py index bf99ed0e..6b0b1bbe 100644 --- a/src/kernel/types/proxy_retrieve_response.py +++ b/src/kernel/types/proxy_retrieve_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union, Optional +from typing import List, Union, Optional from datetime import datetime from typing_extensions import Literal, TypeAlias @@ -179,6 +179,9 @@ class ProxyRetrieveResponse(BaseModel): id: Optional[str] = None + bypass_hosts: Optional[List[str]] = None + """Hostnames that should bypass the parent proxy and connect directly.""" + config: Optional[Config] = None """Configuration specific to the selected proxy `type`.""" diff --git a/tests/api_resources/test_proxies.py b/tests/api_resources/test_proxies.py index 3caabece..9f107d2b 100644 --- a/tests/api_resources/test_proxies.py +++ b/tests/api_resources/test_proxies.py @@ -35,6 +35,7 @@ def test_method_create(self, client: Kernel) -> None: def test_method_create_with_all_params(self, client: Kernel) -> None: proxy = client.proxies.create( type="datacenter", + bypass_hosts=["string"], config={"country": "US"}, name="name", protocol="http", @@ -240,6 +241,7 @@ async def test_method_create(self, async_client: AsyncKernel) -> None: async def test_method_create_with_all_params(self, async_client: AsyncKernel) -> None: proxy = await async_client.proxies.create( type="datacenter", + bypass_hosts=["string"], config={"country": "US"}, name="name", protocol="http", From 98f8c0840c0e4065edde4b468d3355cfbfb9e52f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 22:43:14 +0000 Subject: [PATCH 2/2] release: 0.39.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/kernel/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8ea07c9a..1b5dc400 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.38.0" + ".": "0.39.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d9d19539..bad6d258 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.39.0 (2026-02-25) + +Full Changelog: [v0.38.0...v0.39.0](https://github.com/kernel/kernel-python-sdk/compare/v0.38.0...v0.39.0) + +### Features + +* Add proxy hostname bypass hosts ([24905be](https://github.com/kernel/kernel-python-sdk/commit/24905be21884e5ecefe9e1f631fff271052b5268)) + ## 0.38.0 (2026-02-25) Full Changelog: [v0.37.0...v0.38.0](https://github.com/kernel/kernel-python-sdk/compare/v0.37.0...v0.38.0) diff --git a/pyproject.toml b/pyproject.toml index 09fdb6b1..3db9ef1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "kernel" -version = "0.38.0" +version = "0.39.0" description = "The official Python library for the kernel API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/kernel/_version.py b/src/kernel/_version.py index c364cf29..adb66af7 100644 --- a/src/kernel/_version.py +++ b/src/kernel/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "kernel" -__version__ = "0.38.0" # x-release-please-version +__version__ = "0.39.0" # x-release-please-version