casedev 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. casedev/__init__.py +104 -0
  2. casedev/_base_client.py +1995 -0
  3. casedev/_client.py +560 -0
  4. casedev/_compat.py +219 -0
  5. casedev/_constants.py +14 -0
  6. casedev/_exceptions.py +108 -0
  7. casedev/_files.py +123 -0
  8. casedev/_models.py +857 -0
  9. casedev/_qs.py +150 -0
  10. casedev/_resource.py +43 -0
  11. casedev/_response.py +830 -0
  12. casedev/_streaming.py +333 -0
  13. casedev/_types.py +260 -0
  14. casedev/_utils/__init__.py +64 -0
  15. casedev/_utils/_compat.py +45 -0
  16. casedev/_utils/_datetime_parse.py +136 -0
  17. casedev/_utils/_logs.py +25 -0
  18. casedev/_utils/_proxy.py +65 -0
  19. casedev/_utils/_reflection.py +42 -0
  20. casedev/_utils/_resources_proxy.py +24 -0
  21. casedev/_utils/_streams.py +12 -0
  22. casedev/_utils/_sync.py +58 -0
  23. casedev/_utils/_transform.py +457 -0
  24. casedev/_utils/_typing.py +156 -0
  25. casedev/_utils/_utils.py +421 -0
  26. casedev/_version.py +4 -0
  27. casedev/lib/.keep +4 -0
  28. casedev/py.typed +0 -0
  29. casedev/resources/__init__.py +173 -0
  30. casedev/resources/actions/__init__.py +33 -0
  31. casedev/resources/actions/actions.py +102 -0
  32. casedev/resources/actions/v1.py +640 -0
  33. casedev/resources/compute/__init__.py +33 -0
  34. casedev/resources/compute/compute.py +102 -0
  35. casedev/resources/compute/v1/__init__.py +89 -0
  36. casedev/resources/compute/v1/environments.py +492 -0
  37. casedev/resources/compute/v1/functions.py +278 -0
  38. casedev/resources/compute/v1/invoke.py +216 -0
  39. casedev/resources/compute/v1/runs.py +290 -0
  40. casedev/resources/compute/v1/secrets.py +655 -0
  41. casedev/resources/compute/v1/v1.py +583 -0
  42. casedev/resources/convert/__init__.py +33 -0
  43. casedev/resources/convert/convert.py +102 -0
  44. casedev/resources/convert/v1/__init__.py +33 -0
  45. casedev/resources/convert/v1/jobs.py +254 -0
  46. casedev/resources/convert/v1/v1.py +450 -0
  47. casedev/resources/format/__init__.py +33 -0
  48. casedev/resources/format/format.py +102 -0
  49. casedev/resources/format/v1/__init__.py +33 -0
  50. casedev/resources/format/v1/templates.py +419 -0
  51. casedev/resources/format/v1/v1.py +244 -0
  52. casedev/resources/llm/__init__.py +33 -0
  53. casedev/resources/llm/llm.py +192 -0
  54. casedev/resources/llm/v1/__init__.py +33 -0
  55. casedev/resources/llm/v1/chat.py +243 -0
  56. casedev/resources/llm/v1/v1.py +317 -0
  57. casedev/resources/ocr/__init__.py +33 -0
  58. casedev/resources/ocr/ocr.py +102 -0
  59. casedev/resources/ocr/v1.py +407 -0
  60. casedev/resources/search/__init__.py +33 -0
  61. casedev/resources/search/search.py +102 -0
  62. casedev/resources/search/v1.py +1052 -0
  63. casedev/resources/templates/__init__.py +33 -0
  64. casedev/resources/templates/templates.py +102 -0
  65. casedev/resources/templates/v1.py +633 -0
  66. casedev/resources/vault/__init__.py +47 -0
  67. casedev/resources/vault/graphrag.py +256 -0
  68. casedev/resources/vault/objects.py +571 -0
  69. casedev/resources/vault/vault.py +764 -0
  70. casedev/resources/voice/__init__.py +61 -0
  71. casedev/resources/voice/streaming.py +160 -0
  72. casedev/resources/voice/transcription.py +327 -0
  73. casedev/resources/voice/v1/__init__.py +33 -0
  74. casedev/resources/voice/v1/speak.py +478 -0
  75. casedev/resources/voice/v1/v1.py +290 -0
  76. casedev/resources/voice/voice.py +166 -0
  77. casedev/resources/webhooks/__init__.py +33 -0
  78. casedev/resources/webhooks/v1.py +447 -0
  79. casedev/resources/webhooks/webhooks.py +102 -0
  80. casedev/resources/workflows/__init__.py +33 -0
  81. casedev/resources/workflows/v1.py +1053 -0
  82. casedev/resources/workflows/workflows.py +102 -0
  83. casedev/types/__init__.py +12 -0
  84. casedev/types/actions/__init__.py +8 -0
  85. casedev/types/actions/v1_create_params.py +22 -0
  86. casedev/types/actions/v1_create_response.py +33 -0
  87. casedev/types/actions/v1_execute_params.py +16 -0
  88. casedev/types/actions/v1_execute_response.py +31 -0
  89. casedev/types/compute/__init__.py +7 -0
  90. casedev/types/compute/v1/__init__.py +18 -0
  91. casedev/types/compute/v1/environment_create_params.py +12 -0
  92. casedev/types/compute/v1/environment_create_response.py +34 -0
  93. casedev/types/compute/v1/environment_delete_response.py +11 -0
  94. casedev/types/compute/v1/function_get_logs_params.py +12 -0
  95. casedev/types/compute/v1/function_list_params.py +12 -0
  96. casedev/types/compute/v1/invoke_run_params.py +21 -0
  97. casedev/types/compute/v1/invoke_run_response.py +39 -0
  98. casedev/types/compute/v1/run_list_params.py +18 -0
  99. casedev/types/compute/v1/secret_create_params.py +24 -0
  100. casedev/types/compute/v1/secret_create_response.py +24 -0
  101. casedev/types/compute/v1/secret_delete_group_params.py +18 -0
  102. casedev/types/compute/v1/secret_list_params.py +15 -0
  103. casedev/types/compute/v1/secret_retrieve_group_params.py +12 -0
  104. casedev/types/compute/v1/secret_update_group_params.py +16 -0
  105. casedev/types/compute/v1_deploy_params.py +114 -0
  106. casedev/types/compute/v1_deploy_response.py +30 -0
  107. casedev/types/compute/v1_get_usage_params.py +15 -0
  108. casedev/types/convert/__init__.py +8 -0
  109. casedev/types/convert/v1/__init__.py +3 -0
  110. casedev/types/convert/v1_process_params.py +15 -0
  111. casedev/types/convert/v1_process_response.py +19 -0
  112. casedev/types/convert/v1_webhook_params.py +32 -0
  113. casedev/types/convert/v1_webhook_response.py +13 -0
  114. casedev/types/format/__init__.py +5 -0
  115. casedev/types/format/v1/__init__.py +7 -0
  116. casedev/types/format/v1/template_create_params.py +32 -0
  117. casedev/types/format/v1/template_create_response.py +27 -0
  118. casedev/types/format/v1/template_list_params.py +12 -0
  119. casedev/types/format/v1_create_document_params.py +42 -0
  120. casedev/types/llm/__init__.py +5 -0
  121. casedev/types/llm/v1/__init__.py +6 -0
  122. casedev/types/llm/v1/chat_create_completion_params.py +42 -0
  123. casedev/types/llm/v1/chat_create_completion_response.py +49 -0
  124. casedev/types/llm/v1_create_embedding_params.py +27 -0
  125. casedev/types/ocr/__init__.py +6 -0
  126. casedev/types/ocr/v1_process_params.py +44 -0
  127. casedev/types/ocr/v1_process_response.py +32 -0
  128. casedev/types/search/__init__.py +15 -0
  129. casedev/types/search/v1_answer_params.py +45 -0
  130. casedev/types/search/v1_answer_response.py +35 -0
  131. casedev/types/search/v1_contents_params.py +42 -0
  132. casedev/types/search/v1_contents_response.py +31 -0
  133. casedev/types/search/v1_research_params.py +23 -0
  134. casedev/types/search/v1_research_response.py +20 -0
  135. casedev/types/search/v1_retrieve_research_params.py +15 -0
  136. casedev/types/search/v1_search_params.py +56 -0
  137. casedev/types/search/v1_search_response.py +38 -0
  138. casedev/types/search/v1_similar_params.py +44 -0
  139. casedev/types/search/v1_similar_response.py +33 -0
  140. casedev/types/templates/__init__.py +8 -0
  141. casedev/types/templates/v1_execute_params.py +22 -0
  142. casedev/types/templates/v1_execute_response.py +31 -0
  143. casedev/types/templates/v1_list_params.py +32 -0
  144. casedev/types/templates/v1_search_params.py +18 -0
  145. casedev/types/vault/__init__.py +6 -0
  146. casedev/types/vault/object_create_presigned_url_params.py +22 -0
  147. casedev/types/vault/object_create_presigned_url_response.py +51 -0
  148. casedev/types/vault_create_params.py +20 -0
  149. casedev/types/vault_create_response.py +36 -0
  150. casedev/types/vault_ingest_response.py +26 -0
  151. casedev/types/vault_list_response.py +40 -0
  152. casedev/types/vault_search_params.py +27 -0
  153. casedev/types/vault_search_response.py +53 -0
  154. casedev/types/vault_upload_params.py +26 -0
  155. casedev/types/vault_upload_response.py +39 -0
  156. casedev/types/voice/__init__.py +7 -0
  157. casedev/types/voice/transcription_create_params.py +36 -0
  158. casedev/types/voice/transcription_retrieve_response.py +41 -0
  159. casedev/types/voice/v1/__init__.py +6 -0
  160. casedev/types/voice/v1/speak_create_params.py +59 -0
  161. casedev/types/voice/v1/speak_stream_params.py +58 -0
  162. casedev/types/voice/v1_list_voices_params.py +36 -0
  163. casedev/types/webhooks/__init__.py +6 -0
  164. casedev/types/webhooks/v1_create_params.py +20 -0
  165. casedev/types/webhooks/v1_create_response.py +33 -0
  166. casedev/types/workflows/__init__.py +19 -0
  167. casedev/types/workflows/v1_create_params.py +32 -0
  168. casedev/types/workflows/v1_create_response.py +29 -0
  169. casedev/types/workflows/v1_delete_response.py +13 -0
  170. casedev/types/workflows/v1_deploy_response.py +20 -0
  171. casedev/types/workflows/v1_execute_params.py +12 -0
  172. casedev/types/workflows/v1_execute_response.py +22 -0
  173. casedev/types/workflows/v1_list_executions_params.py +13 -0
  174. casedev/types/workflows/v1_list_executions_response.py +27 -0
  175. casedev/types/workflows/v1_list_params.py +18 -0
  176. casedev/types/workflows/v1_list_response.py +37 -0
  177. casedev/types/workflows/v1_retrieve_execution_response.py +31 -0
  178. casedev/types/workflows/v1_retrieve_response.py +35 -0
  179. casedev/types/workflows/v1_undeploy_response.py +13 -0
  180. casedev/types/workflows/v1_update_params.py +26 -0
  181. casedev/types/workflows/v1_update_response.py +17 -0
  182. casedev-0.1.0.dist-info/METADATA +454 -0
  183. casedev-0.1.0.dist-info/RECORD +185 -0
  184. casedev-0.1.0.dist-info/WHEEL +4 -0
  185. casedev-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,317 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union
