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 @@
{
".": "2.10.0"
".": "2.11.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: 41
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-5dbe631ce516ca688273053ddcb58870561bd6dc76fa75df354c954d7af65a3c.yml
openapi_spec_hash: 53a74c4cccbdec8590db38183840a446
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-b0c72d2fe5911c9ce155275b954198bf2152e915a7e5b9f719aad50e222b9ef8.yml
openapi_spec_hash: 5cf943ea5718059b7975417b012cee28
config_hash: 0fb0ceca5946298c416cec0cca5260c7
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 2.11.0 (2026-08-18)

Full Changelog: [v2.10.0...v2.11.0](https://github.com/context-dot-dev/context-python-sdk/compare/v2.10.0...v2.11.0)

### Features

* **api:** api update ([2bdb356](https://github.com/context-dot-dev/context-python-sdk/commit/2bdb356049b2611469b28d34c9ddcc990a629525))
* **api:** api update ([2ac4e0c](https://github.com/context-dot-dev/context-python-sdk/commit/2ac4e0c1b06711b284477705f83d20e0c1dd83f5))
* **api:** api update ([68cb98c](https://github.com/context-dot-dev/context-python-sdk/commit/68cb98ca3b510157f56d34ed0cf598d7cae3b988))

## 2.10.0 (2026-08-17)

Full Changelog: [v2.9.0...v2.10.0](https://github.com/context-dot-dev/context-python-sdk/compare/v2.9.0...v2.10.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 = "2.10.0"
version = "2.11.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__ = "2.10.0" # x-release-please-version
__version__ = "2.11.0" # x-release-please-version
16 changes: 16 additions & 0 deletions src/context/dev/resources/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ def extract_styleguide(
def screenshot(
self,
*,
clear_popups: bool | Omit = omit,
color_scheme: Literal["light", "dark"] | Omit = omit,
country: Literal[
"ad",
Expand Down Expand Up @@ -617,6 +618,12 @@ def screenshot(
Capture a screenshot of a website.

Args:
clear_popups: Optional parameter for comprehensive popup cleanup. If 'true', the browser
dismisses detected cookie/consent UI and clears other detected obstructive
popups and overlays before capture. If 'false' or not provided, this parameter
requests no cleanup; handleCookiePopup can still request cookie/consent handling
independently.

color_scheme: Optional parameter to choose the site's visual theme in the screenshot. Use
'light' or 'dark' when the site offers both appearances.

Expand Down Expand Up @@ -692,6 +699,7 @@ def screenshot(
timeout=timeout,
query=maybe_transform(
{
"clear_popups": clear_popups,
"color_scheme": color_scheme,
"country": country,
"direct_url": direct_url,
Expand Down Expand Up @@ -2616,6 +2624,7 @@ async def extract_styleguide(
async def screenshot(
self,
*,
clear_popups: bool | Omit = omit,
color_scheme: Literal["light", "dark"] | Omit = omit,
country: Literal[
"ad",
Expand Down Expand Up @@ -2847,6 +2856,12 @@ async def screenshot(
Capture a screenshot of a website.

Args:
clear_popups: Optional parameter for comprehensive popup cleanup. If 'true', the browser
dismisses detected cookie/consent UI and clears other detected obstructive
popups and overlays before capture. If 'false' or not provided, this parameter
requests no cleanup; handleCookiePopup can still request cookie/consent handling
independently.

color_scheme: Optional parameter to choose the site's visual theme in the screenshot. Use
'light' or 'dark' when the site offers both appearances.

Expand Down Expand Up @@ -2922,6 +2937,7 @@ async def screenshot(
timeout=timeout,
query=await async_maybe_transform(
{
"clear_popups": clear_popups,
"color_scheme": color_scheme,
"country": country,
"direct_url": direct_url,
Expand Down
7 changes: 7 additions & 0 deletions src/context/dev/types/brand_retrieve_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ class BrandColor(BaseModel):
name: Optional[str] = None
"""Name of the color"""

source: Optional[Literal["site", "logo"]] = None
"""
Where the color was observed: 'site' colors come from the website's own theme
signals (rendered page colors, manifest, theme-color meta), 'logo' colors from
logo image pixels.
"""


class BrandEmployees(BaseModel):
"""Employee headcount information for the brand (will be null if unknown)"""
Expand Down
7 changes: 7 additions & 0 deletions src/context/dev/types/brand_retrieve_simplified_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ class BrandColor(BaseModel):
name: Optional[str] = None
"""Name of the color"""

source: Optional[Literal["site", "logo"]] = None
"""
Where the color was observed: 'site' colors come from the website's own theme
signals (rendered page colors, manifest, theme-color meta), 'logo' colors from
logo image pixels.
"""


class BrandLogoColor(BaseModel):
hex: Optional[str] = None
Expand Down
51 changes: 50 additions & 1 deletion src/context/dev/types/news_search_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,91 @@


class DataMatch(BaseModel):
"""How the article relates to the company you searched for."""

confidence: Optional[float] = None
"""How confident the match is, from 0 to 1. Null when a score is unavailable."""

level: Literal["primary", "secondary"]
"""
primary when the article is mainly about the company, secondary when the company
is mentioned but is not the main subject.
"""


class DataSource(BaseModel):
"""The publication that published the article."""

direct: bool
"""True when Context observed this article in the publisher-owned feed."""

domain: str
"""Website domain of the publication."""

name: str
"""Name of the publication, such as Reuters."""


class Data(BaseModel):
id: str
"""Stable unique identifier for this article.

Use it to deduplicate or reference an article across requests.
"""

authors: List[str]
"""Bylined authors. Empty when no byline is available."""

description: Optional[str] = None
"""Short summary or excerpt of the article, when the publisher provides one."""

image_url: Optional[str] = None
"""Lead image for the article, when one is available."""

language: Optional[str] = None
"""Language the article is written in, as a lowercase ISO 639-1 code such as en.

Null when unknown.
"""

match: DataMatch
"""How the article relates to the company you searched for."""

published_at: Optional[datetime] = None
"""When the article was published, as an ISO 8601 timestamp.

Null when the publisher does not state a reliable date.
"""

source: DataSource
"""The publication that published the article."""

story_id: str
"""Groups matching normalized headlines published on the same UTC day."""
"""Shared by articles covering the same story on the same day.

Use it to group or collapse syndicated copies of one announcement across
outlets.
"""

title: str
"""Article headline."""

type: Literal["editorial", "press_release", "regulatory_filing", "advisory"]
"""Kind of coverage.

Use it to separate independent reporting (editorial) from company-issued content
(press_release, regulatory_filing, advisory).
"""

url: str
"""Link to the article on the publisher site."""


class Meta(BaseModel):
"""Summary information about this response."""

count: int
"""Number of articles in this page."""


class KeyMetadata(BaseModel):
Expand All @@ -70,12 +112,19 @@ class KeyMetadata(BaseModel):

class NewsSearchResponse(BaseModel):
data: List[Data]
"""Articles matching the search, in the requested order."""

has_more: bool
"""True when more results are available beyond this page."""

meta: Meta
"""Summary information about this response."""

next_cursor: Optional[str] = None
"""Pass as cursor in the next request to fetch the following page.

Null when there are no more results.
"""

key_metadata: Optional[KeyMetadata] = None
"""Metadata about the API key used for the request.
Expand Down
9 changes: 9 additions & 0 deletions src/context/dev/types/web_screenshot_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@


class WebScreenshotParams(TypedDict, total=False):
clear_popups: Annotated[bool, PropertyInfo(alias="clearPopups")]
"""Optional parameter for comprehensive popup cleanup.

If 'true', the browser dismisses detected cookie/consent UI and clears other
detected obstructive popups and overlays before capture. If 'false' or not
provided, this parameter requests no cleanup; handleCookiePopup can still
request cookie/consent handling independently.
"""

color_scheme: Annotated[Literal["light", "dark"], PropertyInfo(alias="colorScheme")]
"""Optional parameter to choose the site's visual theme in the screenshot.

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(self, client: ContextDev) -> None:
@parametrize
def test_method_screenshot_with_all_params(self, client: ContextDev) -> None:
web = client.web.screenshot(
clear_popups=True,
color_scheme="light",
country="de",
direct_url="https://example.com",
Expand Down Expand Up @@ -894,6 +895,7 @@ async def test_method_screenshot(self, async_client: AsyncContextDev) -> None:
@parametrize
async def test_method_screenshot_with_all_params(self, async_client: AsyncContextDev) -> None:
web = await async_client.web.screenshot(
clear_popups=True,
color_scheme="light",
country="de",
direct_url="https://example.com",
Expand Down
Loading