diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8ea07c9..1b5dc40 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/.stats.yml b/.stats.yml index 3e385c4..9538870 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/CHANGELOG.md b/CHANGELOG.md index d9d1953..bad6d25 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 09fdb6b..3db9ef1 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 c364cf2..adb66af 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 diff --git a/src/kernel/resources/proxies.py b/src/kernel/resources/proxies.py index 6574a25..d42f7b0 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 26b6d0a..c26d665 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 0a3536f..175b95f 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 939ec4f..d317662 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 2d1ffb9..bbbe17c 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 bf99ed0..6b0b1bb 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 3caabec..9f107d2 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",