diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d52d2b9..a26ebfc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.13.0" + ".": "0.14.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index adf31eb..d892d2f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-d5ca4cac056c38a1cb69c6d9033abe0d2b4d5858ee9a76e1172b23649ab1cca6.yml -openapi_spec_hash: 8e1dd204746bcfaaf637d93b1d339eb2 -config_hash: 70354330f92ce169beabc98696ebb9a3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-3ab7c195646f05374a224a980cab48a6c9844ba7aedf9dba28c7fd8273b173f2.yml +openapi_spec_hash: b10ee8536928665190a110738964fccb +config_hash: ff13935d1231ad44cd3822ffe39904b4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ef33de..24bbced 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.14.0 (2026-05-01) + +Full Changelog: [v0.13.0...v0.14.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.13.0...v0.14.0) + +### Features + +* **api:** api update ([4fea286](https://github.com/context-dot-dev/context-python-sdk/commit/4fea2861863c56e66881dbe898f12365c794568c)) +* **api:** manual updates ([d23341d](https://github.com/context-dot-dev/context-python-sdk/commit/d23341d351fdd33e0f101f532fc00b7af753c229)) + + +### Chores + +* **internal:** reformat pyproject.toml ([d781abc](https://github.com/context-dot-dev/context-python-sdk/commit/d781abc45cc85a3ecfb98cbeb9ca6d32af32dcdf)) + ## 0.13.0 (2026-04-30) Full Changelog: [v0.12.0...v0.13.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.12.0...v0.13.0) diff --git a/README.md b/README.md index 29a84e8..4b2b4ea 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ It is generated with [Stainless](https://www.stainless.com/). Use the Context Dev MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. -[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=context.dev-mcp&config=eyJuYW1lIjoiY29udGV4dC5kZXYtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vY29udGV4dC1kZXYuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1jb250ZXh0LWRldi1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ) -[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22context.dev-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fcontext-dev.stlmcp.com%22%2C%22headers%22%3A%7B%22x-context-dev-api-key%22%3A%22My%20API%20Key%22%7D%7D) +[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=context-dev-mcp&config=eyJuYW1lIjoiY29udGV4dC1kZXYtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vY29udGV4dC1kZXYuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1jb250ZXh0LWRldi1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ) +[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22context-dev-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fcontext-dev.stlmcp.com%22%2C%22headers%22%3A%7B%22x-context-dev-api-key%22%3A%22My%20API%20Key%22%7D%7D) > Note: You may need to set environment variables in your MCP client. diff --git a/pyproject.toml b/pyproject.toml index 944eeb0..018e265 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "context.dev" -version = "0.13.0" +version = "0.14.0" description = "The official Python library for the context.dev API" dynamic = ["readme"] license = "Apache-2.0" @@ -154,7 +154,7 @@ show_error_codes = true # # We also exclude our `tests` as mypy doesn't always infer # types correctly and Pyright will still catch any type errors. -exclude = ['src/context/dev/_files.py', '_dev/.*.py', 'tests/.*'] +exclude = ["src/context/dev/_files.py", "_dev/.*.py", "tests/.*"] strict_equality = true implicit_reexport = true diff --git a/src/context/dev/_version.py b/src/context/dev/_version.py index 8b0c2d1..63fbdc7 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.13.0" # x-release-please-version +__version__ = "0.14.0" # x-release-please-version diff --git a/src/context/dev/resources/web.py b/src/context/dev/resources/web.py index 59643e9..478d3b7 100644 --- a/src/context/dev/resources/web.py +++ b/src/context/dev/resources/web.py @@ -249,6 +249,7 @@ def web_crawl_md( *, url: str, follow_subdomains: bool | Omit = omit, + include_frames: bool | Omit = omit, include_images: bool | Omit = omit, include_links: bool | Omit = omit, max_age_ms: int | Omit = omit, @@ -276,6 +277,9 @@ def web_crawl_md( docs.example.com when starting from example.com). www and apex are always treated as equivalent. + include_frames: When true, the contents of iframes are rendered to Markdown for each crawled + page. + include_images: Include image references in the Markdown output include_links: Preserve hyperlinks in the Markdown output @@ -313,6 +317,7 @@ def web_crawl_md( { "url": url, "follow_subdomains": follow_subdomains, + "include_frames": include_frames, "include_images": include_images, "include_links": include_links, "max_age_ms": max_age_ms, @@ -335,6 +340,7 @@ def web_scrape_html( self, *, url: str, + include_frames: bool | Omit = omit, max_age_ms: int | Omit = omit, parse_pdf: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -350,6 +356,8 @@ def web_scrape_html( Args: url: Full URL to scrape (must include http:// or https:// protocol) + 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 younger than this many milliseconds. Defaults to 1 day (86400000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. @@ -376,6 +384,7 @@ def web_scrape_html( query=maybe_transform( { "url": url, + "include_frames": include_frames, "max_age_ms": max_age_ms, "parse_pdf": parse_pdf, }, @@ -429,6 +438,7 @@ def web_scrape_md( self, *, url: str, + include_frames: bool | Omit = omit, include_images: bool | Omit = omit, include_links: bool | Omit = omit, max_age_ms: int | Omit = omit, @@ -449,6 +459,8 @@ def web_scrape_md( url: Full URL to scrape into LLM usable Markdown (must include http:// or https:// protocol) + include_frames: When true, the contents of iframes are rendered to Markdown. + include_images: Include image references in Markdown output include_links: Preserve hyperlinks in Markdown output @@ -484,6 +496,7 @@ def web_scrape_md( query=maybe_transform( { "url": url, + "include_frames": include_frames, "include_images": include_images, "include_links": include_links, "max_age_ms": max_age_ms, @@ -760,6 +773,7 @@ async def web_crawl_md( *, url: str, follow_subdomains: bool | Omit = omit, + include_frames: bool | Omit = omit, include_images: bool | Omit = omit, include_links: bool | Omit = omit, max_age_ms: int | Omit = omit, @@ -787,6 +801,9 @@ async def web_crawl_md( docs.example.com when starting from example.com). www and apex are always treated as equivalent. + include_frames: When true, the contents of iframes are rendered to Markdown for each crawled + page. + include_images: Include image references in the Markdown output include_links: Preserve hyperlinks in the Markdown output @@ -824,6 +841,7 @@ async def web_crawl_md( { "url": url, "follow_subdomains": follow_subdomains, + "include_frames": include_frames, "include_images": include_images, "include_links": include_links, "max_age_ms": max_age_ms, @@ -846,6 +864,7 @@ async def web_scrape_html( self, *, url: str, + include_frames: bool | Omit = omit, max_age_ms: int | Omit = omit, parse_pdf: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -861,6 +880,8 @@ async def web_scrape_html( Args: url: Full URL to scrape (must include http:// or https:// protocol) + 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 younger than this many milliseconds. Defaults to 1 day (86400000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. @@ -887,6 +908,7 @@ async def web_scrape_html( query=await async_maybe_transform( { "url": url, + "include_frames": include_frames, "max_age_ms": max_age_ms, "parse_pdf": parse_pdf, }, @@ -940,6 +962,7 @@ async def web_scrape_md( self, *, url: str, + include_frames: bool | Omit = omit, include_images: bool | Omit = omit, include_links: bool | Omit = omit, max_age_ms: int | Omit = omit, @@ -960,6 +983,8 @@ async def web_scrape_md( url: Full URL to scrape into LLM usable Markdown (must include http:// or https:// protocol) + include_frames: When true, the contents of iframes are rendered to Markdown. + include_images: Include image references in Markdown output include_links: Preserve hyperlinks in Markdown output @@ -995,6 +1020,7 @@ async def web_scrape_md( query=await async_maybe_transform( { "url": url, + "include_frames": include_frames, "include_images": include_images, "include_links": include_links, "max_age_ms": max_age_ms, diff --git a/src/context/dev/types/web_web_crawl_md_params.py b/src/context/dev/types/web_web_crawl_md_params.py index 69ee967..8e14b0a 100644 --- a/src/context/dev/types/web_web_crawl_md_params.py +++ b/src/context/dev/types/web_web_crawl_md_params.py @@ -20,6 +20,12 @@ class WebWebCrawlMdParams(TypedDict, total=False): treated as equivalent. """ + include_frames: Annotated[bool, PropertyInfo(alias="includeFrames")] + """ + When true, the contents of iframes are rendered to Markdown for each crawled + page. + """ + include_images: Annotated[bool, PropertyInfo(alias="includeImages")] """Include image references in the Markdown output""" 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 f1eb86c..d0eb3a8 100644 --- a/src/context/dev/types/web_web_scrape_html_params.py +++ b/src/context/dev/types/web_web_scrape_html_params.py @@ -13,6 +13,9 @@ class WebWebScrapeHTMLParams(TypedDict, total=False): url: Required[str] """Full URL to scrape (must include http:// or https:// protocol)""" + include_frames: Annotated[bool, PropertyInfo(alias="includeFrames")] + """When true, iframes are rendered inline into the returned HTML.""" + max_age_ms: Annotated[int, PropertyInfo(alias="maxAgeMs")] """ Return a cached result if a prior scrape for the same parameters exists and is 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 ab364f5..54ba948 100644 --- a/src/context/dev/types/web_web_scrape_md_params.py +++ b/src/context/dev/types/web_web_scrape_md_params.py @@ -16,6 +16,9 @@ class WebWebScrapeMdParams(TypedDict, total=False): protocol) """ + include_frames: Annotated[bool, PropertyInfo(alias="includeFrames")] + """When true, the contents of iframes are rendered to Markdown.""" + include_images: Annotated[bool, PropertyInfo(alias="includeImages")] """Include image references in Markdown output""" diff --git a/tests/api_resources/test_web.py b/tests/api_resources/test_web.py index 04082f7..25f999f 100644 --- a/tests/api_resources/test_web.py +++ b/tests/api_resources/test_web.py @@ -156,6 +156,7 @@ def test_method_web_crawl_md_with_all_params(self, client: ContextDev) -> None: web = client.web.web_crawl_md( url="https://example.com", follow_subdomains=True, + include_frames=True, include_images=True, include_links=True, max_age_ms=0, @@ -207,6 +208,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", + include_frames=True, max_age_ms=0, parse_pdf=True, ) @@ -285,6 +287,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", + include_frames=True, include_images=True, include_links=True, max_age_ms=0, @@ -500,6 +503,7 @@ async def test_method_web_crawl_md_with_all_params(self, async_client: AsyncCont web = await async_client.web.web_crawl_md( url="https://example.com", follow_subdomains=True, + include_frames=True, include_images=True, include_links=True, max_age_ms=0, @@ -551,6 +555,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", + include_frames=True, max_age_ms=0, parse_pdf=True, ) @@ -629,6 +634,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", + include_frames=True, include_images=True, include_links=True, max_age_ms=0,