Skip to content

Commit 3884afe

Browse files
authored
Merge pull request #54 from context-dot-dev/release-please--branches--main--changes--next
release: 2.8.0
2 parents d191105 + f4e5664 commit 3884afe

11 files changed

Lines changed: 304 additions & 9 deletions

File tree

‎.release-please-manifest.json‎

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

‎.stats.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 37
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-758c3a2fbd5b7be61c8e6e0ad2e6a5ec30695747bb675960d888c497647d13d7.yml
3-
openapi_spec_hash: 00002d90bde02f67e174368ae470c597
4-
config_hash: 2bea1743c84d63bd61f8501a6ea63065
1+
configured_endpoints: 38
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-155e4761d62255841349c0f8a01b0a9c463ea1d1f2d6c4fd8d1a75c8bef6f226.yml
3+
openapi_spec_hash: ab91f77e7c9d992400cbc7fc8a9e76c1
4+
config_hash: bff282047fafdad771fb7ec685f56944

‎CHANGELOG.md‎

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

3+
## 2.8.0 (2026-08-05)
4+
5+
Full Changelog: [v2.7.0...v2.8.0](https://github.com/context-dot-dev/context-python-sdk/compare/v2.7.0...v2.8.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([d26f4e8](https://github.com/context-dot-dev/context-python-sdk/commit/d26f4e842387b630ba30fcb291bbcdbad610d28c))
10+
311
## 2.7.0 (2026-08-01)
412

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

‎api.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,18 @@ Methods:
6262
Types:
6363

6464
```python
65-
from context.dev.types import BrandRetrieveResponse, BrandRetrieveSimplifiedResponse
65+
from context.dev.types import (
66+
BrandRetrieveResponse,
67+
BrandRetrieveSimplifiedResponse,
68+
BrandSearchResponse,
69+
)
6670
```
6771

6872
Methods:
6973

7074
- <code title="post /brand/retrieve">client.brand.<a href="./src/context/dev/resources/brand.py">retrieve</a>(\*\*<a href="src/context/dev/types/brand_retrieve_params.py">params</a>) -> <a href="./src/context/dev/types/brand_retrieve_response.py">BrandRetrieveResponse</a></code>
7175
- <code title="get /brand/retrieve-simplified">client.brand.<a href="./src/context/dev/resources/brand.py">retrieve_simplified</a>(\*\*<a href="src/context/dev/types/brand_retrieve_simplified_params.py">params</a>) -> <a href="./src/context/dev/types/brand_retrieve_simplified_response.py">BrandRetrieveSimplifiedResponse</a></code>
76+
- <code title="get /brand/search">client.brand.<a href="./src/context/dev/resources/brand.py">search</a>(\*\*<a href="src/context/dev/types/brand_search_params.py">params</a>) -> <a href="./src/context/dev/types/brand_search_response.py">BrandSearchResponse</a></code>
7277

7378
# Industry
7479

‎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 = "2.7.0"
3+
version = "2.8.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__ = "2.7.0" # x-release-please-version
4+
__version__ = "2.8.0" # x-release-please-version

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

Lines changed: 124 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from ..types import brand_retrieve_params, brand_retrieve_simplified_params
10+
from ..types import brand_search_params, brand_retrieve_params, brand_retrieve_simplified_params
1111
from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
1212
from .._utils import required_args, maybe_transform, async_maybe_transform
1313
from .._compat import cached_property
@@ -19,6 +19,7 @@
1919
async_to_streamed_response_wrapper,
2020
)
2121
from .._base_client import make_request_options
22+
from ..types.brand_search_response import BrandSearchResponse
2223
from ..types.brand_retrieve_response import BrandRetrieveResponse
2324
from ..types.brand_retrieve_simplified_response import BrandRetrieveSimplifiedResponse
2425

@@ -1273,6 +1274,61 @@ def retrieve_simplified(
12731274
cast_to=BrandRetrieveSimplifiedResponse,
12741275
)
12751276

