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.11.0"
".": "0.12.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: 35
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-8a3a53ec907a9f9e455b5a8b325a7610c6cb35f8f8db5dc68e4084c06bcc9a0a.yml
openapi_spec_hash: 99be697ec1379e4a6066a53424b27096
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-4b21cd78870a8fdbcae1d64fe87ec26eef10643e6130cfacbe9d4a91b66db60c.yml
openapi_spec_hash: ed5b2f560d3fc74a98177a9a36954b62
config_hash: 82777254c5d47bd0cf18d4e17a2e9964
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.12.0 (2025-10-14)

Full Changelog: [v0.11.0...v0.12.0](https://github.com/steel-dev/steel-python/compare/v0.11.0...v0.12.0)

### Features

* **api:** api update ([35d4404](https://github.com/steel-dev/steel-python/commit/35d440427c4abcf874b02954edffdbe57d7a334c))

## 0.11.0 (2025-10-13)

Full Changelog: [v0.10.0...v0.11.0](https://github.com/steel-dev/steel-python/compare/v0.10.0...v0.11.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 = "steel-sdk"
version = "0.11.0"
version = "0.12.0"
description = "The official Python library for the steel API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/steel/_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__ = "steel"
__version__ = "0.11.0" # x-release-please-version
__version__ = "0.12.0" # x-release-please-version
10 changes: 10 additions & 0 deletions src/steel/resources/sessions/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def create(
block_ads: bool | Omit = omit,
concurrency: int | Omit = omit,
credentials: session_create_params.Credentials | Omit = omit,
device_config: session_create_params.DeviceConfig | Omit = omit,
dimensions: session_create_params.Dimensions | Omit = omit,
extension_ids: SequenceNotStr[str] | Omit = omit,
is_selenium: bool | Omit = omit,
Expand Down Expand Up @@ -113,6 +114,9 @@ def create(

credentials: Configuration for session credentials

device_config: Device configuration for the session. Specify 'mobile' for mobile device
fingerprints and configurations.

dimensions: Viewport and browser window dimensions for the session

extension_ids: Array of extension IDs to install in the session. Use ['all_ext'] to install all
Expand Down Expand Up @@ -167,6 +171,7 @@ def create(
"block_ads": block_ads,
"concurrency": concurrency,
"credentials": credentials,
"device_config": device_config,
"dimensions": dimensions,
"extension_ids": extension_ids,
"is_selenium": is_selenium,
Expand Down Expand Up @@ -462,6 +467,7 @@ async def create(
block_ads: bool | Omit = omit,
concurrency: int | Omit = omit,
credentials: session_create_params.Credentials | Omit = omit,
device_config: session_create_params.DeviceConfig | Omit = omit,
dimensions: session_create_params.Dimensions | Omit = omit,
extension_ids: SequenceNotStr[str] | Omit = omit,
is_selenium: bool | Omit = omit,
Expand Down Expand Up @@ -495,6 +501,9 @@ async def create(

credentials: Configuration for session credentials

device_config: Device configuration for the session. Specify 'mobile' for mobile device
fingerprints and configurations.

dimensions: Viewport and browser window dimensions for the session

extension_ids: Array of extension IDs to install in the session. Use ['all_ext'] to install all
Expand Down Expand Up @@ -549,6 +558,7 @@ async def create(
"block_ads": block_ads,
"concurrency": concurrency,
"credentials": credentials,
"device_config": device_config,
"dimensions": dimensions,
"extension_ids": extension_ids,
"is_selenium": is_selenium,
Expand Down
9 changes: 8 additions & 1 deletion src/steel/types/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from .._models import BaseModel

__all__ = ["Session", "Dimensions", "OptimizeBandwidth", "StealthConfig"]
__all__ = ["Session", "Dimensions", "OptimizeBandwidth", "DeviceConfig", "StealthConfig"]


class Dimensions(BaseModel):
Expand All @@ -31,6 +31,10 @@ class OptimizeBandwidth(BaseModel):
block_url_patterns: Optional[List[str]] = FieldInfo(alias="blockUrlPatterns", default=None)


class DeviceConfig(BaseModel):
device: Optional[Literal["desktop", "mobile"]] = None


class StealthConfig(BaseModel):
humanize_interactions: Optional[bool] = FieldInfo(alias="humanizeInteractions", default=None)
"""
Expand Down Expand Up @@ -85,6 +89,9 @@ class Session(BaseModel):
websocket_url: str = FieldInfo(alias="websocketUrl")
"""URL for the session's WebSocket connection"""

device_config: Optional[DeviceConfig] = FieldInfo(alias="deviceConfig", default=None)
"""Device configuration for the session"""

is_selenium: Optional[bool] = FieldInfo(alias="isSelenium", default=None)
"""Indicates if Selenium is used in the session"""

Expand Down
11 changes: 11 additions & 0 deletions src/steel/types/session_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
__all__ = [
"SessionCreateParams",
"Credentials",
"DeviceConfig",
"Dimensions",
"OptimizeBandwidth",
"OptimizeBandwidthUnionMember1",
Expand Down Expand Up @@ -40,6 +41,12 @@ class SessionCreateParams(TypedDict, total=False):
credentials: Credentials
"""Configuration for session credentials"""

device_config: Annotated[DeviceConfig, PropertyInfo(alias="deviceConfig")]
"""Device configuration for the session.

Specify 'mobile' for mobile device fingerprints and configurations.
"""

dimensions: Dimensions
"""Viewport and browser window dimensions for the session"""

Expand Down Expand Up @@ -117,6 +124,10 @@ class Credentials(TypedDict, total=False):
exact_origin: Annotated[bool, PropertyInfo(alias="exactOrigin")]


class DeviceConfig(TypedDict, total=False):
device: Literal["desktop", "mobile"]


class Dimensions(TypedDict, total=False):
height: Required[int]
"""Height of the session"""
Expand Down
16 changes: 15 additions & 1 deletion src/steel/types/sessionslist.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@

from .._models import BaseModel

__all__ = ["Sessionslist", "Session", "SessionDimensions", "SessionOptimizeBandwidth", "SessionStealthConfig"]
__all__ = [
"Sessionslist",
"Session",
"SessionDimensions",
"SessionOptimizeBandwidth",
"SessionDeviceConfig",
"SessionStealthConfig",
]


class SessionDimensions(BaseModel):
Expand All @@ -31,6 +38,10 @@ class SessionOptimizeBandwidth(BaseModel):
block_url_patterns: Optional[List[str]] = FieldInfo(alias="blockUrlPatterns", default=None)


class SessionDeviceConfig(BaseModel):
device: Optional[Literal["desktop", "mobile"]] = None


class SessionStealthConfig(BaseModel):
humanize_interactions: Optional[bool] = FieldInfo(alias="humanizeInteractions", default=None)
"""
Expand Down Expand Up @@ -85,6 +96,9 @@ class Session(BaseModel):
websocket_url: str = FieldInfo(alias="websocketUrl")
"""URL for the session's WebSocket connection"""

device_config: Optional[SessionDeviceConfig] = FieldInfo(alias="deviceConfig", default=None)
"""Device configuration for the session"""

is_selenium: Optional[bool] = FieldInfo(alias="isSelenium", default=None)
"""Indicates if Selenium is used in the session"""

Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def test_method_create_with_all_params(self, client: Steel) -> None:
"blur_fields": True,
"exact_origin": True,
},
device_config={"device": "desktop"},
dimensions={
"height": 0,
"width": 0,
Expand Down Expand Up @@ -413,6 +414,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncSteel) ->
"blur_fields": True,
"exact_origin": True,
},
device_config={"device": "desktop"},
dimensions={
"height": 0,
"width": 0,
Expand Down