Skip to content

Commit 8304083

Browse files
feat(api): manual updates
1 parent 3285d21 commit 8304083

36 files changed

Lines changed: 3099 additions & 2419 deletions

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 20
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-c2e94e0c758b1aaba120c2a4231842fff0a120acc471fe24c7a81221e13a0482.yml
33
openapi_spec_hash: aabc231b46b1ca3375882f96c378c665
4-
config_hash: c6eb5818596f9926ef1225a0c7a855db
4+
config_hash: ab5135cc119f83ae2821f9445ed99d16

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ from context.dev import ContextDev
130130

131131
client = ContextDev()
132132

133-
response = client.brand.ai_query(
133+
response = client.ai.ai_query(
134134
data_to_extract=[
135135
{
136136
"datapoint_description": "datapoint_description",

‎api.md‎

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Types:
44

55
```python
66
from context.dev.types import (
7+
WebScreenshotResponse,
78
WebWebScrapeHTMLResponse,
89
WebWebScrapeImagesResponse,
910
WebWebScrapeMdResponse,
@@ -13,51 +14,86 @@ from context.dev.types import (
1314

1415
Methods:
1516

17+
- <code title="get /brand/screenshot">client.web.<a href="./src/context/dev/resources/web.py">screenshot</a>(\*\*<a href="src/context/dev/types/web_screenshot_params.py">params</a>) -> <a href="./src/context/dev/types/web_screenshot_response.py">WebScreenshotResponse</a></code>
1618
- <code title="get /web/scrape/html">client.web.<a href="./src/context/dev/resources/web.py">web_scrape_html</a>(\*\*<a href="src/context/dev/types/web_web_scrape_html_params.py">params</a>) -> <a href="./src/context/dev/types/web_web_scrape_html_response.py">WebWebScrapeHTMLResponse</a></code>
1719
- <code title="get /web/scrape/images">client.web.<a href="./src/context/dev/resources/web.py">web_scrape_images</a>(\*\*<a href="src/context/dev/types/web_web_scrape_images_params.py">params</a>) -> <a href="./src/context/dev/types/web_web_scrape_images_response.py">WebWebScrapeImagesResponse</a></code>
1820
- <code title="get /web/scrape/markdown">client.web.<a href="./src/context/dev/resources/web.py">web_scrape_md</a>(\*\*<a href="src/context/dev/types/web_web_scrape_md_params.py">params</a>) -> <a href="./src/context/dev/types/web_web_scrape_md_response.py">WebWebScrapeMdResponse</a></code>
1921
- <code title="get /web/scrape/sitemap">client.web.<a href="./src/context/dev/resources/web.py">web_scrape_sitemap</a>(\*\*<a href="src/context/dev/types/web_web_scrape_sitemap_params.py">params</a>) -> <a href="./src/context/dev/types/web_web_scrape_sitemap_response.py">WebWebScrapeSitemapResponse</a></code>
2022

23+
# AI
24+
25+
Types:
26+
27+
```python
28+
from context.dev.types import AIAIQueryResponse, AIExtractProductResponse, AIExtractProductsResponse
29+
```
30+
31+
Methods:
32+
33+
- <code title="post /brand/ai/query">client.ai.<a href="./src/context/dev/resources/ai.py">ai_query</a>(\*\*<a href="src/context/dev/types/ai_ai_query_params.py">params</a>) -> <a href="./src/context/dev/types/ai_ai_query_response.py">AIAIQueryResponse</a></code>
34+
- <code title="post /brand/ai/product">client.ai.<a href="./src/context/dev/resources/ai.py">extract_product</a>(\*\*<a href="src/context/dev/types/ai_extract_product_params.py">params</a>) -> <a href="./src/context/dev/types/ai_extract_product_response.py">AIExtractProductResponse</a></code>
35+
- <code title="post /brand/ai/products">client.ai.<a href="./src/context/dev/resources/ai.py">extract_products</a>(\*\*<a href="src/context/dev/types/ai_extract_products_params.py">params</a>) -> <a href="./src/context/dev/types/ai_extract_products_response.py">AIExtractProductsResponse</a></code>
36+
37+
# Style
38+
39+
Types:
40+
41+
```python
42+
from context.dev.types import StyleExtractFontsResponse, StyleExtractStyleguideResponse
43+
```
44+
45+
Methods:
46+
47+
- <code title="get /brand/fonts">client.style.<a href="./src/context/dev/resources/style.py">extract_fonts</a>(\*\*<a href="src/context/dev/types/style_extract_fonts_params.py">params</a>) -> <a href="./src/context/dev/types/style_extract_fonts_response.py">StyleExtractFontsResponse</a></code>
48+
- <code title="get /brand/styleguide">client.style.<a href="./src/context/dev/resources/style.py">extract_styleguide</a>(\*\*<a href="src/context/dev/types/style_extract_styleguide_params.py">params</a>) -> <a href="./src/context/dev/types/style_extract_styleguide_response.py">StyleExtractStyleguideResponse</a></code>
49+
2150
# Brand
2251

2352
Types:
2453

2554
```python
2655
from context.dev.types import (
2756
BrandRetrieveResponse,
28-
BrandAIProductResponse,
29-
BrandAIProductsResponse,
30-
BrandAIQueryResponse,
31-
BrandFontsResponse,
3257
BrandIdentifyFromTransactionResponse,
33-
BrandPrefetchResponse,
34-
BrandPrefetchByEmailResponse,
3558
BrandRetrieveByEmailResponse,
3659
BrandRetrieveByIsinResponse,
3760
BrandRetrieveByNameResponse,
3861
BrandRetrieveByTickerResponse,
39-
BrandRetrieveNaicsResponse,
4062
BrandRetrieveSimplifiedResponse,
41-
BrandScreenshotResponse,
42-
BrandStyleguideResponse,
4363
)
4464
```
4565

4666
Methods:
4767

4868
- <code title="get /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>
49-
- <code title="post /brand/ai/product">client.brand.<a href="./src/context/dev/resources/brand.py">ai_product</a>(\*\*<a href="src/context/dev/types/brand_ai_product_params.py">params</a>) -> <a href="./src/context/dev/types/brand_ai_product_response.py">BrandAIProductResponse</a></code>
50-
- <code title="post /brand/ai/products">client.brand.<a href="./src/context/dev/resources/brand.py">ai_products</a>(\*\*<a href="src/context/dev/types/brand_ai_products_params.py">params</a>) -> <a href="./src/context/dev/types/brand_ai_products_response.py">BrandAIProductsResponse</a></code>
51-
- <code title="post /brand/ai/query">client.brand.<a href="./src/context/dev/resources/brand.py">ai_query</a>(\*\*<a href="src/context/dev/types/brand_ai_query_params.py">params</a>) -> <a href="./src/context/dev/types/brand_ai_query_response.py">BrandAIQueryResponse</a></code>
52-
- <code title="get /brand/fonts">client.brand.<a href="./src/context/dev/resources/brand.py">fonts</a>(\*\*<a href="src/context/dev/types/brand_fonts_params.py">params</a>) -> <a href="./src/context/dev/types/brand_fonts_response.py">BrandFontsResponse</a></code>
5369
- <code title="get /brand/transaction_identifier">client.brand.<a href="./src/context/dev/resources/brand.py">identify_from_transaction</a>(\*\*<a href="src/context/dev/types/brand_identify_from_transaction_params.py">params</a>) -> <a href="./src/context/dev/types/brand_identify_from_transaction_response.py">BrandIdentifyFromTransactionResponse</a></code>
54-
- <code title="post /brand/prefetch">client.brand.<a href="./src/context/dev/resources/brand.py">prefetch</a>(\*\*<a href="src/context/dev/types/brand_prefetch_params.py">params</a>) -> <a href="./src/context/dev/types/brand_prefetch_response.py">BrandPrefetchResponse</a></code>
55-
- <code title="post /brand/prefetch-by-email">client.brand.<a href="./src/context/dev/resources/brand.py">prefetch_by_email</a>(\*\*<a href="src/context/dev/types/brand_prefetch_by_email_params.py">params</a>) -> <a href="./src/context/dev/types/brand_prefetch_by_email_response.py">BrandPrefetchByEmailResponse</a></code>
5670
- <code title="get /brand/retrieve-by-email">client.brand.<a href="./src/context/dev/resources/brand.py">retrieve_by_email</a>(\*\*<a href="src/context/dev/types/brand_retrieve_by_email_params.py">params</a>) -> <a href="./src/context/dev/types/brand_retrieve_by_email_response.py">BrandRetrieveByEmailResponse</a></code>
5771
- <code title="get /brand/retrieve-by-isin">client.brand.<a href="./src/context/dev/resources/brand.py">retrieve_by_isin</a>(\*\*<a href="src/context/dev/types/brand_retrieve_by_isin_params.py">params</a>) -> <a href="./src/context/dev/types/brand_retrieve_by_isin_response.py">BrandRetrieveByIsinResponse</a></code>
5872
- <code title="get /brand/retrieve-by-name">client.brand.<a href="./src/context/dev/resources/brand.py">retrieve_by_name</a>(\*\*<a href="src/context/dev/types/brand_retrieve_by_name_params.py">params</a>) -> <a href="./src/context/dev/types/brand_retrieve_by_name_response.py">BrandRetrieveByNameResponse</a></code>
5973
- <code title="get /brand/retrieve-by-ticker">client.brand.<a href="./src/context/dev/resources/brand.py">retrieve_by_ticker</a>(\*\*<a href="src/context/dev/types/brand_retrieve_by_ticker_params.py">params</a>) -> <a href="./src/context/dev/types/brand_retrieve_by_ticker_response.py">BrandRetrieveByTickerResponse</a></code>
60-
- <code title="get /brand/naics">client.brand.<a href="./src/context/dev/resources/brand.py">retrieve_naics</a>(\*\*<a href="src/context/dev/types/brand_retrieve_naics_params.py">params</a>) -> <a href="./src/context/dev/types/brand_retrieve_naics_response.py">BrandRetrieveNaicsResponse</a></code>
6174
- <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>
62-
- <code title="get /brand/screenshot">client.brand.<a href="./src/context/dev/resources/brand.py">screenshot</a>(\*\*<a href="src/context/dev/types/brand_screenshot_params.py">params</a>) -> <a href="./src/context/dev/types/brand_screenshot_response.py">BrandScreenshotResponse</a></code>
63-
- <code title="get /brand/styleguide">client.brand.<a href="./src/context/dev/resources/brand.py">styleguide</a>(\*\*<a href="src/context/dev/types/brand_styleguide_params.py">params</a>) -> <a href="./src/context/dev/types/brand_styleguide_response.py">BrandStyleguideResponse</a></code>
75+
76+
# Industry
77+
78+
Types:
79+
80+
```python
81+
from context.dev.types import IndustryRetrieveNaicsResponse
82+
```
83+
84+
Methods:
85+
86+
- <code title="get /brand/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>
87+
88+
# Utility
89+
90+
Types:
91+
92+
```python
93+
from context.dev.types import UtilityPrefetchResponse, UtilityPrefetchByEmailResponse
94+
```
95+
96+
Methods:
97+
98+
- <code title="post /brand/prefetch">client.utility.<a href="./src/context/dev/resources/utility.py">prefetch</a>(\*\*<a href="src/context/dev/types/utility_prefetch_params.py">params</a>) -> <a href="./src/context/dev/types/utility_prefetch_response.py">UtilityPrefetchResponse</a></code>
99+
- <code title="post /brand/prefetch-by-email">client.utility.<a href="./src/context/dev/resources/utility.py">prefetch_by_email</a>(\*\*<a href="src/context/dev/types/utility_prefetch_by_email_params.py">params</a>) -> <a href="./src/context/dev/types/utility_prefetch_by_email_response.py">UtilityPrefetchByEmailResponse</a></code>

‎src/context/dev/_client.py‎

Lines changed: 149 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@
3131
)
3232

3333
if TYPE_CHECKING:
34-
from .resources import web, brand
34+
from .resources import ai, web, brand, style, utility, industry
35+
from .resources.ai import AIResource, AsyncAIResource
3536
from .resources.web import WebResource, AsyncWebResource
3637
from .resources.brand import BrandResource, AsyncBrandResource
38+
from .resources.style import StyleResource, AsyncStyleResource
39+
from .resources.utility import UtilityResource, AsyncUtilityResource
40+
from .resources.industry import IndustryResource, AsyncIndustryResource
3741

3842
__all__ = [
3943
"Timeout",
@@ -108,12 +112,36 @@ def web(self) -> WebResource:
108112

109113
return WebResource(self)
110114

115+
@cached_property
116+
def ai(self) -> AIResource:
117+
from .resources.ai import AIResource
118+
119+
return AIResource(self)
120+
121+
@cached_property
122+
def style(self) -> StyleResource:
123+
from .resources.style import StyleResource
124+
125+
return StyleResource(self)
126+
111127
@cached_property
112128
def brand(self) -> BrandResource:
113129
from .resources.brand import BrandResource
114130

115131
return BrandResource(self)
116132

133+
@cached_property
134+
def industry(self) -> IndustryResource:
135+
from .resources.industry import IndustryResource
136+
137+
return IndustryResource(self)
138+
139+
@cached_property
140+
def utility(self) -> UtilityResource:
141+
from .resources.utility import UtilityResource
142+
143+
return UtilityResource(self)
144+
117145
@cached_property
118146
def with_raw_response(self) -> ContextDevWithRawResponse:
119147
return ContextDevWithRawResponse(self)
@@ -288,12 +316,36 @@ def web(self) -> AsyncWebResource:
288316

289317
return AsyncWebResource(self)
290318

319+
@cached_property
320+
def ai(self) -> AsyncAIResource:
321+
from .resources.ai import AsyncAIResource
322+
323+
return AsyncAIResource(self)
324+
325+
@cached_property
326+
def style(self) -> AsyncStyleResource:
327+
from .resources.style import AsyncStyleResource
328+
329+
return AsyncStyleResource(self)
330+
291331
@cached_property
292332
def brand(self) -> AsyncBrandResource:
293333
from .resources.brand import AsyncBrandResource
294334

295335
return AsyncBrandResource(self)
296336

337+
@cached_property
338+
def industry(self) -> AsyncIndustryResource:
339+
from .resources.industry import AsyncIndustryResource
340+
341+
return AsyncIndustryResource(self)
342+
343+
@cached_property
344+
def utility(self) -> AsyncUtilityResource:
345+
from .resources.utility import AsyncUtilityResource
346+
347+
return AsyncUtilityResource(self)
348+
297349
@cached_property
298350
def with_raw_response(self) -> AsyncContextDevWithRawResponse:
299351
return AsyncContextDevWithRawResponse(self)
@@ -419,12 +471,36 @@ def web(self) -> web.WebResourceWithRawResponse:
419471

420472
return WebResourceWithRawResponse(self._client.web)
421473

474+
@cached_property
475+
def ai(self) -> ai.AIResourceWithRawResponse:
476+
from .resources.ai import AIResourceWithRawResponse
477+
478+
return AIResourceWithRawResponse(self._client.ai)
479+
480+
@cached_property
481+
def style(self) -> style.StyleResourceWithRawResponse:
482+
from .resources.style import StyleResourceWithRawResponse
483+
484+
return StyleResourceWithRawResponse(self._client.style)
485+
422486
@cached_property
423487
def brand(self) -> brand.BrandResourceWithRawResponse:
424488
from .resources.brand import BrandResourceWithRawResponse
425489

426490
return BrandResourceWithRawResponse(self._client.brand)
427491

492+
@cached_property
493+
def industry(self) -> industry.IndustryResourceWithRawResponse:
494+
from .resources.industry import IndustryResourceWithRawResponse
495+
496+
return IndustryResourceWithRawResponse(self._client.industry)
497+
498+
@cached_property
499+
def utility(self) -> utility.UtilityResourceWithRawResponse:
500+
from .resources.utility import UtilityResourceWithRawResponse
501+
502+
return UtilityResourceWithRawResponse(self._client.utility)
503+
428504

429505
class AsyncContextDevWithRawResponse:
430506
_client: AsyncContextDev
@@ -438,12 +514,36 @@ def web(self) -> web.AsyncWebResourceWithRawResponse:
438514

439515
return AsyncWebResourceWithRawResponse(self._client.web)
440516

517+
@cached_property
518+
def ai(self) -> ai.AsyncAIResourceWithRawResponse:
519+
from .resources.ai import AsyncAIResourceWithRawResponse
520+
521+
return AsyncAIResourceWithRawResponse(self._client.ai)
522+
523+
@cached_property
524+
def style(self) -> style.AsyncStyleResourceWithRawResponse:
525+
from .resources.style import AsyncStyleResourceWithRawResponse
526+
527+
return AsyncStyleResourceWithRawResponse(self._client.style)
528+
441529
@cached_property
442530
def brand(self) -> brand.AsyncBrandResourceWithRawResponse:
443531
from .resources.brand import AsyncBrandResourceWithRawResponse
444532

445533
return AsyncBrandResourceWithRawResponse(self._client.brand)
446534

535+
@cached_property
536+
def industry(self) -> industry.AsyncIndustryResourceWithRawResponse:
537+
from .resources.industry import AsyncIndustryResourceWithRawResponse
538+
539+
return AsyncIndustryResourceWithRawResponse(self._client.industry)
540+
541+
@cached_property
542+
def utility(self) -> utility.AsyncUtilityResourceWithRawResponse:
543+
from .resources.utility import AsyncUtilityResourceWithRawResponse
544+
545+
return AsyncUtilityResourceWithRawResponse(self._client.utility)
546+
447547

448548
class ContextDevWithStreamedResponse:
449549
_client: ContextDev
@@ -457,12 +557,36 @@ def web(self) -> web.WebResourceWithStreamingResponse:
457557

458558
return WebResourceWithStreamingResponse(self._client.web)
459559

560+
@cached_property
561+
def ai(self) -> ai.AIResourceWithStreamingResponse:
562+
from .resources.ai import AIResourceWithStreamingResponse
563+
564+
return AIResourceWithStreamingResponse(self._client.ai)
565+
566+
@cached_property
567+
def style(self) -> style.StyleResourceWithStreamingResponse:
568+
from .resources.style import StyleResourceWithStreamingResponse
569+
570+
return StyleResourceWithStreamingResponse(self._client.style)
571+
460572
@cached_property
461573
def brand(self) -> brand.BrandResourceWithStreamingResponse:
462574
from .resources.brand import BrandResourceWithStreamingResponse
463575

464576
return BrandResourceWithStreamingResponse(self._client.brand)
465577

578+
@cached_property
579+
def industry(self) -> industry.IndustryResourceWithStreamingResponse:
580+
from .resources.industry import IndustryResourceWithStreamingResponse
581+
582+
return IndustryResourceWithStreamingResponse(self._client.industry)
583+
584+
@cached_property
585+
def utility(self) -> utility.UtilityResourceWithStreamingResponse:
586+
from .resources.utility import UtilityResourceWithStreamingResponse
587+
588+
return UtilityResourceWithStreamingResponse(self._client.utility)
589+
466590

467591
class AsyncContextDevWithStreamedResponse:
468592
_client: AsyncContextDev
@@ -476,12 +600,36 @@ def web(self) -> web.AsyncWebResourceWithStreamingResponse:
476600

477601
return AsyncWebResourceWithStreamingResponse(self._client.web)
478602

603+
@cached_property
604+
def ai(self) -> ai.AsyncAIResourceWithStreamingResponse:
605+
from .resources.ai import AsyncAIResourceWithStreamingResponse
606+
607+
return AsyncAIResourceWithStreamingResponse(self._client.ai)
608+
609+
@cached_property
610+
def style(self) -> style.AsyncStyleResourceWithStreamingResponse:
611+
from .resources.style import AsyncStyleResourceWithStreamingResponse
612+
613+
return AsyncStyleResourceWithStreamingResponse(self._client.style)
614+
479615
@cached_property
480616
def brand(self) -> brand.AsyncBrandResourceWithStreamingResponse:
481617
from .resources.brand import AsyncBrandResourceWithStreamingResponse
482618

483619
return AsyncBrandResourceWithStreamingResponse(self._client.brand)
484620

621+
@cached_property
622+
def industry(self) -> industry.AsyncIndustryResourceWithStreamingResponse:
623+
from .resources.industry import AsyncIndustryResourceWithStreamingResponse
624+
625+
return AsyncIndustryResourceWithStreamingResponse(self._client.industry)
626+
627+
@cached_property
628+
def utility(self) -> utility.AsyncUtilityResourceWithStreamingResponse:
629+
from .resources.utility import AsyncUtilityResourceWithStreamingResponse
630+
631+
return AsyncUtilityResourceWithStreamingResponse(self._client.utility)
632+
485633

486634
Client = ContextDev
487635

0 commit comments

Comments
 (0)