1277+
def search(
1278+
self,
1279+
*,
1280+
query: str,
1281+
tags: SequenceNotStr[str] | Omit = omit,
1282+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1283+
# The extra values given here take precedence over values defined on the client or passed to this method.
1284+
extra_headers: Headers | None = None,
1285+
extra_query: Query | None = None,
1286+
extra_body: Body | None = None,
1287+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1288+
) -> BrandSearchResponse:
1289+
"""
1290+
Search brands by name or domain and get back up to 10 lightweight matches
1291+
(domain, name, logo), most popular first: by Tranco rank, then market cap for
1292+
brands outside the Tranco list, with text relevance breaking ties. Matching is
1293+
prefix-based with no typo tolerance, so it is suited to autocomplete. Only
1294+
brands already in the Context.dev index are returned — use /brand/retrieve to
1295+
fetch (and index) a specific domain. Free on Pro and Scale plans; costs 1 credit
1296+
per request on the Free and Starter plans.
1297+
1298+
Args:
1299+
query: Search term, matched against brand names and domains by prefix (e.g. 'nike',
1300+
'nike.com', 'nik').
1301+
1302+
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
1303+
recorded on the request's usage log and can be used to filter usage on the
1304+
dashboard usage page. Up to 20 tags, each 1-50 characters.
1305+
1306+
extra_headers: Send extra headers
1307+
1308+
extra_query: Add additional query parameters to the request
1309+
1310+
extra_body: Add additional JSON properties to the request
1311+
1312+
timeout: Override the client-level default timeout for this request, in seconds
1313+
"""
1314+
return self._get(
1315+
"/brand/search",
1316+
options=make_request_options(
1317+
extra_headers=extra_headers,
1318+
extra_query=extra_query,
1319+
extra_body=extra_body,
1320+
timeout=timeout,
1321+
query=maybe_transform(
1322+
{
1323+
"query": query,
1324+
"tags": tags,
1325+
},
1326+
brand_search_params.BrandSearchParams,
1327+
),
1328+
),
1329+
cast_to=BrandSearchResponse,
1330+
)
1331+
12761332

12771333
class AsyncBrandResource(AsyncAPIResource):
12781334
@cached_property
@@ -2522,6 +2578,61 @@ async def retrieve_simplified(
25222578
cast_to=BrandRetrieveSimplifiedResponse,
25232579
)
25242580

2581+
async def search(
2582+
self,
2583+
*,
2584+
query: str,
2585+
tags: SequenceNotStr[str] | Omit = omit,
2586+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2587+
# The extra values given here take precedence over values defined on the client or passed to this method.
2588+
extra_headers: Headers | None = None,
2589+
extra_query: Query | None = None,
2590+
extra_body: Body | None = None,
2591+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
2592+
) -> BrandSearchResponse:
2593+
"""
2594+
Search brands by name or domain and get back up to 10 lightweight matches
2595+
(domain, name, logo), most popular first: by Tranco rank, then market cap for
2596+
brands outside the Tranco list, with text relevance breaking ties. Matching is
2597+
prefix-based with no typo tolerance, so it is suited to autocomplete. Only
2598+
brands already in the Context.dev index are returned — use /brand/retrieve to
2599+
fetch (and index) a specific domain. Free on Pro and Scale plans; costs 1 credit
2600+
per request on the Free and Starter plans.
2601+
2602+
Args:
2603+
query: Search term, matched against brand names and domains by prefix (e.g. 'nike',
2604+
'nike.com', 'nik').
2605+
2606+
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
2607+
recorded on the request's usage log and can be used to filter usage on the
2608+
dashboard usage page. Up to 20 tags, each 1-50 characters.
2609+
2610+
extra_headers: Send extra headers
2611+
2612+
extra_query: Add additional query parameters to the request
2613+
2614+
extra_body: Add additional JSON properties to the request
2615+
2616+
timeout: Override the client-level default timeout for this request, in seconds
2617+
"""
2618+
return await self._get(
2619+
"/brand/search",
2620+
options=make_request_options(
2621+
extra_headers=extra_headers,
2622+
extra_query=extra_query,
2623+
extra_body=extra_body,
2624+
timeout=timeout,
2625+
query=await async_maybe_transform(
2626+
{
2627+
"query": query,
2628+
"tags": tags,
2629+
},
2630+
brand_search_params.BrandSearchParams,
2631+
),
2632+
),
2633+
cast_to=BrandSearchResponse,
2634+
)
2635+
25252636

25262637
class BrandResourceWithRawResponse:
25272638
def __init__(self, brand: BrandResource) -> None:
@@ -2533,6 +2644,9 @@ def __init__(self, brand: BrandResource) -> None:
25332644
self.retrieve_simplified = to_raw_response_wrapper(
25342645
brand.retrieve_simplified,
25352646
)
2647+
self.search = to_raw_response_wrapper(
2648+
brand.search,
2649+
)
25362650

