Skip to content

Commit 4e3b00f

Browse files
authored
Merge pull request #41 from context-dot-dev/release-please--branches--main--changes--next
release: 0.35.0
2 parents d2e4746 + 32230f7 commit 4e3b00f

33 files changed

Lines changed: 576 additions & 26 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.34.0"
2+
".": "0.35.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: 25
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-5a8e1f6e16ecdbab4b2ff14701779818fe0328b06a1c7fa44a32da4f4bc87a49.yml
3-
openapi_spec_hash: 4b5407859d1154232189ef440b783b17
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-b84f53b1a92511eff85645f287ec08d43adcdcc589367c015770bde836422a65.yml
3+
openapi_spec_hash: 71e317da7bc58cfc3bc2e4180f5b6267
44
config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c

‎CHANGELOG.md‎

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

3+
## 0.35.0 (2026-06-11)
4+
5+
Full Changelog: [v0.34.0...v0.35.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.34.0...v0.35.0)
6+
7+
### Features
8+
9+
* **api:** api update ([6721d0b](https://github.com/context-dot-dev/context-python-sdk/commit/6721d0bb8b04b536a28ebc5dfbda87358ccb2f2b))
10+
* **api:** api update ([713964b](https://github.com/context-dot-dev/context-python-sdk/commit/713964bbe1868905959b6758a3da528ded51316e))
11+
312
## 0.34.0 (2026-06-08)
413

514
Full Changelog: [v0.33.0...v0.34.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.33.0...v0.34.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.34.0"
3+
version = "0.35.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.34.0" # x-release-please-version
4+
__version__ = "0.35.0" # x-release-please-version

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def extract(
7676
include_frames: bool | Omit = omit,
7777
instructions: str | Omit = omit,
7878
max_age_ms: int | Omit = omit,
79+
max_depth: int | Omit = omit,
80+
max_pages: int | Omit = omit,
7981
pdf: web_extract_params.Pdf | Omit = omit,
8082
stop_after_ms: int | Omit = omit,
8183
timeout_ms: int | Omit = omit,
@@ -116,6 +118,11 @@ def extract(
116118
max_age_ms: Return cached scrape results if a prior scrape for the same parameters is
117119
younger than this many milliseconds. Defaults to 7 days (604800000 ms).
118120
121+
max_depth: Optional maximum link depth from the starting URL (0 = only the starting page).
122+
If omitted, there is no crawl depth limit.
123+
124+
max_pages: Maximum number of pages to analyze for extraction. Hard cap: 50. Defaults to 5.
125+
119126
stop_after_ms: Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
120127
(110s). Default: 80000 (80s).
121128
@@ -145,6 +152,8 @@ def extract(
145152
"include_frames": include_frames,
146153
"instructions": instructions,
147154
"max_age_ms": max_age_ms,
155+
"max_depth": max_depth,
156+
"max_pages": max_pages,
148157
"pdf": pdf,
149158
"stop_after_ms": stop_after_ms,
150159
"timeout_ms": timeout_ms,
@@ -985,6 +994,8 @@ async def extract(
985994
include_frames: bool | Omit = omit,
986995
instructions: str | Omit = omit,
987996
max_age_ms: int | Omit = omit,
997+
max_depth: int | Omit = omit,
998+
max_pages: int | Omit = omit,
988999
pdf: web_extract_params.Pdf | Omit = omit,
9891000
stop_after_ms: int | Omit = omit,
9901001
timeout_ms: int | Omit = omit,
@@ -1025,6 +1036,11 @@ async def extract(
10251036
max_age_ms: Return cached scrape results if a prior scrape for the same parameters is
10261037
younger than this many milliseconds. Defaults to 7 days (604800000 ms).
10271038
1039+
max_depth: Optional maximum link depth from the starting URL (0 = only the starting page).
1040+
If omitted, there is no crawl depth limit.
1041+
1042+
max_pages: Maximum number of pages to analyze for extraction. Hard cap: 50. Defaults to 5.
1043+
10281044
stop_after_ms: Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
10291045
(110s). Default: 80000 (80s).
10301046
@@ -1054,6 +1070,8 @@ async def extract(
10541070
"include_frames": include_frames,
10551071
"instructions": instructions,
10561072
"max_age_ms": max_age_ms,
1073+
"max_depth": max_depth,
1074+
"max_pages": max_pages,
10571075
"pdf": pdf,
10581076
"stop_after_ms": stop_after_ms,
10591077
"timeout_ms": timeout_ms,

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from .._models import BaseModel
66

7-
__all__ = ["AIAIQueryResponse", "DataExtracted"]
7+
__all__ = ["AIAIQueryResponse", "DataExtracted", "KeyMetadata"]
88

99

1010
class DataExtracted(BaseModel):
@@ -19,13 +19,33 @@ class DataExtracted(BaseModel):
1919
"""
2020

2121

22+
class KeyMetadata(BaseModel):
23+
"""Metadata about the API key used for the request.
24+
25+
Included in every response whenever a valid API key is provided, even when the response status is not 200.
26+
"""
27+
28+
credits_consumed: int
29+
"""The number of credits consumed by this request."""
30+
31+
credits_remaining: int
32+
"""The number of credits remaining for your organization after this request."""
33+
34+
2235
class AIAIQueryResponse(BaseModel):
2336
data_extracted: Optional[List[DataExtracted]] = None
2437
"""Array of extracted data points"""
2538

2639
domain: Optional[str] = None
2740
"""The domain that was analyzed"""
2841

42+
key_metadata: Optional[KeyMetadata] = None
43+
"""Metadata about the API key used for the request.
44+
45+
Included in every response whenever a valid API key is provided, even when the
46+
response status is not 200.
47+
"""
48+
2949
status: Optional[str] = None
3050
"""Status of the response, e.g., 'ok'"""
3151

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,20 @@
55

66
from .._models import BaseModel
77

8-
__all__ = ["AIExtractProductResponse", "Product"]
8+
__all__ = ["AIExtractProductResponse", "KeyMetadata", "Product"]
9+
10+
11+
class KeyMetadata(BaseModel):
12+
"""Metadata about the API key used for the request.
13+
14+
Included in every response whenever a valid API key is provided, even when the response status is not 200.
15+
"""
16+
17+
credits_consumed: int
18+
"""The number of credits consumed by this request."""
19+
20+
credits_remaining: int
21+
"""The number of credits remaining for your organization after this request."""
922

1023

1124
class Product(BaseModel):
@@ -58,6 +71,13 @@ class AIExtractProductResponse(BaseModel):
5871
is_product_page: Optional[bool] = None
5972
"""Whether the given URL is a product detail page"""
6073

74+
key_metadata: Optional[KeyMetadata] = None
75+
"""Metadata about the API key used for the request.
76+
77+
Included in every response whenever a valid API key is provided, even when the
78+
response status is not 200.
79+
"""
80+
6181
platform: Optional[Literal["amazon", "tiktok_shop", "etsy", "generic"]] = None
6282
"""The detected ecommerce platform, or null if not a product page"""
6383

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,20 @@
55

66
from .._models import BaseModel
77

8-
__all__ = ["AIExtractProductsResponse", "Product"]
8+
__all__ = ["AIExtractProductsResponse", "KeyMetadata", "Product"]
9+
10+
11+
class KeyMetadata(BaseModel):
12+
"""Metadata about the API key used for the request.
13+
14+
Included in every response whenever a valid API key is provided, even when the response status is not 200.
15+
"""
16+
17+
credits_consumed: int
18+
"""The number of credits consumed by this request."""
19+
20+
credits_remaining: int
21+
"""The number of credits remaining for your organization after this request."""
922

1023

1124
class Product(BaseModel):
@@ -53,5 +66,12 @@ class Product(BaseModel):
5366

5467

5568
class AIExtractProductsResponse(BaseModel):
69+
key_metadata: Optional[KeyMetadata] = None
70+
"""Metadata about the API key used for the request.
71+
72+
Included in every response whenever a valid API key is provided, even when the
73+
response status is not 200.
74+
"""
75+
5676
products: Optional[List[Product]] = None
5777
"""Array of products extracted from the website"""

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"BrandLogoResolution",
2222
"BrandSocial",
2323
"BrandStock",
24+
"KeyMetadata",
2425
]
2526

2627

@@ -650,12 +651,32 @@ class Brand(BaseModel):
650651
"""The title or name of the brand"""
651652

652653

654+
class KeyMetadata(BaseModel):
655+
"""Metadata about the API key used for the request.
656+
657+
Included in every response whenever a valid API key is provided, even when the response status is not 200.
658+
"""
659+
660+
credits_consumed: int
661+
"""The number of credits consumed by this request."""
662+
663+
credits_remaining: int
664+
"""The number of credits remaining for your organization after this request."""
665+
666+
653667
class BrandIdentifyFromTransactionResponse(BaseModel):
654668
brand: Optional[Brand] = None
655669
"""Detailed brand information"""
656670

657671
code: Optional[int] = None
658672
"""HTTP status code"""
659673

674+
key_metadata: Optional[KeyMetadata] = None
675+
"""Metadata about the API key used for the request.
676+
677+
Included in every response whenever a valid API key is provided, even when the
678+
response status is not 200.
679+
"""
680+
660681
status: Optional[str] = None
661682
"""Status of the response, e.g., 'ok'"""

0 commit comments

Comments
 (0)