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.20.0"
".": "0.21.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: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-f27c9584f74632a8c9603fce7190e3f63275a4ec4030da2a9475efb619618b3f.yml
openapi_spec_hash: 224cb935536a4d999d9683f8c03ea32f
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-e8d4199dcf2a97bcd0858e18db7feb3bb4f5a64c9c2d0ee0105636d28c35227d.yml
openapi_spec_hash: 8e825842065c24f11fd3f51fdd705337
config_hash: ff13935d1231ad44cd3822ffe39904b4
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.21.0 (2026-05-11)

Full Changelog: [v0.20.0...v0.21.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.20.0...v0.21.0)

### Features

* **api:** api update ([3758473](https://github.com/context-dot-dev/context-python-sdk/commit/3758473b755cd5624e8cdcdc63e30075f3b3860c))
* **api:** api update ([d41b2b0](https://github.com/context-dot-dev/context-python-sdk/commit/d41b2b0e278d2c2b6a0d04e4890c2b5f0f518560))

## 0.20.0 (2026-05-10)

Full Changelog: [v0.19.0...v0.20.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.19.0...v0.20.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 = "0.20.0"
version = "0.21.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__ = "0.20.0" # x-release-please-version
__version__ = "0.21.0" # x-release-please-version
12 changes: 12 additions & 0 deletions src/context/dev/resources/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def screenshot(
direct_url: str | Omit = omit,
domain: str | Omit = omit,
full_screenshot: Literal["true", "false"] | Omit = omit,
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,
timeout_ms: int | Omit = omit,
Expand Down Expand Up @@ -208,6 +209,10 @@ def screenshot(
screenshot capturing all content. If 'false' or not provided, takes a viewport
screenshot (standard browser view).

handle_cookie_popup: Optional parameter to control cookie/consent popup handling. If 'true', we
dismiss cookie banner before capture. If 'false' or not provided, captures the
page without that step.

max_age_ms: Return a cached screenshot if a prior screenshot for the same parameters exists
and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
Expand Down Expand Up @@ -248,6 +253,7 @@ def screenshot(
"direct_url": direct_url,
"domain": domain,
"full_screenshot": full_screenshot,
"handle_cookie_popup": handle_cookie_popup,
"max_age_ms": max_age_ms,
"page": page,
"timeout_ms": timeout_ms,
Expand Down Expand Up @@ -790,6 +796,7 @@ async def screenshot(
direct_url: str | Omit = omit,
domain: str | Omit = omit,
full_screenshot: Literal["true", "false"] | Omit = omit,
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,
timeout_ms: int | Omit = omit,
Expand Down Expand Up @@ -818,6 +825,10 @@ async def screenshot(
screenshot capturing all content. If 'false' or not provided, takes a viewport
screenshot (standard browser view).

handle_cookie_popup: Optional parameter to control cookie/consent popup handling. If 'true', we
dismiss cookie banner before capture. If 'false' or not provided, captures the
page without that step.

max_age_ms: Return a cached screenshot if a prior screenshot for the same parameters exists
and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
Expand Down Expand Up @@ -858,6 +869,7 @@ async def screenshot(
"direct_url": direct_url,
"domain": domain,
"full_screenshot": full_screenshot,
"handle_cookie_popup": handle_cookie_popup,
"max_age_ms": max_age_ms,
"page": page,
"timeout_ms": timeout_ms,
Expand Down
7 changes: 7 additions & 0 deletions src/context/dev/types/web_screenshot_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ class WebScreenshotParams(TypedDict, total=False):
provided, takes a viewport screenshot (standard browser view).
"""

handle_cookie_popup: Annotated[Literal["true", "false"], PropertyInfo(alias="handleCookiePopup")]
"""Optional parameter to control cookie/consent popup handling.

If 'true', we dismiss cookie banner before capture. If 'false' or not provided,
captures the page without that step.
"""

max_age_ms: Annotated[int, PropertyInfo(alias="maxAgeMs")]
"""
Return a cached screenshot if a prior screenshot for the same parameters exists
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 @@ -115,6 +115,7 @@ def test_method_screenshot_with_all_params(self, client: ContextDev) -> None:
direct_url="https://example.com",
domain="domain",
full_screenshot="true",
handle_cookie_popup="true",
max_age_ms=0,
page="login",
timeout_ms=1000,
Expand Down Expand Up @@ -505,6 +506,7 @@ async def test_method_screenshot_with_all_params(self, async_client: AsyncContex
direct_url="https://example.com",
domain="domain",
full_screenshot="true",
handle_cookie_popup="true",
max_age_ms=0,
page="login",
timeout_ms=1000,
Expand Down
Loading