6
+ from typing_extensions import Literal
7
+
8
+ import httpx
9
+
10
+ from .chat import (
11
+ ChatResource,
12
+ AsyncChatResource,
13
+ ChatResourceWithRawResponse,
14
+ AsyncChatResourceWithRawResponse,
15
+ ChatResourceWithStreamingResponse,
16
+ AsyncChatResourceWithStreamingResponse,
17
+ )
18
+ from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
19
+ from ...._utils import maybe_transform, async_maybe_transform
20
+ from ...._compat import cached_property
21
+ from ...._resource import SyncAPIResource, AsyncAPIResource
22
+ from ...._response import (
23
+ to_raw_response_wrapper,
24
+ to_streamed_response_wrapper,
25
+ async_to_raw_response_wrapper,
26
+ async_to_streamed_response_wrapper,
27
+ )
28
+ from ....types.llm import v1_create_embedding_params
29
+ from ...._base_client import make_request_options
30
+
31
+ __all__ = ["V1Resource", "AsyncV1Resource"]
32
+
33
+
34
+ class V1Resource(SyncAPIResource):
35
+ @cached_property
36
+ def chat(self) -> ChatResource:
37
+ return ChatResource(self._client)
38
+
39
+ @cached_property
40
+ def with_raw_response(self) -> V1ResourceWithRawResponse:
41
+ """
42
+ This property can be used as a prefix for any HTTP method call to return
43
+ the raw response object instead of the parsed content.
44
+
45
+ For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
46
+ """
47
+ return V1ResourceWithRawResponse(self)
48
+
49
+ @cached_property
50
+ def with_streaming_response(self) -> V1ResourceWithStreamingResponse:
51
+ """
52
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
53
+
54
+ For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
55
+ """
56
+ return V1ResourceWithStreamingResponse(self)
57
+
58
+ def create_embedding(
59
+ self,
60
+ *,
61
+ input: Union[str, SequenceNotStr[str]],
62
+ model: str,
63
+ dimensions: int | Omit = omit,
64
+ encoding_format: Literal["float", "base64"] | Omit = omit,
65
+ user: str | Omit = omit,
66
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
67
+ # The extra values given here take precedence over values defined on the client or passed to this method.
68
+ extra_headers: Headers | None = None,
69
+ extra_query: Query | None = None,
70
+ extra_body: Body | None = None,
71
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
72
+ ) -> None:
73
+ """Create vector embeddings from text using OpenAI-compatible models.
74
+
75
+ Perfect for
76
+ semantic search, document similarity, and building RAG systems for legal
77
+ documents.
78
+
79
+ Args:
80
+ input: Text or array of texts to create embeddings for
81
+
82
+ model: Embedding model to use (e.g., text-embedding-ada-002, text-embedding-3-small)
83
+
84
+ dimensions: Number of dimensions for the embeddings (model-specific)
85
+
86
+ encoding_format: Format for returned embeddings
87
+
88
+ user: Unique identifier for the end-user
89
+
90
+ extra_headers: Send extra headers
91
+
92
+ extra_query: Add additional query parameters to the request
93
+
94
+ extra_body: Add additional JSON properties to the request
95
+
96
+ timeout: Override the client-level default timeout for this request, in seconds
97
+ """
98
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
99
+ return self._post(
100
+ "/llm/v1/embeddings",
101
+ body=maybe_transform(
102
+ {
103
+ "input": input,
104
+ "model": model,
105
+ "dimensions": dimensions,
106
+ "encoding_format": encoding_format,
107
+ "user": user,
108
+ },
109
+ v1_create_embedding_params.V1CreateEmbeddingParams,
110
+ ),
111
+ options=make_request_options(
112
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
113
+ ),
114
+ cast_to=NoneType,
115
+ )
116
+
117
+ def list_models(
118
+ self,
119
+ *,
120
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
121
+ # The extra values given here take precedence over values defined on the client or passed to this method.
122
+ extra_headers: Headers | None = None,
123
+ extra_query: Query | None = None,
124
+ extra_body: Body | None = None,
125
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
126
+ ) -> None:
127
+ """
128
+ Retrieve a list of all available language models from 40+ providers including
129
+ OpenAI, Anthropic, Google, and Case.dev's specialized legal models. Returns
130
+ OpenAI-compatible model metadata with pricing information.
131
+
132
+ This endpoint is compatible with OpenAI's models API format, making it easy to
133
+ integrate with existing applications.
134
+ """
135
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
136
+ return self._get(
137
+ "/llm/v1/models",
138
+ options=make_request_options(
139
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
140
+ ),
141
+ cast_to=NoneType,
142
+ )
143
+
144
+
145
+ class AsyncV1Resource(AsyncAPIResource):
146
+ @cached_property
147
+ def chat(self) -> AsyncChatResource:
148
+ return AsyncChatResource(self._client)
149
+
150
+ @cached_property
151
+ def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
152
+ """
153
+ This property can be used as a prefix for any HTTP method call to return
154
+ the raw response object instead of the parsed content.
155
+
156
+ For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
157
+ """
158
+ return AsyncV1ResourceWithRawResponse(self)
159
+
160
+ @cached_property
161
+ def with_streaming_response(self) -> AsyncV1ResourceWithStreamingResponse:
162
+ """
163
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
164
+
165
+ For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
166
+ """
167
+ return AsyncV1ResourceWithStreamingResponse(self)
168
+
169
+ async def create_embedding(
170
+ self,
171
+ *,
172
+ input: Union[str, SequenceNotStr[str]],
173
+ model: str,
174
+ dimensions: int | Omit = omit,
175
+ encoding_format: Literal["float", "base64"] | Omit = omit,
176
+ user: str | Omit = omit,
177
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
178
+ # The extra values given here take precedence over values defined on the client or passed to this method.
179
+ extra_headers: Headers | None = None,
180
+ extra_query: Query | None = None,
181
+ extra_body: Body | None = None,
182
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
183
+ ) -> None:
184
+ """Create vector embeddings from text using OpenAI-compatible models.
185
+
186
+ Perfect for
187
+ semantic search, document similarity, and building RAG systems for legal
188
+ documents.
189
+
190
+ Args:
191
+ input: Text or array of texts to create embeddings for
192
+
193
+ model: Embedding model to use (e.g., text-embedding-ada-002, text-embedding-3-small)
194
+
195
+ dimensions: Number of dimensions for the embeddings (model-specific)
196
+
197
+ encoding_format: Format for returned embeddings
198
+
199
+ user: Unique identifier for the end-user
200
+
201
+ extra_headers: Send extra headers
202
+
203
+ extra_query: Add additional query parameters to the request
204
+
205
+ extra_body: Add additional JSON properties to the request
206
+
207
+ timeout: Override the client-level default timeout for this request, in seconds
208
+ """
209
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
210
+ return await self._post(
211
+ "/llm/v1/embeddings",
212
+ body=await async_maybe_transform(
213
+ {
214
+ "input": input,
215
+ "model": model,
216
+ "dimensions": dimensions,
217
+ "encoding_format": encoding_format,
218
+ "user": user,
219
+ },
220
+ v1_create_embedding_params.V1CreateEmbeddingParams,
221
+ ),
222
+ options=make_request_options(
223
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
224
+ ),
225
+ cast_to=NoneType,
226
+ )
227
+
228
+ async def list_models(
229
+ self,
230
+ *,
231
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
232
+ # The extra values given here take precedence over values defined on the client or passed to this method.
233
+ extra_headers: Headers | None = None,
234
+ extra_query: Query | None = None,
235
+ extra_body: Body | None = None,
236
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
237
+ ) -> None:
238
+ """
239
+ Retrieve a list of all available language models from 40+ providers including
240
+ OpenAI, Anthropic, Google, and Case.dev's specialized legal models. Returns
241
+ OpenAI-compatible model metadata with pricing information.
242
+
243
+ This endpoint is compatible with OpenAI's models API format, making it easy to
244
+ integrate with existing applications.
245
+ """
246
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
247
+ return await self._get(
248
+ "/llm/v1/models",
249
+ options=make_request_options(
250
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
251
+ ),
252
+ cast_to=NoneType,
253
+ )
254
+
255
+
256
+ class V1ResourceWithRawResponse:
257
+ def __init__(self, v1: V1Resource) -> None:
258
+ self._v1 = v1
259
+
260
+ self.create_embedding = to_raw_response_wrapper(
261
+ v1.create_embedding,
262
+ )
263
+ self.list_models = to_raw_response_wrapper(
264
+ v1.list_models,
265
+ )
266
+
267
+ @cached_property
268
+ def chat(self) -> ChatResourceWithRawResponse:
269
+ return ChatResourceWithRawResponse(self._v1.chat)
270
+
271
+
272
+ class AsyncV1ResourceWithRawResponse:
273
+ def __init__(self, v1: AsyncV1Resource) -> None:
274
+ self._v1 = v1
275
+
276
+ self.create_embedding = async_to_raw_response_wrapper(
277
+ v1.create_embedding,
278
+ )
279
+ self.list_models = async_to_raw_response_wrapper(
280
+ v1.list_models,
281
+ )
282
+
283
+ @cached_property
284
+ def chat(self) -> AsyncChatResourceWithRawResponse:
285
+ return AsyncChatResourceWithRawResponse(self._v1.chat)
286
+
287
+
288
+ class V1ResourceWithStreamingResponse:
289
+ def __init__(self, v1: V1Resource) -> None:
290
+ self._v1 = v1
291
+
292
+ self.create_embedding = to_streamed_response_wrapper(
293
+ v1.create_embedding,
294
+ )
295
+ self.list_models = to_streamed_response_wrapper(
296
+ v1.list_models,
297
+ )
298
+
299
+ @cached_property
300
+ def chat(self) -> ChatResourceWithStreamingResponse:
301
+ return ChatResourceWithStreamingResponse(self._v1.chat)
302
+
303
+
304
+ class AsyncV1ResourceWithStreamingResponse:
305
+ def __init__(self, v1: AsyncV1Resource) -> None:
306
+ self._v1 = v1
307
+
308
+ self.create_embedding = async_to_streamed_response_wrapper(
309
+ v1.create_embedding,
310
+ )
311
+ self.list_models = async_to_streamed_response_wrapper(
312
+ v1.list_models,
313
+ )
314
+
315
+ @cached_property
316
+ def chat(self) -> AsyncChatResourceWithStreamingResponse:
317
+ return AsyncChatResourceWithStreamingResponse(self._v1.chat)
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .v1 import (
4
+ V1Resource,
5
+ AsyncV1Resource,
6
+ V1ResourceWithRawResponse,
7
+ AsyncV1ResourceWithRawResponse,
8
+ V1ResourceWithStreamingResponse,
9
+ AsyncV1ResourceWithStreamingResponse,
10
+ )
11
+ from .ocr import (
12
+ OcrResource,
13
+ AsyncOcrResource,
14
+ OcrResourceWithRawResponse,
15
+ AsyncOcrResourceWithRawResponse,
16
+ OcrResourceWithStreamingResponse,
17
+ AsyncOcrResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "V1Resource",
22
+ "AsyncV1Resource",
23
+ "V1ResourceWithRawResponse",
24
+ "AsyncV1ResourceWithRawResponse",
25
+ "V1ResourceWithStreamingResponse",
26
+ "AsyncV1ResourceWithStreamingResponse",
27
+ "OcrResource",
28
+ "AsyncOcrResource",
29
+ "OcrResourceWithRawResponse",
30
+ "AsyncOcrResourceWithRawResponse",
31
+ "OcrResourceWithStreamingResponse",
32
+ "AsyncOcrResourceWithStreamingResponse",
33
+ ]
@@ -0,0 +1,102 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .v1 import (
6
+ V1Resource,
7
+ AsyncV1Resource,
8
+ V1ResourceWithRawResponse,
9
+ AsyncV1ResourceWithRawResponse,
10
+ V1ResourceWithStreamingResponse,
11
+ AsyncV1ResourceWithStreamingResponse,
12
+ )
13
+ from ..._compat import cached_property
14
+ from ..._resource import SyncAPIResource, AsyncAPIResource
15
+
16
+ __all__ = ["OcrResource", "AsyncOcrResource"]
17
+
18
+
19
+ class OcrResource(SyncAPIResource):
20
+ @cached_property
21
+ def v1(self) -> V1Resource:
22
+ return V1Resource(self._client)
23
+
24
+ @cached_property
25
+ def with_raw_response(self) -> OcrResourceWithRawResponse:
26
+ """
27
+ This property can be used as a prefix for any HTTP method call to return
28
+ the raw response object instead of the parsed content.
29
+
30
+ For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
31
+ """
32
+ return OcrResourceWithRawResponse(self)
33
+
34
+ @cached_property
35
+ def with_streaming_response(self) -> OcrResourceWithStreamingResponse:
36
+ """
37
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38
+
39
+ For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
40
+ """
41
+ return OcrResourceWithStreamingResponse(self)
42
+
43
+
44
+ class AsyncOcrResource(AsyncAPIResource):
45
+ @cached_property
46
+ def v1(self) -> AsyncV1Resource:
47
+ return AsyncV1Resource(self._client)
48
+
49
+ @cached_property
50
+ def with_raw_response(self) -> AsyncOcrResourceWithRawResponse:
51
+ """
52
+ This property can be used as a prefix for any HTTP method call to return
53
+ the raw response object instead of the parsed content.
54
+
55
+ For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
56
+ """
57
+ return AsyncOcrResourceWithRawResponse(self)
58
+
59
+ @cached_property
60
+ def with_streaming_response(self) -> AsyncOcrResourceWithStreamingResponse:
61
+ """
62
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63
+
64
+ For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
65
+ """
66
+ return AsyncOcrResourceWithStreamingResponse(self)
67
+
68
+
69
+ class OcrResourceWithRawResponse:
70
+ def __init__(self, ocr: OcrResource) -> None:
71
+ self._ocr = ocr
72
+
73
+ @cached_property
74
+ def v1(self) -> V1ResourceWithRawResponse:
75
+ return V1ResourceWithRawResponse(self._ocr.v1)
76
+
77
+
78
+ class AsyncOcrResourceWithRawResponse:
79
+ def __init__(self, ocr: AsyncOcrResource) -> None:
80
+ self._ocr = ocr
81
+
82
+ @cached_property
83
+ def v1(self) -> AsyncV1ResourceWithRawResponse:
84
+ return AsyncV1ResourceWithRawResponse(self._ocr.v1)
85
+
86
+
87
+ class OcrResourceWithStreamingResponse:
88
+ def __init__(self, ocr: OcrResource) -> None:
89
+ self._ocr = ocr
90
+
91
+ @cached_property
92
+ def v1(self) -> V1ResourceWithStreamingResponse:
93
+ return V1ResourceWithStreamingResponse(self._ocr.v1)
94
+
95
+
96
+ class AsyncOcrResourceWithStreamingResponse:
97
+ def __init__(self, ocr: AsyncOcrResource) -> None:
98
+ self._ocr = ocr
99
+
100
+ @cached_property
101
+ def v1(self) -> AsyncV1ResourceWithStreamingResponse:
102
+ return AsyncV1ResourceWithStreamingResponse(self._ocr.v1)