Skip to content

Commit b68b4e9

Browse files
authored
Merge pull request #12 from context-dot-dev/release-please--branches--main--changes--next
release: 0.10.0
2 parents 497911e + 675a04f commit b68b4e9

11 files changed

Lines changed: 81 additions & 5 deletions

‎.release-please-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.9.0"
2+
".": "0.10.0"
33
}

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 21
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-ca8e38b0f28a9967dab631b8868f1d59bc035fd994a717e0125c77ca592bd105.yml
3-
openapi_spec_hash: ef0a5df01201a032dcc41f9a25b733e6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-ee23a181bfa364090a90254a433704adf4d3b413730fe75e5ad9a26273ec517a.yml
3+
openapi_spec_hash: bc99d89cb1e7cdacc997214305bffee7
44
config_hash: 7d13dca2b2c6f71fc463cb6062efa5ea

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.10.0 (2026-04-24)
4+
5+
Full Changelog: [v0.9.0...v0.10.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.9.0...v0.10.0)
6+
7+
### Features
8+
9+
* **api:** api update ([494fae6](https://github.com/context-dot-dev/context-python-sdk/commit/494fae61c5dc13356848f8cd4c8c3f901e84a99c))
10+
311
## 0.9.0 (2026-04-23)
412

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

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "context.dev"
3-
version = "0.9.0"
3+
version = "0.10.0"
44
description = "The official Python library for the context.dev API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

‎src/context/dev/_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "context.dev"
4-
__version__ = "0.9.0" # x-release-please-version
4+
__version__ = "0.10.0" # x-release-please-version

‎src/context/dev/resources/web.py‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ def web_crawl_md(
254254
max_age_ms: int | Omit = omit,
255255
max_depth: int | Omit = omit,
256256
max_pages: int | Omit = omit,
257+
parse_pdf: bool | Omit = omit,
257258
shorten_base64_images: bool | Omit = omit,
258259
url_regex: str | Omit = omit,
259260
use_main_content_only: bool | Omit = omit,
@@ -287,6 +288,10 @@ def web_crawl_md(
287288
288289
max_pages: Maximum number of pages to crawl. Hard cap: 500.
289290
291+
parse_pdf: When true (default), PDF pages are fetched and their text layer is extracted and
292+
converted to Markdown alongside HTML pages. When false, PDF pages are skipped
293+
entirely (not included in results and not counted as failures).
294+
290295
shorten_base64_images: Truncate base64-encoded image data in the Markdown output
291296
292297
url_regex: Regex pattern. Only URLs matching this pattern will be followed and scraped.
@@ -313,6 +318,7 @@ def web_crawl_md(
313318
"max_age_ms": max_age_ms,
314319
"max_depth": max_depth,
315320
"max_pages": max_pages,
321+
"parse_pdf": parse_pdf,
316322
"shorten_base64_images": shorten_base64_images,
317323
"url_regex": url_regex,
318324
"use_main_content_only": use_main_content_only,
@@ -330,6 +336,7 @@ def web_scrape_html(
330336
*,
331337
url: str,
332338
max_age_ms: int | Omit = omit,
339+
parse_pdf: bool | Omit = omit,
333340
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
334341
# The extra values given here take precedence over values defined on the client or passed to this method.
335342
extra_headers: Headers | None = None,
@@ -347,6 +354,10 @@ def web_scrape_html(
347354
younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
348355
omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
349356
357+
parse_pdf: When true (default), PDF URLs are fetched and their text layer is extracted and
358+
returned wrapped in <html><pdf>…</pdf></html>. When false, PDF URLs are skipped
359+
and a 400 WEBSITE_ACCESS_ERROR is returned.
360+
350361
extra_headers: Send extra headers
351362
352363
extra_query: Add additional query parameters to the request
@@ -366,6 +377,7 @@ def web_scrape_html(
366377
{
367378
"url": url,
368379
"max_age_ms": max_age_ms,
380+
"parse_pdf": parse_pdf,
369381
},
370382
web_web_scrape_html_params.WebWebScrapeHTMLParams,
371383
),
@@ -420,6 +432,7 @@ def web_scrape_md(
420432
include_images: bool | Omit = omit,
421433
include_links: bool | Omit = omit,
422434
max_age_ms: int | Omit = omit,
435+
parse_pdf: bool | Omit = omit,
423436
shorten_base64_images: bool | Omit = omit,
424437
use_main_content_only: bool | Omit = omit,
425438
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -444,6 +457,10 @@ def web_scrape_md(
444457
younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
445458
omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
446459
460+
parse_pdf: When true (default), PDF URLs are fetched and their text layer is extracted and
461+
converted to Markdown. When false, PDF URLs are skipped and a 400
462+
WEBSITE_ACCESS_ERROR is returned.
463+
447464
shorten_base64_images: Shorten base64-encoded image data in the Markdown output
448465
449466
use_main_content_only: Extract only the main content of the page, excluding headers, footers, sidebars,
@@ -470,6 +487,7 @@ def web_scrape_md(
470487
"include_images": include_images,
471488
"include_links": include_links,
472489
"max_age_ms": max_age_ms,
490+
"parse_pdf": parse_pdf,
473491
"shorten_base64_images": shorten_base64_images,
474492
"use_main_content_only": use_main_content_only,
475493
},
@@ -747,6 +765,7 @@ async def web_crawl_md(
747765
max_age_ms: int | Omit = omit,
748766
max_depth: int | Omit = omit,
749767
max_pages: int | Omit = omit,
768+
parse_pdf: bool | Omit = omit,
750769
shorten_base64_images: bool | Omit = omit,
751770
url_regex: str | Omit = omit,
752771
use_main_content_only: bool | Omit = omit,
@@ -780,6 +799,10 @@ async def web_crawl_md(
780799
781800
max_pages: Maximum number of pages to crawl. Hard cap: 500.
782801
802+
parse_pdf: When true (default), PDF pages are fetched and their text layer is extracted and
803+
converted to Markdown alongside HTML pages. When false, PDF pages are skipped
804+
entirely (not included in results and not counted as failures).
805+
783806
shorten_base64_images: Truncate base64-encoded image data in the Markdown output
784807
785808
url_regex: Regex pattern. Only URLs matching this pattern will be followed and scraped.
@@ -806,6 +829,7 @@ async def web_crawl_md(
806829
"max_age_ms": max_age_ms,
807830
"max_depth": max_depth,
808831
"max_pages": max_pages,
832+
"parse_pdf": parse_pdf,
809833
"shorten_base64_images": shorten_base64_images,
810834
"url_regex": url_regex,
811835
"use_main_content_only": use_main_content_only,
@@ -823,6 +847,7 @@ async def web_scrape_html(
823847
*,
824848
url: str,
825849
max_age_ms: int | Omit = omit,
850+
parse_pdf: bool | Omit = omit,
826851
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
827852
# The extra values given here take precedence over values defined on the client or passed to this method.
828853
extra_headers: Headers | None = None,
@@ -840,6 +865,10 @@ async def web_scrape_html(
840865
younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
841866
omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
842867
868+
parse_pdf: When true (default), PDF URLs are fetched and their text layer is extracted and
869+
returned wrapped in <html><pdf>…</pdf></html>. When false, PDF URLs are skipped
870+
and a 400 WEBSITE_ACCESS_ERROR is returned.
871+
843872
extra_headers: Send extra headers
844873
845874
extra_query: Add additional query parameters to the request
@@ -859,6 +888,7 @@ async def web_scrape_html(
859888
{
860889
"url": url,
861890
"max_age_ms": max_age_ms,
891+
"parse_pdf": parse_pdf,
862892
},
863893
web_web_scrape_html_params.WebWebScrapeHTMLParams,
864894
),
@@ -913,6 +943,7 @@ async def web_scrape_md(
913943
include_images: bool | Omit = omit,
914944
include_links: bool | Omit = omit,
915945
max_age_ms: int | Omit = omit,
946+
parse_pdf: bool | Omit = omit,
916947
shorten_base64_images: bool | Omit = omit,
917948
use_main_content_only: bool | Omit = omit,
918949
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -937,6 +968,10 @@ async def web_scrape_md(
937968
younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
938969
omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
939970
971+
parse_pdf: When true (default), PDF URLs are fetched and their text layer is extracted and
972+
converted to Markdown. When false, PDF URLs are skipped and a 400
973+
WEBSITE_ACCESS_ERROR is returned.
974+
940975
shorten_base64_images: Shorten base64-encoded image data in the Markdown output
941976
942977
use_main_content_only: Extract only the main content of the page, excluding headers, footers, sidebars,
@@ -963,6 +998,7 @@ async def web_scrape_md(
963998
"include_images": include_images,
964999
"include_links": include_links,
9651000
"max_age_ms": max_age_ms,
1001+
"parse_pdf": parse_pdf,
9661002
"shorten_base64_images": shorten_base64_images,
9671003
"use_main_content_only": use_main_content_only,
9681004
},

‎src/context/dev/types/web_web_crawl_md_params.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ class WebWebCrawlMdParams(TypedDict, total=False):
3939
max_pages: Annotated[int, PropertyInfo(alias="maxPages")]
4040
"""Maximum number of pages to crawl. Hard cap: 500."""
4141

42+
parse_pdf: Annotated[bool, PropertyInfo(alias="parsePDF")]
43+
"""
44+
When true (default), PDF pages are fetched and their text layer is extracted and
45+
converted to Markdown alongside HTML pages. When false, PDF pages are skipped
46+
entirely (not included in results and not counted as failures).
47+
"""
48+
4249
shorten_base64_images: Annotated[bool, PropertyInfo(alias="shortenBase64Images")]
4350
"""Truncate base64-encoded image data in the Markdown output"""
4451

‎src/context/dev/types/web_web_crawl_md_response.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ class Metadata(BaseModel):
1616
num_failed: int = FieldInfo(alias="numFailed")
1717
"""Number of pages that failed to crawl"""
1818

19+
num_skipped: int = FieldInfo(alias="numSkipped")
20+
"""
21+
Number of URLs skipped (PDFs when parsePDF=false, or URLs not matching urlRegex)
22+
"""
23+
1924
num_succeeded: int = FieldInfo(alias="numSucceeded")
2025
"""Number of pages successfully crawled"""
2126

‎src/context/dev/types/web_web_scrape_html_params.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ class WebWebScrapeHTMLParams(TypedDict, total=False):
1919
younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
2020
omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
2121
"""
22+
23+
parse_pdf: Annotated[bool, PropertyInfo(alias="parsePDF")]
24+
"""
25+
When true (default), PDF URLs are fetched and their text layer is extracted and
26+
returned wrapped in <html><pdf>…</pdf></html>. When false, PDF URLs are skipped
27+
and a 400 WEBSITE_ACCESS_ERROR is returned.
28+
"""

‎src/context/dev/types/web_web_scrape_md_params.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ class WebWebScrapeMdParams(TypedDict, total=False):
2929
omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
3030
"""
3131

32+
parse_pdf: Annotated[bool, PropertyInfo(alias="parsePDF")]
33+
"""
34+
When true (default), PDF URLs are fetched and their text layer is extracted and
35+
converted to Markdown. When false, PDF URLs are skipped and a 400
36+
WEBSITE_ACCESS_ERROR is returned.
37+
"""
38+
3239
shorten_base64_images: Annotated[bool, PropertyInfo(alias="shortenBase64Images")]
3340
"""Shorten base64-encoded image data in the Markdown output"""
3441

0 commit comments

Comments
 (0)