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 @@
{
".": "1.1.0"
".": "1.2.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 25
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-3024c2681b0acf12535d68f39c1b49113330548513a54b276116cd3f2eda182e.yml
openapi_spec_hash: ab3a6473e575381cacd245bf54dcf0f7
config_hash: b0f343b2ab3baebad7b0d6d51f0f16fc
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-4903d5902cec6a80f42b9adaa9cf0defa9805ff22d7ae96970d209a4f867e195.yml
openapi_spec_hash: 1097891c23530dfe0155f23170daf973
config_hash: c7b0cdaba3b9797b77efd89e1754d803
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.2.0 (2026-06-25)

Full Changelog: [v1.1.0...v1.2.0](https://github.com/context-dot-dev/context-python-sdk/compare/v1.1.0...v1.2.0)

### Features

* **api:** api update ([5c97d99](https://github.com/context-dot-dev/context-python-sdk/commit/5c97d9910c3ea61b4440d3d3dde189b62f4de2b6))

## 1.1.0 (2026-06-21)

Full Changelog: [v1.0.0...v1.1.0](https://github.com/context-dot-dev/context-python-sdk/compare/v1.0.0...v1.1.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 = "context.dev"
version = "1.1.0"
version = "1.2.0"
description = "The official Python library for the context.dev API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/context/dev/_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__ = "context.dev"
__version__ = "1.1.0" # x-release-please-version
__version__ = "1.2.0" # x-release-please-version
18 changes: 18 additions & 0 deletions src/context/dev/resources/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ def screenshot(
handle_cookie_popup: Literal["true", "false"] | Omit = omit,
max_age_ms: int | Omit = omit,
page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"] | Omit = omit,
scroll_offset: int | Omit = omit,
timeout_ms: int | Omit = omit,
viewport: web_screenshot_params.Viewport | Omit = omit,
wait_for_ms: int | Omit = omit,
Expand Down Expand Up @@ -399,6 +400,13 @@ def screenshot(
provided, screenshots the main domain landing page. Only applicable when using
'domain', not 'directUrl'.

scroll_offset: Optional vertical scroll offset in pixels for capturing a long page in
viewport-sized chunks. When provided, the full page is captured once and the
returned image is the viewport-sized slice that begins at this Y offset (e.g.
request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page
top to bottom). The final slice may be shorter than the viewport height. Takes
precedence over fullScreenshot. Max: 100000.

timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
than this value, it will be aborted with a 408 status code. Maximum allowed
value is 300000ms (5 minutes).
Expand Down Expand Up @@ -432,6 +440,7 @@ def screenshot(
"handle_cookie_popup": handle_cookie_popup,
"max_age_ms": max_age_ms,
"page": page,
"scroll_offset": scroll_offset,
"timeout_ms": timeout_ms,
"viewport": viewport,
"wait_for_ms": wait_for_ms,
Expand Down Expand Up @@ -1277,6 +1286,7 @@ async def screenshot(
handle_cookie_popup: Literal["true", "false"] | Omit = omit,
max_age_ms: int | Omit = omit,
page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"] | Omit = omit,
scroll_offset: int | Omit = omit,
timeout_ms: int | Omit = omit,
viewport: web_screenshot_params.Viewport | Omit = omit,
wait_for_ms: int | Omit = omit,
Expand Down Expand Up @@ -1317,6 +1327,13 @@ async def screenshot(
provided, screenshots the main domain landing page. Only applicable when using
'domain', not 'directUrl'.

scroll_offset: Optional vertical scroll offset in pixels for capturing a long page in
viewport-sized chunks. When provided, the full page is captured once and the
returned image is the viewport-sized slice that begins at this Y offset (e.g.
request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page
top to bottom). The final slice may be shorter than the viewport height. Takes
precedence over fullScreenshot. Max: 100000.

timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
than this value, it will be aborted with a 408 status code. Maximum allowed
value is 300000ms (5 minutes).
Expand Down Expand Up @@ -1350,6 +1367,7 @@ async def screenshot(
"handle_cookie_popup": handle_cookie_popup,
"max_age_ms": max_age_ms,
"page": page,
"scroll_offset": scroll_offset,
"timeout_ms": timeout_ms,
"viewport": viewport,
"wait_for_ms": wait_for_ms,
Expand Down
10 changes: 10 additions & 0 deletions src/context/dev/types/web_screenshot_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ class WebScreenshotParams(TypedDict, total=False):
applicable when using 'domain', not 'directUrl'.
"""

scroll_offset: Annotated[int, PropertyInfo(alias="scrollOffset")]
"""
Optional vertical scroll offset in pixels for capturing a long page in
viewport-sized chunks. When provided, the full page is captured once and the
returned image is the viewport-sized slice that begins at this Y offset (e.g.
request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page
top to bottom). The final slice may be shorter than the viewport height. Takes
precedence over fullScreenshot. Max: 100000.
"""

timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
"""Optional timeout in milliseconds for the request.

Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def test_method_screenshot_with_all_params(self, client: ContextDev) -> None:
handle_cookie_popup="true",
max_age_ms=0,
page="login",
scroll_offset=0,
timeout_ms=1000,
viewport={
"height": 240,
Expand Down Expand Up @@ -840,6 +841,7 @@ async def test_method_screenshot_with_all_params(self, async_client: AsyncContex
handle_cookie_popup="true",
max_age_ms=0,
page="login",
scroll_offset=0,
timeout_ms=1000,
viewport={
"height": 240,
Expand Down
Loading