From f105f97fa4f0c8ec55079dbb36960326efe351e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 10:44:34 +0000 Subject: [PATCH 1/6] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7e84f7a..941e883 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-30ba67603321f69c2ba0432320c45caa4727ebbe353bea8874c9e7db8b95b09e.yml -openapi_spec_hash: 7dc1fadcec32637e795f641a0e97c63e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-958f8baaf81f27791e9aa1c3fc4952fd86b259cfbdf4f2dde6061d6b02472eab.yml +openapi_spec_hash: 3011aaf3384c73715b26b84926886e46 config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c From d89b15b30ac9f753359980d5e6735a288895c636 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 11:05:03 +0000 Subject: [PATCH 2/6] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 941e883..27d854a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-958f8baaf81f27791e9aa1c3fc4952fd86b259cfbdf4f2dde6061d6b02472eab.yml -openapi_spec_hash: 3011aaf3384c73715b26b84926886e46 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-222e6df6441cd9739ea466ea233d64ffd6611f153d6a54c85c88155875a46f5b.yml +openapi_spec_hash: 01aad25b8ccb503e83214704e14054ae config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c From f3dcf34930b4005cb8746bb9b0f11541ed67807e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 11:09:58 +0000 Subject: [PATCH 3/6] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 27d854a..f3d77a1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-222e6df6441cd9739ea466ea233d64ffd6611f153d6a54c85c88155875a46f5b.yml -openapi_spec_hash: 01aad25b8ccb503e83214704e14054ae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-7e207f6740771ee8963aca651aab68d46b4883289688fc26306c20b532bed560.yml +openapi_spec_hash: f7e7276c171eeb428bdb16c42fc7bb9d config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c From ee29b898d781993f6b52c26c82c238fd3377253e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 11:55:51 +0000 Subject: [PATCH 4/6] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f3d77a1..2562327 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-7e207f6740771ee8963aca651aab68d46b4883289688fc26306c20b532bed560.yml -openapi_spec_hash: f7e7276c171eeb428bdb16c42fc7bb9d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-e101766776468a99be4ea6cb65eca390c2930a50708ec8e49a7210f3d1bee144.yml +openapi_spec_hash: 411df107cd6a9e03b051dca5540e4c96 config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c From 2b2246dfde12d977b938a90f4938014ef2695eb8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 14:08:22 +0000 Subject: [PATCH 5/6] feat(api): api update --- .stats.yml | 4 +- src/context/dev/resources/web.py | 48 +++++++++++++++++++ .../dev/types/web_web_scrape_html_params.py | 8 ++++ .../dev/types/web_web_scrape_images_params.py | 8 ++++ .../dev/types/web_web_scrape_md_params.py | 8 ++++ .../types/web_web_scrape_sitemap_params.py | 8 ++++ tests/api_resources/test_web.py | 8 ++++ 7 files changed, 90 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2562327..132441d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-e101766776468a99be4ea6cb65eca390c2930a50708ec8e49a7210f3d1bee144.yml -openapi_spec_hash: 411df107cd6a9e03b051dca5540e4c96 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-9575a58bf027da9ca006bf34d9e24850ef2bbc6de0459b9fff6f26cf62e1d82d.yml +openapi_spec_hash: e68a98dbc0e29b45c42b3517eb554e6c config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c diff --git a/src/context/dev/resources/web.py b/src/context/dev/resources/web.py index 3fc6361..fc6c06d 100644 --- a/src/context/dev/resources/web.py +++ b/src/context/dev/resources/web.py @@ -612,6 +612,7 @@ def web_scrape_html( self, *, url: str, + headers: Dict[str, str] | Omit = omit, include_frames: bool | Omit = omit, max_age_ms: int | Omit = omit, pdf: web_web_scrape_html_params.Pdf | Omit = omit, @@ -630,6 +631,10 @@ def web_scrape_html( Args: url: Full URL to scrape (must include http:// or https:// protocol) + headers: Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + include_frames: When true, iframes are rendered inline into the returned HTML. max_age_ms: Return a cached result if a prior scrape for the same parameters exists and is @@ -665,6 +670,7 @@ def web_scrape_html( query=maybe_transform( { "url": url, + "headers": headers, "include_frames": include_frames, "max_age_ms": max_age_ms, "pdf": pdf, @@ -682,6 +688,7 @@ def web_scrape_images( *, url: str, enrichment: web_web_scrape_images_params.Enrichment | Omit = omit, + headers: Dict[str, str] | Omit = omit, max_age_ms: int | Omit = omit, timeout_ms: int | Omit = omit, wait_for_ms: int | Omit = omit, @@ -704,6 +711,10 @@ def web_scrape_images( enrichment: Optional per-image processing, sent as deep-object query params such as enrichment[resolution]=true. + headers: Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + max_age_ms: Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days). @@ -733,6 +744,7 @@ def web_scrape_images( { "url": url, "enrichment": enrichment, + "headers": headers, "max_age_ms": max_age_ms, "timeout_ms": timeout_ms, "wait_for_ms": wait_for_ms, @@ -747,6 +759,7 @@ def web_scrape_md( self, *, url: str, + headers: Dict[str, str] | Omit = omit, include_frames: bool | Omit = omit, include_images: bool | Omit = omit, include_links: bool | Omit = omit, @@ -770,6 +783,10 @@ def web_scrape_md( url: Full URL to scrape into LLM usable Markdown (must include http:// or https:// protocol) + headers: Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + include_frames: When true, the contents of iframes are rendered to Markdown. include_images: Include image references in Markdown output @@ -813,6 +830,7 @@ def web_scrape_md( query=maybe_transform( { "url": url, + "headers": headers, "include_frames": include_frames, "include_images": include_images, "include_links": include_links, @@ -833,6 +851,7 @@ def web_scrape_sitemap( self, *, domain: str, + headers: Dict[str, str] | Omit = omit, max_links: int | Omit = omit, timeout_ms: int | Omit = omit, url_regex: str | Omit = omit, @@ -849,6 +868,10 @@ def web_scrape_sitemap( Args: domain: Domain to build a sitemap for + headers: Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + max_links: Maximum number of links to return from the sitemap crawl. Defaults to 10,000. Minimum is 1, maximum is 100,000. @@ -877,6 +900,7 @@ def web_scrape_sitemap( query=maybe_transform( { "domain": domain, + "headers": headers, "max_links": max_links, "timeout_ms": timeout_ms, "url_regex": url_regex, @@ -1454,6 +1478,7 @@ async def web_scrape_html( self, *, url: str, + headers: Dict[str, str] | Omit = omit, include_frames: bool | Omit = omit, max_age_ms: int | Omit = omit, pdf: web_web_scrape_html_params.Pdf | Omit = omit, @@ -1472,6 +1497,10 @@ async def web_scrape_html( Args: url: Full URL to scrape (must include http:// or https:// protocol) + headers: Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + include_frames: When true, iframes are rendered inline into the returned HTML. max_age_ms: Return a cached result if a prior scrape for the same parameters exists and is @@ -1507,6 +1536,7 @@ async def web_scrape_html( query=await async_maybe_transform( { "url": url, + "headers": headers, "include_frames": include_frames, "max_age_ms": max_age_ms, "pdf": pdf, @@ -1524,6 +1554,7 @@ async def web_scrape_images( *, url: str, enrichment: web_web_scrape_images_params.Enrichment | Omit = omit, + headers: Dict[str, str] | Omit = omit, max_age_ms: int | Omit = omit, timeout_ms: int | Omit = omit, wait_for_ms: int | Omit = omit, @@ -1546,6 +1577,10 @@ async def web_scrape_images( enrichment: Optional per-image processing, sent as deep-object query params such as enrichment[resolution]=true. + headers: Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + max_age_ms: Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days). @@ -1575,6 +1610,7 @@ async def web_scrape_images( { "url": url, "enrichment": enrichment, + "headers": headers, "max_age_ms": max_age_ms, "timeout_ms": timeout_ms, "wait_for_ms": wait_for_ms, @@ -1589,6 +1625,7 @@ async def web_scrape_md( self, *, url: str, + headers: Dict[str, str] | Omit = omit, include_frames: bool | Omit = omit, include_images: bool | Omit = omit, include_links: bool | Omit = omit, @@ -1612,6 +1649,10 @@ async def web_scrape_md( url: Full URL to scrape into LLM usable Markdown (must include http:// or https:// protocol) + headers: Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + include_frames: When true, the contents of iframes are rendered to Markdown. include_images: Include image references in Markdown output @@ -1655,6 +1696,7 @@ async def web_scrape_md( query=await async_maybe_transform( { "url": url, + "headers": headers, "include_frames": include_frames, "include_images": include_images, "include_links": include_links, @@ -1675,6 +1717,7 @@ async def web_scrape_sitemap( self, *, domain: str, + headers: Dict[str, str] | Omit = omit, max_links: int | Omit = omit, timeout_ms: int | Omit = omit, url_regex: str | Omit = omit, @@ -1691,6 +1734,10 @@ async def web_scrape_sitemap( Args: domain: Domain to build a sitemap for + headers: Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + max_links: Maximum number of links to return from the sitemap crawl. Defaults to 10,000. Minimum is 1, maximum is 100,000. @@ -1719,6 +1766,7 @@ async def web_scrape_sitemap( query=await async_maybe_transform( { "domain": domain, + "headers": headers, "max_links": max_links, "timeout_ms": timeout_ms, "url_regex": url_regex, diff --git a/src/context/dev/types/web_web_scrape_html_params.py b/src/context/dev/types/web_web_scrape_html_params.py index 7b39237..f734480 100644 --- a/src/context/dev/types/web_web_scrape_html_params.py +++ b/src/context/dev/types/web_web_scrape_html_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Dict from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -13,6 +14,13 @@ class WebWebScrapeHTMLParams(TypedDict, total=False): url: Required[str] """Full URL to scrape (must include http:// or https:// protocol)""" + headers: Dict[str, str] + """ + Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + """ + include_frames: Annotated[bool, PropertyInfo(alias="includeFrames")] """When true, iframes are rendered inline into the returned HTML.""" diff --git a/src/context/dev/types/web_web_scrape_images_params.py b/src/context/dev/types/web_web_scrape_images_params.py index ef6713d..06e282a 100644 --- a/src/context/dev/types/web_web_scrape_images_params.py +++ b/src/context/dev/types/web_web_scrape_images_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Dict from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -19,6 +20,13 @@ class WebWebScrapeImagesParams(TypedDict, total=False): enrichment[resolution]=true. """ + headers: Dict[str, str] + """ + Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + """ + max_age_ms: Annotated[int, PropertyInfo(alias="maxAgeMs")] """Reuse a cached result this many milliseconds old or newer. diff --git a/src/context/dev/types/web_web_scrape_md_params.py b/src/context/dev/types/web_web_scrape_md_params.py index fa06876..0c27420 100644 --- a/src/context/dev/types/web_web_scrape_md_params.py +++ b/src/context/dev/types/web_web_scrape_md_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Dict from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -16,6 +17,13 @@ class WebWebScrapeMdParams(TypedDict, total=False): protocol) """ + headers: Dict[str, str] + """ + Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + """ + include_frames: Annotated[bool, PropertyInfo(alias="includeFrames")] """When true, the contents of iframes are rendered to Markdown.""" diff --git a/src/context/dev/types/web_web_scrape_sitemap_params.py b/src/context/dev/types/web_web_scrape_sitemap_params.py index 11d025e..1990d8b 100644 --- a/src/context/dev/types/web_web_scrape_sitemap_params.py +++ b/src/context/dev/types/web_web_scrape_sitemap_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Dict from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -13,6 +14,13 @@ class WebWebScrapeSitemapParams(TypedDict, total=False): domain: Required[str] """Domain to build a sitemap for""" + headers: Dict[str, str] + """ + Optional outbound HTTP headers forwarded only to the target URL, sent as + deep-object query params such as headers[X-Custom]=value. When provided, caching + is bypassed: the result is neither read from nor written to cache. + """ + max_links: Annotated[int, PropertyInfo(alias="maxLinks")] """Maximum number of links to return from the sitemap crawl. diff --git a/tests/api_resources/test_web.py b/tests/api_resources/test_web.py index 7da3ee5..e90d5ee 100644 --- a/tests/api_resources/test_web.py +++ b/tests/api_resources/test_web.py @@ -413,6 +413,7 @@ def test_method_web_scrape_html(self, client: ContextDev) -> None: def test_method_web_scrape_html_with_all_params(self, client: ContextDev) -> None: web = client.web.web_scrape_html( url="https://example.com", + headers={"foo": "J!"}, include_frames=True, max_age_ms=0, pdf={ @@ -470,6 +471,7 @@ def test_method_web_scrape_images_with_all_params(self, client: ContextDev) -> N "max_time_per_ms": 1, "resolution": True, }, + headers={"foo": "J!"}, max_age_ms=0, timeout_ms=1000, wait_for_ms=0, @@ -515,6 +517,7 @@ def test_method_web_scrape_md(self, client: ContextDev) -> None: def test_method_web_scrape_md_with_all_params(self, client: ContextDev) -> None: web = client.web.web_scrape_md( url="https://example.com", + headers={"foo": "J!"}, include_frames=True, include_images=True, include_links=True, @@ -570,6 +573,7 @@ def test_method_web_scrape_sitemap(self, client: ContextDev) -> None: def test_method_web_scrape_sitemap_with_all_params(self, client: ContextDev) -> None: web = client.web.web_scrape_sitemap( domain="domain", + headers={"foo": "J!"}, max_links=1, timeout_ms=1000, url_regex="^https?://[^/]+/blog/", @@ -992,6 +996,7 @@ async def test_method_web_scrape_html(self, async_client: AsyncContextDev) -> No async def test_method_web_scrape_html_with_all_params(self, async_client: AsyncContextDev) -> None: web = await async_client.web.web_scrape_html( url="https://example.com", + headers={"foo": "J!"}, include_frames=True, max_age_ms=0, pdf={ @@ -1049,6 +1054,7 @@ async def test_method_web_scrape_images_with_all_params(self, async_client: Asyn "max_time_per_ms": 1, "resolution": True, }, + headers={"foo": "J!"}, max_age_ms=0, timeout_ms=1000, wait_for_ms=0, @@ -1094,6 +1100,7 @@ async def test_method_web_scrape_md(self, async_client: AsyncContextDev) -> None async def test_method_web_scrape_md_with_all_params(self, async_client: AsyncContextDev) -> None: web = await async_client.web.web_scrape_md( url="https://example.com", + headers={"foo": "J!"}, include_frames=True, include_images=True, include_links=True, @@ -1149,6 +1156,7 @@ async def test_method_web_scrape_sitemap(self, async_client: AsyncContextDev) -> async def test_method_web_scrape_sitemap_with_all_params(self, async_client: AsyncContextDev) -> None: web = await async_client.web.web_scrape_sitemap( domain="domain", + headers={"foo": "J!"}, max_links=1, timeout_ms=1000, url_regex="^https?://[^/]+/blog/", From 4486cb50cf5ac6e156f17f22527bbc3b7be290d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 14:08:42 +0000 Subject: [PATCH 6/6] release: 0.30.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/context/dev/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b8dda9b..554e34b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.29.0" + ".": "0.30.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 488cc29..dac3c43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.30.0 (2026-06-06) + +Full Changelog: [v0.29.0...v0.30.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.29.0...v0.30.0) + +### Features + +* **api:** api update ([2b2246d](https://github.com/context-dot-dev/context-python-sdk/commit/2b2246dfde12d977b938a90f4938014ef2695eb8)) + ## 0.29.0 (2026-06-01) Full Changelog: [v0.28.0...v0.29.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.28.0...v0.29.0) diff --git a/pyproject.toml b/pyproject.toml index f59cebb..eb5d463 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "context.dev" -version = "0.29.0" +version = "0.30.0" description = "The official Python library for the context.dev API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/context/dev/_version.py b/src/context/dev/_version.py index 5bbc7f0..57667bf 100644 --- a/src/context/dev/_version.py +++ b/src/context/dev/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "context.dev" -__version__ = "0.29.0" # x-release-please-version +__version__ = "0.30.0" # x-release-please-version