|
35 | 35 | ) |
36 | 36 |
|
37 | 37 | if TYPE_CHECKING: |
38 | | - from .resources import ai, web, brand, utility, industry, monitors |
| 38 | + from .resources import ai, web, brand, parse, utility, industry, monitors |
39 | 39 | from .resources.ai import AIResource, AsyncAIResource |
40 | 40 | from .resources.web import WebResource, AsyncWebResource |
41 | 41 | from .resources.brand import BrandResource, AsyncBrandResource |
| 42 | + from .resources.parse import ParseResource, AsyncParseResource |
42 | 43 | from .resources.utility import UtilityResource, AsyncUtilityResource |
43 | 44 | from .resources.industry import IndustryResource, AsyncIndustryResource |
44 | 45 | from .resources.monitors import MonitorsResource, AsyncMonitorsResource |
@@ -119,6 +120,12 @@ def __init__( |
119 | 120 | _strict_response_validation=_strict_response_validation, |
120 | 121 | ) |
121 | 122 |
|
| 123 | + @cached_property |
| 124 | + def parse(self) -> ParseResource: |
| 125 | + from .resources.parse import ParseResource |
| 126 | + |
| 127 | + return ParseResource(self) |
| 128 | + |
122 | 129 | @cached_property |
123 | 130 | def web(self) -> WebResource: |
124 | 131 | from .resources.web import WebResource |
@@ -335,6 +342,12 @@ def __init__( |
335 | 342 | _strict_response_validation=_strict_response_validation, |
336 | 343 | ) |
337 | 344 |
|
| 345 | + @cached_property |
| 346 | + def parse(self) -> AsyncParseResource: |
| 347 | + from .resources.parse import AsyncParseResource |
| 348 | + |
| 349 | + return AsyncParseResource(self) |
| 350 | + |
338 | 351 | @cached_property |
339 | 352 | def web(self) -> AsyncWebResource: |
340 | 353 | from .resources.web import AsyncWebResource |
@@ -493,6 +506,12 @@ class ContextDevWithRawResponse: |
493 | 506 | def __init__(self, client: ContextDev) -> None: |
494 | 507 | self._client = client |
495 | 508 |
|
| 509 | + @cached_property |
| 510 | + def parse(self) -> parse.ParseResourceWithRawResponse: |
| 511 | + from .resources.parse import ParseResourceWithRawResponse |
| 512 | + |
| 513 | + return ParseResourceWithRawResponse(self._client.parse) |
| 514 | + |
496 | 515 | @cached_property |
497 | 516 | def web(self) -> web.WebResourceWithRawResponse: |
498 | 517 | from .resources.web import WebResourceWithRawResponse |
@@ -539,6 +558,12 @@ class AsyncContextDevWithRawResponse: |
539 | 558 | def __init__(self, client: AsyncContextDev) -> None: |
540 | 559 | self._client = client |
541 | 560 |
|
| 561 | + @cached_property |
| 562 | + def parse(self) -> parse.AsyncParseResourceWithRawResponse: |
| 563 | + from .resources.parse import AsyncParseResourceWithRawResponse |
| 564 | + |
| 565 | + return AsyncParseResourceWithRawResponse(self._client.parse) |
| 566 | + |
542 | 567 | @cached_property |
543 | 568 | def web(self) -> web.AsyncWebResourceWithRawResponse: |
544 | 569 | from .resources.web import AsyncWebResourceWithRawResponse |
@@ -585,6 +610,12 @@ class ContextDevWithStreamedResponse: |
585 | 610 | def __init__(self, client: ContextDev) -> None: |
586 | 611 | self._client = client |
587 | 612 |
|
| 613 | + @cached_property |
| 614 | + def parse(self) -> parse.ParseResourceWithStreamingResponse: |
| 615 | + from .resources.parse import ParseResourceWithStreamingResponse |
| 616 | + |
| 617 | + return ParseResourceWithStreamingResponse(self._client.parse) |
| 618 | + |
588 | 619 | @cached_property |
589 | 620 | def web(self) -> web.WebResourceWithStreamingResponse: |
590 | 621 | from .resources.web import WebResourceWithStreamingResponse |
@@ -631,6 +662,12 @@ class AsyncContextDevWithStreamedResponse: |
631 | 662 | def __init__(self, client: AsyncContextDev) -> None: |
632 | 663 | self._client = client |
633 | 664 |
|
| 665 | + @cached_property |
| 666 | + def parse(self) -> parse.AsyncParseResourceWithStreamingResponse: |
| 667 | + from .resources.parse import AsyncParseResourceWithStreamingResponse |
| 668 | + |
| 669 | + return AsyncParseResourceWithStreamingResponse(self._client.parse) |
| 670 | + |
634 | 671 | @cached_property |
635 | 672 | def web(self) -> web.AsyncWebResourceWithStreamingResponse: |
636 | 673 | from .resources.web import AsyncWebResourceWithStreamingResponse |
|
0 commit comments