25372651

25382652
class AsyncBrandResourceWithRawResponse:
@@ -2545,6 +2659,9 @@ def __init__(self, brand: AsyncBrandResource) -> None:
25452659
self.retrieve_simplified = async_to_raw_response_wrapper(
25462660
brand.retrieve_simplified,
25472661
)
2662+
self.search = async_to_raw_response_wrapper(
2663+
brand.search,
2664+
)
25482665

25492666

25502667
class BrandResourceWithStreamingResponse:
@@ -2557,6 +2674,9 @@ def __init__(self, brand: BrandResource) -> None:
25572674
self.retrieve_simplified = to_streamed_response_wrapper(
25582675
brand.retrieve_simplified,
25592676
)
2677+
self.search = to_streamed_response_wrapper(
2678+
brand.search,
2679+
)
25602680

25612681

25622682
class AsyncBrandResourceWithStreamingResponse:
@@ -2569,3 +2689,6 @@ def __init__(self, brand: AsyncBrandResource) -> None:
25692689
self.retrieve_simplified = async_to_streamed_response_wrapper(
25702690
brand.retrieve_simplified,
25712691
)
2692+
self.search = async_to_streamed_response_wrapper(
2693+
brand.search,
2694+
)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from .web_extract_params import WebExtractParams as WebExtractParams
1313
from .batch_list_response import BatchListResponse as BatchListResponse
1414
from .batch_submit_params import BatchSubmitParams as BatchSubmitParams
15+
from .brand_search_params import BrandSearchParams as BrandSearchParams
1516
from .monitor_list_params import MonitorListParams as MonitorListParams
1617
from .parse_handle_params import ParseHandleParams as ParseHandleParams
1718
from .web_search_response import WebSearchResponse as WebSearchResponse
@@ -20,6 +21,7 @@
2021
from .batch_cancel_response import BatchCancelResponse as BatchCancelResponse
2122
from .batch_submit_response import BatchSubmitResponse as BatchSubmitResponse
2223
from .brand_retrieve_params import BrandRetrieveParams as BrandRetrieveParams
24+
from .brand_search_response import BrandSearchResponse as BrandSearchResponse
2325
from .monitor_create_params import MonitorCreateParams as MonitorCreateParams
2426
from .monitor_list_response import MonitorListResponse as MonitorListResponse
2527
from .monitor_update_params import MonitorUpdateParams as MonitorUpdateParams
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import Required, TypedDict
6+
7+
from .._types import SequenceNotStr
8+
9+
__all__ = ["BrandSearchParams"]
10+
11+
12+
class BrandSearchParams(TypedDict, total=False):
13+
query: Required[str]
14+
"""Search term, matched against brand names and domains by prefix (e.g.
15+
16+
'nike', 'nike.com', 'nik').
17+
"""
18+
19+
tags: SequenceNotStr[str]
20+
"""Optional comma-separated caller-defined tags for tracking this request.
21+
22+
Tags are recorded on the request's usage log and can be used to filter usage on
23+
the dashboard usage page. Up to 20 tags, each 1-50 characters.
24+
"""
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import List, Optional
4+
5+
from .._models import BaseModel
6+
7+
__all__ = ["BrandSearchResponse", "Result", "KeyMetadata"]
8+
9+
10+
class Result(BaseModel):
11+
domain: str
12+
"""The brand's domain."""
13+
14+
logo: str
15+
"""
16+
Logo link URL that serves the brand's logo, generated per request for the
17+
calling organization.
18+
"""
19+
20+
name: str
21+
"""The brand's name. Empty string when unknown."""
22+
23+
24+
class KeyMetadata(BaseModel):
25+
"""Metadata about the API key used for the request.
26+
27+
Included in every response whenever a valid API key is provided, even when the response status is not 200.
28+
"""
29+
30+
credits_consumed: int
31+
"""The number of credits consumed by this request."""
32+
33+
credits_remaining: int
34+
"""The number of credits remaining for your organization after this request."""
35+
36+
37+
class BrandSearchResponse(BaseModel):
38+
results: List[Result]
39+
"""Up to 10 matching brands, most popular first. Empty when nothing matches."""
40+
41+
key_metadata: Optional[KeyMetadata] = None
42+
"""Metadata about the API key used for the request.
43+
44+
Included in every response whenever a valid API key is provided, even when the
45+
response status is not 200.
46+
"""

0 commit comments

Comments
 (0)