Skip to content

Commit 6c60704

Browse files
authored
Merge pull request #14 from context-dot-dev/release-please--branches--main--changes--next
release: 0.12.0
2 parents 9e992b8 + 950f91a commit 6c60704

11 files changed

Lines changed: 363 additions & 10 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-
".": "0.11.0"
2+
".": "0.12.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: 21
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-18bb184b75673248917773c4c074813ca4bd966458b2f039b937df63209c029d.yml
3-
openapi_spec_hash: ef79dd2063dd500127748ee843f5e783
4-
config_hash: 7d13dca2b2c6f71fc463cb6062efa5ea
1+
configured_endpoints: 22
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-a831ece9950c336fba69327e01aed391a08418e1898f4aff27a800471f139cc7.yml
3+
openapi_spec_hash: 459258410b739536cdc75b91e8b4eac7
4+
config_hash: 70354330f92ce169beabc98696ebb9a3

‎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.12.0 (2026-04-25)
4+
5+
Full Changelog: [v0.11.0...v0.12.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.11.0...v0.12.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([985bdda](https://github.com/context-dot-dev/context-python-sdk/commit/985bdda494fb493203a3b1db746c5c00c63199d1))
10+
311
## 0.11.0 (2026-04-24)
412

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

‎api.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,13 @@ Methods:
7171
Types:
7272

7373
```python
74-
from context.dev.types import IndustryRetrieveNaicsResponse
74+
from context.dev.types import IndustryRetrieveNaicsResponse, IndustryRetrieveSicResponse
7575
```
7676

7777
Methods:
7878

7979
- <code title="get /web/naics">client.industry.<a href="./src/context/dev/resources/industry.py">retrieve_naics</a>(\*\*<a href="src/context/dev/types/industry_retrieve_naics_params.py">params</a>) -> <a href="./src/context/dev/types/industry_retrieve_naics_response.py">IndustryRetrieveNaicsResponse</a></code>
80+
- <code title="get /web/sic">client.industry.<a href="./src/context/dev/resources/industry.py">retrieve_sic</a>(\*\*<a href="src/context/dev/types/industry_retrieve_sic_params.py">params</a>) -> <a href="./src/context/dev/types/industry_retrieve_sic_response.py">IndustryRetrieveSicResponse</a></code>
8081

8182
# Utility
8283

‎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.11.0"
3+
version = "0.12.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.11.0" # x-release-please-version
4+
__version__ = "0.12.0" # x-release-please-version

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

Lines changed: 148 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
from __future__ import annotations
44

5+
from typing_extensions import Literal
6+
57
import httpx
68

7-
from ..types import industry_retrieve_naics_params
9+
from ..types import industry_retrieve_sic_params, industry_retrieve_naics_params
810
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
911
from .._utils import maybe_transform, async_maybe_transform
1012
from .._compat import cached_property
@@ -16,6 +18,7 @@
1618
async_to_streamed_response_wrapper,
1719
)
1820
from .._base_client import make_request_options
21+
from ..types.industry_retrieve_sic_response import IndustryRetrieveSicResponse
1922
from ..types.industry_retrieve_naics_response import IndustryRetrieveNaicsResponse
2023

2124
__all__ = ["IndustryResource", "AsyncIndustryResource"]
@@ -100,6 +103,72 @@ def retrieve_naics(
100103
cast_to=IndustryRetrieveNaicsResponse,
101104
)
102105

106+
def retrieve_sic(
107+
self,
108+
*,
109+
input: str,
110+
max_results: int | Omit = omit,
111+
min_results: int | Omit = omit,
112+
timeout_ms: int | Omit = omit,
113+
type: Literal["original_sic", "latest_sec"] | Omit = omit,
114+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
115+
# The extra values given here take precedence over values defined on the client or passed to this method.
116+
extra_headers: Headers | None = None,
117+
extra_query: Query | None = None,
118+
extra_body: Body | None = None,
119+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
120+
) -> IndustryRetrieveSicResponse:
121+
"""
122+
Classify any brand into Standard Industrial Classification (SIC) codes from its
123+
domain or name. Choose between the original 1987 SIC system (`original_sic`) or
124+
the latest SIC list maintained by the SEC (`latest_sec`).
125+
126+
Args:
127+
input: Brand domain or title to retrieve SIC code for. If a valid domain is provided,
128+
it will be used for classification, otherwise, we will search for the brand
129+
using the provided title.
130+
131+
max_results: Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
132+
133+
min_results: Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
134+
135+
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
136+
than this value, it will be aborted with a 408 status code. Maximum allowed
137+
value is 300000ms (5 minutes).
138+
139+
type: Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
140+
Industrial Classification system; `latest_sec` uses the current SIC list as
141+
published by the SEC. Defaults to `original_sic`.
142+
143+
extra_headers: Send extra headers
144+
145+
extra_query: Add additional query parameters to the request
146+
147+
extra_body: Add additional JSON properties to the request
148+
149+
timeout: Override the client-level default timeout for this request, in seconds
150+
"""
151+
return self._get(
152+
"/web/sic",
153+
options=make_request_options(
154+
extra_headers=extra_headers,
155+
extra_query=extra_query,
156+
extra_body=extra_body,
157+
timeout=timeout,
158+
query=maybe_transform(
159+
{
160+
"input": input,
161+
"max_results": max_results,
162+
"min_results": min_results,
163+
"timeout_ms": timeout_ms,
164+
"type": type,
165+
},
166+
industry_retrieve_sic_params.IndustryRetrieveSicParams,
167+
),
168+
),
169+
cast_to=IndustryRetrieveSicResponse,
170+
)
171+
103172

104173
class AsyncIndustryResource(AsyncAPIResource):
105174
@cached_property
@@ -180,6 +249,72 @@ async def retrieve_naics(
180249
cast_to=IndustryRetrieveNaicsResponse,
181250
)
182251

252+
async def retrieve_sic(
253+
self,
254+
*,
255+
input: str,
256+
max_results: int | Omit = omit,
257+
min_results: int | Omit = omit,
258+
timeout_ms: int | Omit = omit,
259+
type: Literal["original_sic", "latest_sec"] | Omit = omit,
260+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
261+
# The extra values given here take precedence over values defined on the client or passed to this method.
262+
extra_headers: Headers | None = None,
263+
extra_query: Query | None = None,
264+
extra_body: Body | None = None,
265+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
266+
) -> IndustryRetrieveSicResponse:
267+
"""
268+
Classify any brand into Standard Industrial Classification (SIC) codes from its
269+
domain or name. Choose between the original 1987 SIC system (`original_sic`) or
270+
the latest SIC list maintained by the SEC (`latest_sec`).
271+
272+
Args:
273+
input: Brand domain or title to retrieve SIC code for. If a valid domain is provided,
274+
it will be used for classification, otherwise, we will search for the brand
275+
using the provided title.
276+
277+
max_results: Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5.
278+
279+
min_results: Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
280+
281+
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
282+
than this value, it will be aborted with a 408 status code. Maximum allowed
283+
value is 300000ms (5 minutes).
284+
285+
type: Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
286+
Industrial Classification system; `latest_sec` uses the current SIC list as
287+
published by the SEC. Defaults to `original_sic`.
288+
289+
extra_headers: Send extra headers
290+
291+
extra_query: Add additional query parameters to the request
292+
293+
extra_body: Add additional JSON properties to the request
294+
295+
timeout: Override the client-level default timeout for this request, in seconds
296+
"""
297+
return await self._get(
298+
"/web/sic",
299+
options=make_request_options(
300+
extra_headers=extra_headers,
301+
extra_query=extra_query,
302+
extra_body=extra_body,
303+
timeout=timeout,
304+
query=await async_maybe_transform(
305+
{
306+
"input": input,
307+
"max_results": max_results,
308+
"min_results": min_results,
309+
"timeout_ms": timeout_ms,
310+
"type": type,
311+
},
312+
industry_retrieve_sic_params.IndustryRetrieveSicParams,
313+
),
314+
),
315+
cast_to=IndustryRetrieveSicResponse,
316+
)
317+
183318

184319
class IndustryResourceWithRawResponse:
185320
def __init__(self, industry: IndustryResource) -> None:
@@ -188,6 +323,9 @@ def __init__(self, industry: IndustryResource) -> None:
188323
self.retrieve_naics = to_raw_response_wrapper(
189324
industry.retrieve_naics,
190325
)
326+
self.retrieve_sic = to_raw_response_wrapper(
327+
industry.retrieve_sic,
328+
)
191329

192330

193331
class AsyncIndustryResourceWithRawResponse:
@@ -197,6 +335,9 @@ def __init__(self, industry: AsyncIndustryResource) -> None:
197335
self.retrieve_naics = async_to_raw_response_wrapper(
198336
industry.retrieve_naics,
199337
)
338+
self.retrieve_sic = async_to_raw_response_wrapper(
339+
industry.retrieve_sic,
340+
)
200341

201342

202343
class IndustryResourceWithStreamingResponse:
@@ -206,6 +347,9 @@ def __init__(self, industry: IndustryResource) -> None:
206347
self.retrieve_naics = to_streamed_response_wrapper(
207348
industry.retrieve_naics,
208349
)
350+
self.retrieve_sic = to_streamed_response_wrapper(
351+
industry.retrieve_sic,
352+
)
209353

210354

211355
class AsyncIndustryResourceWithStreamingResponse:
@@ -215,3 +359,6 @@ def __init__(self, industry: AsyncIndustryResource) -> None:
215359
self.retrieve_naics = async_to_streamed_response_wrapper(
216360
industry.retrieve_naics,
217361
)
362+
self.retrieve_sic = async_to_streamed_response_wrapper(
363+
industry.retrieve_sic,
364+
)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .web_web_scrape_md_response import WebWebScrapeMdResponse as WebWebScrapeMdResponse
2222
from .ai_extract_product_response import AIExtractProductResponse as AIExtractProductResponse
2323
from .ai_extract_products_response import AIExtractProductsResponse as AIExtractProductsResponse
24+
from .industry_retrieve_sic_params import IndustryRetrieveSicParams as IndustryRetrieveSicParams
2425
from .web_web_scrape_html_response import WebWebScrapeHTMLResponse as WebWebScrapeHTMLResponse
2526
from .web_web_scrape_images_params import WebWebScrapeImagesParams as WebWebScrapeImagesParams
2627
from .brand_retrieve_by_isin_params import BrandRetrieveByIsinParams as BrandRetrieveByIsinParams
@@ -29,6 +30,7 @@
2930
from .web_web_scrape_sitemap_params import WebWebScrapeSitemapParams as WebWebScrapeSitemapParams
3031
from .brand_retrieve_by_email_params import BrandRetrieveByEmailParams as BrandRetrieveByEmailParams
3132
from .industry_retrieve_naics_params import IndustryRetrieveNaicsParams as IndustryRetrieveNaicsParams
33+
from .industry_retrieve_sic_response import IndustryRetrieveSicResponse as IndustryRetrieveSicResponse
3234
from .web_web_scrape_images_response import WebWebScrapeImagesResponse as WebWebScrapeImagesResponse
3335
from .brand_retrieve_by_isin_response import BrandRetrieveByIsinResponse as BrandRetrieveByIsinResponse
3436
from .brand_retrieve_by_name_response import BrandRetrieveByNameResponse as BrandRetrieveByNameResponse
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 Literal, Required, Annotated, TypedDict
6+
7+
from .._utils import PropertyInfo
8+
9+
__all__ = ["IndustryRetrieveSicParams"]
10+
11+
12+
class IndustryRetrieveSicParams(TypedDict, total=False):
13+
input: Required[str]
14+
"""Brand domain or title to retrieve SIC code for.
15+
16+
If a valid domain is provided, it will be used for classification, otherwise, we
17+
will search for the brand using the provided title.
18+
"""
19+
20+
max_results: Annotated[int, PropertyInfo(alias="maxResults")]
21+
"""Maximum number of SIC codes to return. Must be between 1 and 10. Defaults to 5."""
22+
23+
min_results: Annotated[int, PropertyInfo(alias="minResults")]
24+
"""Minimum number of SIC codes to return. Must be at least 1. Defaults to 1."""
25+
26+
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
27+
"""Optional timeout in milliseconds for the request.
28+
29+
If the request takes longer than this value, it will be aborted with a 408
30+
status code. Maximum allowed value is 300000ms (5 minutes).
31+
"""
32+
33+
type: Literal["original_sic", "latest_sec"]
34+
"""Which SIC dataset to classify against.
35+
36+
`original_sic` uses the 1987 Standard Industrial Classification system;
37+
`latest_sec` uses the current SIC list as published by the SEC. Defaults to
38+
`original_sic`.
39+
"""
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import List, Optional
4+
from typing_extensions import Literal
5+
6+
from pydantic import Field as FieldInfo
7+
8+
from .._models import BaseModel
9+
10+
__all__ = ["IndustryRetrieveSicResponse", "Code"]
11+
12+
13+
class Code(BaseModel):
14+
code: str
15+
"""SIC code (4-digit)."""
16+
17+
confidence: Literal["high", "medium", "low"]
18+
"""Confidence level for how well this SIC code matches the company description."""
19+
20+
name: str
21+
"""SIC industry title."""
22+
23+
major_group: Optional[str] = FieldInfo(alias="majorGroup", default=None)
24+
"""2-digit major group identifier (the leading two digits of the code).
25+
26+
Only present when `classification` is `original_sic`.
27+
"""
28+
29+
major_group_name: Optional[str] = FieldInfo(alias="majorGroupName", default=None)
30+
"""Description of the 2-digit major group.
31+
32+
Only present when `classification` is `original_sic`.
33+
"""
34+
35+
office: Optional[str] = None
36+
"""SEC review office responsible for filings under this code.
37+
38+
Only present when `classification` is `latest_sec`.
39+
"""
40+
41+
42+
class IndustryRetrieveSicResponse(BaseModel):
43+
classification: Optional[Literal["original_sic", "latest_sec"]] = None
44+
"""Echoes back which SIC dataset was used to classify the brand."""
45+
46+
codes: Optional[List[Code]] = None
47+
"""Array of SIC codes with confidence scores.
48+
49+
Extra fields depend on the requested classification: `original_sic` results
50+
include `majorGroup` and `majorGroupName`; `latest_sec` results include
51+
`office`.
52+
"""
53+
54+
domain: Optional[str] = None
55+
"""Domain found for the brand"""
56+
57+
status: Optional[str] = None
58+
"""Status of the response, e.g., 'ok'"""
59+
60+
type: Optional[str] = None
61+
"""Industry classification type, for sic api it will be `sic`"""

0 commit comments

Comments
 (0)