casedev 0.1.0__py3-none-any.whl → 0.2.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.
- casedev/_base_client.py +140 -11
- casedev/_client.py +290 -119
- casedev/_models.py +16 -1
- casedev/_types.py +12 -2
- casedev/_version.py +1 -1
- casedev/resources/__init__.py +0 -70
- casedev/resources/compute/v1/__init__.py +0 -42
- casedev/resources/compute/v1/environments.py +16 -19
- casedev/resources/compute/v1/secrets.py +35 -41
- casedev/resources/compute/v1/v1.py +14 -276
- casedev/resources/format/v1/templates.py +11 -13
- casedev/resources/llm/llm.py +6 -7
- casedev/resources/llm/v1/v1.py +11 -13
- casedev/resources/ocr/v1.py +10 -13
- casedev/resources/search/v1.py +6 -7
- casedev/resources/vault/graphrag.py +11 -13
- casedev/resources/vault/objects.py +20 -25
- casedev/resources/vault/vault.py +64 -28
- casedev/resources/voice/streaming.py +6 -7
- casedev/resources/voice/transcription.py +82 -23
- casedev/resources/voice/v1/speak.py +1 -195
- casedev/resources/voice/v1/v1.py +6 -7
- casedev/types/__init__.py +2 -0
- casedev/types/compute/__init__.py +1 -2
- casedev/types/compute/v1/__init__.py +7 -5
- casedev/types/compute/v1/environment_list_response.py +40 -0
- casedev/types/compute/v1/environment_retrieve_response.py +36 -0
- casedev/types/compute/v1/environment_set_default_response.py +36 -0
- casedev/types/{convert/v1_webhook_response.py → compute/v1/secret_delete_group_response.py} +3 -3
- casedev/types/compute/v1/secret_list_response.py +31 -0
- casedev/types/compute/v1/secret_retrieve_group_response.py +38 -0
- casedev/types/compute/v1/secret_update_group_response.py +22 -0
- casedev/types/compute/v1_get_usage_response.py +51 -0
- casedev/types/format/v1/__init__.py +2 -0
- casedev/types/format/v1/template_list_response.py +40 -0
- casedev/types/format/v1/template_retrieve_response.py +33 -0
- casedev/types/llm/__init__.py +2 -0
- casedev/types/llm/v1_create_embedding_response.py +31 -0
- casedev/types/llm/v1_list_models_response.py +41 -0
- casedev/types/llm_get_config_response.py +33 -0
- casedev/types/ocr/__init__.py +2 -0
- casedev/types/ocr/v1_download_response.py +7 -0
- casedev/types/ocr/v1_process_params.py +2 -0
- casedev/types/ocr/v1_retrieve_response.py +32 -0
- casedev/types/search/__init__.py +1 -0
- casedev/types/search/v1_retrieve_research_response.py +74 -0
- casedev/types/vault/__init__.py +6 -0
- casedev/types/vault/graphrag_get_stats_response.py +31 -0
- casedev/types/{workflows/v1_delete_response.py → vault/graphrag_init_response.py} +6 -2
- casedev/types/vault/object_download_response.py +7 -0
- casedev/types/vault/object_get_text_response.py +35 -0
- casedev/types/vault/object_list_response.py +64 -0
- casedev/types/vault/object_retrieve_response.py +57 -0
- casedev/types/vault_create_params.py +16 -1
- casedev/types/vault_create_response.py +5 -2
- casedev/types/vault_ingest_response.py +15 -5
- casedev/types/vault_retrieve_response.py +76 -0
- casedev/types/vault_search_params.py +19 -5
- casedev/types/vault_search_response.py +25 -1
- casedev/types/vault_upload_params.py +7 -0
- casedev/types/vault_upload_response.py +6 -0
- casedev/types/voice/__init__.py +3 -0
- casedev/types/voice/streaming_get_url_response.py +44 -0
- casedev/types/voice/transcription_create_params.py +23 -3
- casedev/types/voice/transcription_create_response.py +22 -0
- casedev/types/voice/transcription_retrieve_response.py +19 -17
- casedev/types/voice/v1/__init__.py +0 -1
- casedev/types/voice/v1/speak_create_params.py +2 -0
- casedev/types/voice/v1_list_voices_response.py +40 -0
- casedev/types/webhooks/__init__.py +0 -3
- {casedev-0.1.0.dist-info → casedev-0.2.0.dist-info}/METADATA +10 -13
- casedev-0.2.0.dist-info/RECORD +149 -0
- {casedev-0.1.0.dist-info → casedev-0.2.0.dist-info}/licenses/LICENSE +1 -1
- casedev/resources/actions/__init__.py +0 -33
- casedev/resources/actions/actions.py +0 -102
- casedev/resources/actions/v1.py +0 -640
- casedev/resources/compute/v1/functions.py +0 -278
- casedev/resources/compute/v1/invoke.py +0 -216
- casedev/resources/compute/v1/runs.py +0 -290
- casedev/resources/convert/__init__.py +0 -33
- casedev/resources/convert/convert.py +0 -102
- casedev/resources/convert/v1/__init__.py +0 -33
- casedev/resources/convert/v1/jobs.py +0 -254
- casedev/resources/convert/v1/v1.py +0 -450
- casedev/resources/templates/__init__.py +0 -33
- casedev/resources/templates/templates.py +0 -102
- casedev/resources/templates/v1.py +0 -633
- casedev/resources/webhooks/__init__.py +0 -33
- casedev/resources/webhooks/v1.py +0 -447
- casedev/resources/webhooks/webhooks.py +0 -102
- casedev/resources/workflows/__init__.py +0 -33
- casedev/resources/workflows/v1.py +0 -1053
- casedev/resources/workflows/workflows.py +0 -102
- casedev/types/actions/__init__.py +0 -8
- casedev/types/actions/v1_create_params.py +0 -22
- casedev/types/actions/v1_create_response.py +0 -33
- casedev/types/actions/v1_execute_params.py +0 -16
- casedev/types/actions/v1_execute_response.py +0 -31
- casedev/types/compute/v1/function_get_logs_params.py +0 -12
- casedev/types/compute/v1/function_list_params.py +0 -12
- casedev/types/compute/v1/invoke_run_params.py +0 -21
- casedev/types/compute/v1/invoke_run_response.py +0 -39
- casedev/types/compute/v1/run_list_params.py +0 -18
- casedev/types/compute/v1_deploy_params.py +0 -114
- casedev/types/compute/v1_deploy_response.py +0 -30
- casedev/types/convert/__init__.py +0 -8
- casedev/types/convert/v1/__init__.py +0 -3
- casedev/types/convert/v1_process_params.py +0 -15
- casedev/types/convert/v1_process_response.py +0 -19
- casedev/types/convert/v1_webhook_params.py +0 -32
- casedev/types/templates/__init__.py +0 -8
- casedev/types/templates/v1_execute_params.py +0 -22
- casedev/types/templates/v1_execute_response.py +0 -31
- casedev/types/templates/v1_list_params.py +0 -32
- casedev/types/templates/v1_search_params.py +0 -18
- casedev/types/voice/v1/speak_stream_params.py +0 -58
- casedev/types/webhooks/v1_create_params.py +0 -20
- casedev/types/webhooks/v1_create_response.py +0 -33
- casedev/types/workflows/__init__.py +0 -19
- casedev/types/workflows/v1_create_params.py +0 -32
- casedev/types/workflows/v1_create_response.py +0 -29
- casedev/types/workflows/v1_deploy_response.py +0 -20
- casedev/types/workflows/v1_execute_params.py +0 -12
- casedev/types/workflows/v1_execute_response.py +0 -22
- casedev/types/workflows/v1_list_executions_params.py +0 -13
- casedev/types/workflows/v1_list_executions_response.py +0 -27
- casedev/types/workflows/v1_list_params.py +0 -18
- casedev/types/workflows/v1_list_response.py +0 -37
- casedev/types/workflows/v1_retrieve_execution_response.py +0 -31
- casedev/types/workflows/v1_retrieve_response.py +0 -35
- casedev/types/workflows/v1_undeploy_response.py +0 -13
- casedev/types/workflows/v1_update_params.py +0 -26
- casedev/types/workflows/v1_update_response.py +0 -17
- casedev-0.1.0.dist-info/RECORD +0 -185
- {casedev-0.1.0.dist-info → casedev-0.2.0.dist-info}/WHEEL +0 -0
casedev/_client.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import Any, Dict, Mapping, cast
|
|
6
|
+
from typing import TYPE_CHECKING, Any, Dict, Mapping, cast
|
|
7
7
|
from typing_extensions import Self, Literal, override
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
@@ -20,6 +20,7 @@ from ._types import (
|
|
|
20
20
|
not_given,
|
|
21
21
|
)
|
|
22
22
|
from ._utils import is_given, get_async_library
|
|
23
|
+
from ._compat import cached_property
|
|
23
24
|
from ._version import __version__
|
|
24
25
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
|
25
26
|
from ._exceptions import CasedevError, APIStatusError
|
|
@@ -28,18 +29,16 @@ from ._base_client import (
|
|
|
28
29
|
SyncAPIClient,
|
|
29
30
|
AsyncAPIClient,
|
|
30
31
|
)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
from .resources
|
|
34
|
-
from .resources.
|
|
35
|
-
from .resources.
|
|
36
|
-
from .resources.
|
|
37
|
-
from .resources.
|
|
38
|
-
from .resources.
|
|
39
|
-
from .resources.
|
|
40
|
-
from .resources.
|
|
41
|
-
from .resources.templates import templates
|
|
42
|
-
from .resources.workflows import workflows
|
|
32
|
+
|
|
33
|
+
if TYPE_CHECKING:
|
|
34
|
+
from .resources import llm, ocr, vault, voice, format, search, compute
|
|
35
|
+
from .resources.llm.llm import LlmResource, AsyncLlmResource
|
|
36
|
+
from .resources.ocr.ocr import OcrResource, AsyncOcrResource
|
|
37
|
+
from .resources.vault.vault import VaultResource, AsyncVaultResource
|
|
38
|
+
from .resources.voice.voice import VoiceResource, AsyncVoiceResource
|
|
39
|
+
from .resources.format.format import FormatResource, AsyncFormatResource
|
|
40
|
+
from .resources.search.search import SearchResource, AsyncSearchResource
|
|
41
|
+
from .resources.compute.compute import ComputeResource, AsyncComputeResource
|
|
43
42
|
|
|
44
43
|
__all__ = [
|
|
45
44
|
"ENVIRONMENTS",
|
|
@@ -60,21 +59,6 @@ ENVIRONMENTS: Dict[str, str] = {
|
|
|
60
59
|
|
|
61
60
|
|
|
62
61
|
class Casedev(SyncAPIClient):
|
|
63
|
-
actions: actions.ActionsResource
|
|
64
|
-
compute: compute.ComputeResource
|
|
65
|
-
convert: convert.ConvertResource
|
|
66
|
-
format: format.FormatResource
|
|
67
|
-
llm: llm.LlmResource
|
|
68
|
-
ocr: ocr.OcrResource
|
|
69
|
-
search: search.SearchResource
|
|
70
|
-
vault: vault.VaultResource
|
|
71
|
-
voice: voice.VoiceResource
|
|
72
|
-
webhooks: webhooks.WebhooksResource
|
|
73
|
-
templates: templates.TemplatesResource
|
|
74
|
-
workflows: workflows.WorkflowsResource
|
|
75
|
-
with_raw_response: CasedevWithRawResponse
|
|
76
|
-
with_streaming_response: CasedevWithStreamedResponse
|
|
77
|
-
|
|
78
62
|
# client options
|
|
79
63
|
api_key: str
|
|
80
64
|
|
|
@@ -153,20 +137,55 @@ class Casedev(SyncAPIClient):
|
|
|
153
137
|
_strict_response_validation=_strict_response_validation,
|
|
154
138
|
)
|
|
155
139
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
140
|
+
@cached_property
|
|
141
|
+
def compute(self) -> ComputeResource:
|
|
142
|
+
from .resources.compute import ComputeResource
|
|
143
|
+
|
|
144
|
+
return ComputeResource(self)
|
|
145
|
+
|
|
146
|
+
@cached_property
|
|
147
|
+
def format(self) -> FormatResource:
|
|
148
|
+
from .resources.format import FormatResource
|
|
149
|
+
|
|
150
|
+
return FormatResource(self)
|
|
151
|
+
|
|
152
|
+
@cached_property
|
|
153
|
+
def llm(self) -> LlmResource:
|
|
154
|
+
from .resources.llm import LlmResource
|
|
155
|
+
|
|
156
|
+
return LlmResource(self)
|
|
157
|
+
|
|
158
|
+
@cached_property
|
|
159
|
+
def ocr(self) -> OcrResource:
|
|
160
|
+
from .resources.ocr import OcrResource
|
|
161
|
+
|
|
162
|
+
return OcrResource(self)
|
|
163
|
+
|
|
164
|
+
@cached_property
|
|
165
|
+
def search(self) -> SearchResource:
|
|
166
|
+
from .resources.search import SearchResource
|
|
167
|
+
|
|
168
|
+
return SearchResource(self)
|
|
169
|
+
|
|
170
|
+
@cached_property
|
|
171
|
+
def vault(self) -> VaultResource:
|
|
172
|
+
from .resources.vault import VaultResource
|
|
173
|
+
|
|
174
|
+
return VaultResource(self)
|
|
175
|
+
|
|
176
|
+
@cached_property
|
|
177
|
+
def voice(self) -> VoiceResource:
|
|
178
|
+
from .resources.voice import VoiceResource
|
|
179
|
+
|
|
180
|
+
return VoiceResource(self)
|
|
181
|
+
|
|
182
|
+
@cached_property
|
|
183
|
+
def with_raw_response(self) -> CasedevWithRawResponse:
|
|
184
|
+
return CasedevWithRawResponse(self)
|
|
185
|
+
|
|
186
|
+
@cached_property
|
|
187
|
+
def with_streaming_response(self) -> CasedevWithStreamedResponse:
|
|
188
|
+
return CasedevWithStreamedResponse(self)
|
|
170
189
|
|
|
171
190
|
@property
|
|
172
191
|
@override
|
|
@@ -276,21 +295,6 @@ class Casedev(SyncAPIClient):
|
|
|
276
295
|
|
|
277
296
|
|
|
278
297
|
class AsyncCasedev(AsyncAPIClient):
|
|
279
|
-
actions: actions.AsyncActionsResource
|
|
280
|
-
compute: compute.AsyncComputeResource
|
|
281
|
-
convert: convert.AsyncConvertResource
|
|
282
|
-
format: format.AsyncFormatResource
|
|
283
|
-
llm: llm.AsyncLlmResource
|
|
284
|
-
ocr: ocr.AsyncOcrResource
|
|
285
|
-
search: search.AsyncSearchResource
|
|
286
|
-
vault: vault.AsyncVaultResource
|
|
287
|
-
voice: voice.AsyncVoiceResource
|
|
288
|
-
webhooks: webhooks.AsyncWebhooksResource
|
|
289
|
-
templates: templates.AsyncTemplatesResource
|
|
290
|
-
workflows: workflows.AsyncWorkflowsResource
|
|
291
|
-
with_raw_response: AsyncCasedevWithRawResponse
|
|
292
|
-
with_streaming_response: AsyncCasedevWithStreamedResponse
|
|
293
|
-
|
|
294
298
|
# client options
|
|
295
299
|
api_key: str
|
|
296
300
|
|
|
@@ -369,20 +373,55 @@ class AsyncCasedev(AsyncAPIClient):
|
|
|
369
373
|
_strict_response_validation=_strict_response_validation,
|
|
370
374
|
)
|
|
371
375
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
376
|
+
@cached_property
|
|
377
|
+
def compute(self) -> AsyncComputeResource:
|
|
378
|
+
from .resources.compute import AsyncComputeResource
|
|
379
|
+
|
|
380
|
+
return AsyncComputeResource(self)
|
|
381
|
+
|
|
382
|
+
@cached_property
|
|
383
|
+
def format(self) -> AsyncFormatResource:
|
|
384
|
+
from .resources.format import AsyncFormatResource
|
|
385
|
+
|
|
386
|
+
return AsyncFormatResource(self)
|
|
387
|
+
|
|
388
|
+
@cached_property
|
|
389
|
+
def llm(self) -> AsyncLlmResource:
|
|
390
|
+
from .resources.llm import AsyncLlmResource
|
|
391
|
+
|
|
392
|
+
return AsyncLlmResource(self)
|
|
393
|
+
|
|
394
|
+
@cached_property
|
|
395
|
+
def ocr(self) -> AsyncOcrResource:
|
|
396
|
+
from .resources.ocr import AsyncOcrResource
|
|
397
|
+
|
|
398
|
+
return AsyncOcrResource(self)
|
|
399
|
+
|
|
400
|
+
@cached_property
|
|
401
|
+
def search(self) -> AsyncSearchResource:
|
|
402
|
+
from .resources.search import AsyncSearchResource
|
|
403
|
+
|
|
404
|
+
return AsyncSearchResource(self)
|
|
405
|
+
|
|
406
|
+
@cached_property
|
|
407
|
+
def vault(self) -> AsyncVaultResource:
|
|
408
|
+
from .resources.vault import AsyncVaultResource
|
|
409
|
+
|
|
410
|
+
return AsyncVaultResource(self)
|
|
411
|
+
|
|
412
|
+
@cached_property
|
|
413
|
+
def voice(self) -> AsyncVoiceResource:
|
|
414
|
+
from .resources.voice import AsyncVoiceResource
|
|
415
|
+
|
|
416
|
+
return AsyncVoiceResource(self)
|
|
417
|
+
|
|
418
|
+
@cached_property
|
|
419
|
+
def with_raw_response(self) -> AsyncCasedevWithRawResponse:
|
|
420
|
+
return AsyncCasedevWithRawResponse(self)
|
|
421
|
+
|
|
422
|
+
@cached_property
|
|
423
|
+
def with_streaming_response(self) -> AsyncCasedevWithStreamedResponse:
|
|
424
|
+
return AsyncCasedevWithStreamedResponse(self)
|
|
386
425
|
|
|
387
426
|
@property
|
|
388
427
|
@override
|
|
@@ -492,67 +531,199 @@ class AsyncCasedev(AsyncAPIClient):
|
|
|
492
531
|
|
|
493
532
|
|
|
494
533
|
class CasedevWithRawResponse:
|
|
534
|
+
_client: Casedev
|
|
535
|
+
|
|
495
536
|
def __init__(self, client: Casedev) -> None:
|
|
496
|
-
self.
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
self.
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
537
|
+
self._client = client
|
|
538
|
+
|
|
539
|
+
@cached_property
|
|
540
|
+
def compute(self) -> compute.ComputeResourceWithRawResponse:
|
|
541
|
+
from .resources.compute import ComputeResourceWithRawResponse
|
|
542
|
+
|
|
543
|
+
return ComputeResourceWithRawResponse(self._client.compute)
|
|
544
|
+
|
|
545
|
+
@cached_property
|
|
546
|
+
def format(self) -> format.FormatResourceWithRawResponse:
|
|
547
|
+
from .resources.format import FormatResourceWithRawResponse
|
|
548
|
+
|
|
549
|
+
return FormatResourceWithRawResponse(self._client.format)
|
|
550
|
+
|
|
551
|
+
@cached_property
|
|
552
|
+
def llm(self) -> llm.LlmResourceWithRawResponse:
|
|
553
|
+
from .resources.llm import LlmResourceWithRawResponse
|
|
554
|
+
|
|
555
|
+
return LlmResourceWithRawResponse(self._client.llm)
|
|
556
|
+
|
|
557
|
+
@cached_property
|
|
558
|
+
def ocr(self) -> ocr.OcrResourceWithRawResponse:
|
|
559
|
+
from .resources.ocr import OcrResourceWithRawResponse
|
|
560
|
+
|
|
561
|
+
return OcrResourceWithRawResponse(self._client.ocr)
|
|
562
|
+
|
|
563
|
+
@cached_property
|
|
564
|
+
def search(self) -> search.SearchResourceWithRawResponse:
|
|
565
|
+
from .resources.search import SearchResourceWithRawResponse
|
|
566
|
+
|
|
567
|
+
return SearchResourceWithRawResponse(self._client.search)
|
|
568
|
+
|
|
569
|
+
@cached_property
|
|
570
|
+
def vault(self) -> vault.VaultResourceWithRawResponse:
|
|
571
|
+
from .resources.vault import VaultResourceWithRawResponse
|
|
572
|
+
|
|
573
|
+
return VaultResourceWithRawResponse(self._client.vault)
|
|
574
|
+
|
|
575
|
+
@cached_property
|
|
576
|
+
def voice(self) -> voice.VoiceResourceWithRawResponse:
|
|
577
|
+
from .resources.voice import VoiceResourceWithRawResponse
|
|
578
|
+
|
|
579
|
+
return VoiceResourceWithRawResponse(self._client.voice)
|
|
508
580
|
|
|
509
581
|
|
|
510
582
|
class AsyncCasedevWithRawResponse:
|
|
583
|
+
_client: AsyncCasedev
|
|
584
|
+
|
|
511
585
|
def __init__(self, client: AsyncCasedev) -> None:
|
|
512
|
-
self.
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
self.
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
586
|
+
self._client = client
|
|
587
|
+
|
|
588
|
+
@cached_property
|
|
589
|
+
def compute(self) -> compute.AsyncComputeResourceWithRawResponse:
|
|
590
|
+
from .resources.compute import AsyncComputeResourceWithRawResponse
|
|
591
|
+
|
|
592
|
+
return AsyncComputeResourceWithRawResponse(self._client.compute)
|
|
593
|
+
|
|
594
|
+
@cached_property
|
|
595
|
+
def format(self) -> format.AsyncFormatResourceWithRawResponse:
|
|
596
|
+
from .resources.format import AsyncFormatResourceWithRawResponse
|
|
597
|
+
|
|
598
|
+
return AsyncFormatResourceWithRawResponse(self._client.format)
|
|
599
|
+
|
|
600
|
+
@cached_property
|
|
601
|
+
def llm(self) -> llm.AsyncLlmResourceWithRawResponse:
|
|
602
|
+
from .resources.llm import AsyncLlmResourceWithRawResponse
|
|
603
|
+
|
|
604
|
+
return AsyncLlmResourceWithRawResponse(self._client.llm)
|
|
605
|
+
|
|
606
|
+
@cached_property
|
|
607
|
+
def ocr(self) -> ocr.AsyncOcrResourceWithRawResponse:
|
|
608
|
+
from .resources.ocr import AsyncOcrResourceWithRawResponse
|
|
609
|
+
|
|
610
|
+
return AsyncOcrResourceWithRawResponse(self._client.ocr)
|
|
611
|
+
|
|
612
|
+
@cached_property
|
|
613
|
+
def search(self) -> search.AsyncSearchResourceWithRawResponse:
|
|
614
|
+
from .resources.search import AsyncSearchResourceWithRawResponse
|
|
615
|
+
|
|
616
|
+
return AsyncSearchResourceWithRawResponse(self._client.search)
|
|
617
|
+
|
|
618
|
+
@cached_property
|
|
619
|
+
def vault(self) -> vault.AsyncVaultResourceWithRawResponse:
|
|
620
|
+
from .resources.vault import AsyncVaultResourceWithRawResponse
|
|
621
|
+
|
|
622
|
+
return AsyncVaultResourceWithRawResponse(self._client.vault)
|
|
623
|
+
|
|
624
|
+
@cached_property
|
|
625
|
+
def voice(self) -> voice.AsyncVoiceResourceWithRawResponse:
|
|
626
|
+
from .resources.voice import AsyncVoiceResourceWithRawResponse
|
|
627
|
+
|
|
628
|
+
return AsyncVoiceResourceWithRawResponse(self._client.voice)
|
|
524
629
|
|
|
525
630
|
|
|
526
631
|
class CasedevWithStreamedResponse:
|
|
632
|
+
_client: Casedev
|
|
633
|
+
|
|
527
634
|
def __init__(self, client: Casedev) -> None:
|
|
528
|
-
self.
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
self.
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
635
|
+
self._client = client
|
|
636
|
+
|
|
637
|
+
@cached_property
|
|
638
|
+
def compute(self) -> compute.ComputeResourceWithStreamingResponse:
|
|
639
|
+
from .resources.compute import ComputeResourceWithStreamingResponse
|
|
640
|
+
|
|
641
|
+
return ComputeResourceWithStreamingResponse(self._client.compute)
|
|
642
|
+
|
|
643
|
+
@cached_property
|
|
644
|
+
def format(self) -> format.FormatResourceWithStreamingResponse:
|
|
645
|
+
from .resources.format import FormatResourceWithStreamingResponse
|
|
646
|
+
|
|
647
|
+
return FormatResourceWithStreamingResponse(self._client.format)
|
|
648
|
+
|
|
649
|
+
@cached_property
|
|
650
|
+
def llm(self) -> llm.LlmResourceWithStreamingResponse:
|
|
651
|
+
from .resources.llm import LlmResourceWithStreamingResponse
|
|
652
|
+
|
|
653
|
+
return LlmResourceWithStreamingResponse(self._client.llm)
|
|
654
|
+
|
|
655
|
+
@cached_property
|
|
656
|
+
def ocr(self) -> ocr.OcrResourceWithStreamingResponse:
|
|
657
|
+
from .resources.ocr import OcrResourceWithStreamingResponse
|
|
658
|
+
|
|
659
|
+
return OcrResourceWithStreamingResponse(self._client.ocr)
|
|
660
|
+
|
|
661
|
+
@cached_property
|
|
662
|
+
def search(self) -> search.SearchResourceWithStreamingResponse:
|
|
663
|
+
from .resources.search import SearchResourceWithStreamingResponse
|
|
664
|
+
|
|
665
|
+
return SearchResourceWithStreamingResponse(self._client.search)
|
|
666
|
+
|
|
667
|
+
@cached_property
|
|
668
|
+
def vault(self) -> vault.VaultResourceWithStreamingResponse:
|
|
669
|
+
from .resources.vault import VaultResourceWithStreamingResponse
|
|
670
|
+
|
|
671
|
+
return VaultResourceWithStreamingResponse(self._client.vault)
|
|
672
|
+
|
|
673
|
+
@cached_property
|
|
674
|
+
def voice(self) -> voice.VoiceResourceWithStreamingResponse:
|
|
675
|
+
from .resources.voice import VoiceResourceWithStreamingResponse
|
|
676
|
+
|
|
677
|
+
return VoiceResourceWithStreamingResponse(self._client.voice)
|
|
540
678
|
|
|
541
679
|
|
|
542
680
|
class AsyncCasedevWithStreamedResponse:
|
|
681
|
+
_client: AsyncCasedev
|
|
682
|
+
|
|
543
683
|
def __init__(self, client: AsyncCasedev) -> None:
|
|
544
|
-
self.
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
self.
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
684
|
+
self._client = client
|
|
685
|
+
|
|
686
|
+
@cached_property
|
|
687
|
+
def compute(self) -> compute.AsyncComputeResourceWithStreamingResponse:
|
|
688
|
+
from .resources.compute import AsyncComputeResourceWithStreamingResponse
|
|
689
|
+
|
|
690
|
+
return AsyncComputeResourceWithStreamingResponse(self._client.compute)
|
|
691
|
+
|
|
692
|
+
@cached_property
|
|
693
|
+
def format(self) -> format.AsyncFormatResourceWithStreamingResponse:
|
|
694
|
+
from .resources.format import AsyncFormatResourceWithStreamingResponse
|
|
695
|
+
|
|
696
|
+
return AsyncFormatResourceWithStreamingResponse(self._client.format)
|
|
697
|
+
|
|
698
|
+
@cached_property
|
|
699
|
+
def llm(self) -> llm.AsyncLlmResourceWithStreamingResponse:
|
|
700
|
+
from .resources.llm import AsyncLlmResourceWithStreamingResponse
|
|
701
|
+
|
|
702
|
+
return AsyncLlmResourceWithStreamingResponse(self._client.llm)
|
|
703
|
+
|
|
704
|
+
@cached_property
|
|
705
|
+
def ocr(self) -> ocr.AsyncOcrResourceWithStreamingResponse:
|
|
706
|
+
from .resources.ocr import AsyncOcrResourceWithStreamingResponse
|
|
707
|
+
|
|
708
|
+
return AsyncOcrResourceWithStreamingResponse(self._client.ocr)
|
|
709
|
+
|
|
710
|
+
@cached_property
|
|
711
|
+
def search(self) -> search.AsyncSearchResourceWithStreamingResponse:
|
|
712
|
+
from .resources.search import AsyncSearchResourceWithStreamingResponse
|
|
713
|
+
|
|
714
|
+
return AsyncSearchResourceWithStreamingResponse(self._client.search)
|
|
715
|
+
|
|
716
|
+
@cached_property
|
|
717
|
+
def vault(self) -> vault.AsyncVaultResourceWithStreamingResponse:
|
|
718
|
+
from .resources.vault import AsyncVaultResourceWithStreamingResponse
|
|
719
|
+
|
|
720
|
+
return AsyncVaultResourceWithStreamingResponse(self._client.vault)
|
|
721
|
+
|
|
722
|
+
@cached_property
|
|
723
|
+
def voice(self) -> voice.AsyncVoiceResourceWithStreamingResponse:
|
|
724
|
+
from .resources.voice import AsyncVoiceResourceWithStreamingResponse
|
|
725
|
+
|
|
726
|
+
return AsyncVoiceResourceWithStreamingResponse(self._client.voice)
|
|
556
727
|
|
|
557
728
|
|
|
558
729
|
Client = Casedev
|
casedev/_models.py
CHANGED
|
@@ -3,7 +3,20 @@ from __future__ import annotations
|
|
|
3
3
|
import os
|
|
4
4
|
import inspect
|
|
5
5
|
import weakref
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import (
|
|
7
|
+
IO,
|
|
8
|
+
TYPE_CHECKING,
|
|
9
|
+
Any,
|
|
10
|
+
Type,
|
|
11
|
+
Union,
|
|
12
|
+
Generic,
|
|
13
|
+
TypeVar,
|
|
14
|
+
Callable,
|
|
15
|
+
Iterable,
|
|
16
|
+
Optional,
|
|
17
|
+
AsyncIterable,
|
|
18
|
+
cast,
|
|
19
|
+
)
|
|
7
20
|
from datetime import date, datetime
|
|
8
21
|
from typing_extensions import (
|
|
9
22
|
List,
|
|
@@ -787,6 +800,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
|
|
|
787
800
|
timeout: float | Timeout | None
|
|
788
801
|
files: HttpxRequestFiles | None
|
|
789
802
|
idempotency_key: str
|
|
803
|
+
content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None]
|
|
790
804
|
json_data: Body
|
|
791
805
|
extra_json: AnyMapping
|
|
792
806
|
follow_redirects: bool
|
|
@@ -805,6 +819,7 @@ class FinalRequestOptions(pydantic.BaseModel):
|
|
|
805
819
|
post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
|
|
806
820
|
follow_redirects: Union[bool, None] = None
|
|
807
821
|
|
|
822
|
+
content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None] = None
|
|
808
823
|
# It should be noted that we cannot use `json` here as that would override
|
|
809
824
|
# a BaseModel method in an incompatible fashion.
|
|
810
825
|
json_data: Union[Body, None] = None
|
casedev/_types.py
CHANGED
|
@@ -13,9 +13,11 @@ from typing import (
|
|
|
13
13
|
Mapping,
|
|
14
14
|
TypeVar,
|
|
15
15
|
Callable,
|
|
16
|
+
Iterable,
|
|
16
17
|
Iterator,
|
|
17
18
|
Optional,
|
|
18
19
|
Sequence,
|
|
20
|
+
AsyncIterable,
|
|
19
21
|
)
|
|
20
22
|
from typing_extensions import (
|
|
21
23
|
Set,
|
|
@@ -56,6 +58,13 @@ if TYPE_CHECKING:
|
|
|
56
58
|
else:
|
|
57
59
|
Base64FileInput = Union[IO[bytes], PathLike]
|
|
58
60
|
FileContent = Union[IO[bytes], bytes, PathLike] # PathLike is not subscriptable in Python 3.8.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# Used for sending raw binary data / streaming data in request bodies
|
|
64
|
+
# e.g. for file uploads without multipart encoding
|
|
65
|
+
BinaryTypes = Union[bytes, bytearray, IO[bytes], Iterable[bytes]]
|
|
66
|
+
AsyncBinaryTypes = Union[bytes, bytearray, IO[bytes], AsyncIterable[bytes]]
|
|
67
|
+
|
|
59
68
|
FileTypes = Union[
|
|
60
69
|
# file (or bytes)
|
|
61
70
|
FileContent,
|
|
@@ -243,6 +252,9 @@ _T_co = TypeVar("_T_co", covariant=True)
|
|
|
243
252
|
if TYPE_CHECKING:
|
|
244
253
|
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
|
|
245
254
|
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
|
|
255
|
+
#
|
|
256
|
+
# Note: index() and count() methods are intentionally omitted to allow pyright to properly
|
|
257
|
+
# infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
|
|
246
258
|
class SequenceNotStr(Protocol[_T_co]):
|
|
247
259
|
@overload
|
|
248
260
|
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
|
|
@@ -251,8 +263,6 @@ if TYPE_CHECKING:
|
|
|
251
263
|
def __contains__(self, value: object, /) -> bool: ...
|
|
252
264
|
def __len__(self) -> int: ...
|
|
253
265
|
def __iter__(self) -> Iterator[_T_co]: ...
|
|
254
|
-
def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
|
|
255
|
-
def count(self, value: Any, /) -> int: ...
|
|
256
266
|
def __reversed__(self) -> Iterator[_T_co]: ...
|
|
257
267
|
else:
|
|
258
268
|
# just point this to a normal `Sequence` at runtime to avoid having to special case
|
casedev/_version.py
CHANGED
casedev/resources/__init__.py
CHANGED
|
@@ -48,14 +48,6 @@ from .search import (
|
|
|
48
48
|
SearchResourceWithStreamingResponse,
|
|
49
49
|
AsyncSearchResourceWithStreamingResponse,
|
|
50
50
|
)
|
|
51
|
-
from .actions import (
|
|
52
|
-
ActionsResource,
|
|
53
|
-
AsyncActionsResource,
|
|
54
|
-
ActionsResourceWithRawResponse,
|
|
55
|
-
AsyncActionsResourceWithRawResponse,
|
|
56
|
-
ActionsResourceWithStreamingResponse,
|
|
57
|
-
AsyncActionsResourceWithStreamingResponse,
|
|
58
|
-
)
|
|
59
51
|
from .compute import (
|
|
60
52
|
ComputeResource,
|
|
61
53
|
AsyncComputeResource,
|
|
@@ -64,58 +56,14 @@ from .compute import (
|
|
|
64
56
|
ComputeResourceWithStreamingResponse,
|
|
65
57
|
AsyncComputeResourceWithStreamingResponse,
|
|
66
58
|
)
|
|
67
|
-
from .convert import (
|
|
68
|
-
ConvertResource,
|
|
69
|
-
AsyncConvertResource,
|
|
70
|
-
ConvertResourceWithRawResponse,
|
|
71
|
-
AsyncConvertResourceWithRawResponse,
|
|
72
|
-
ConvertResourceWithStreamingResponse,
|
|
73
|
-
AsyncConvertResourceWithStreamingResponse,
|
|
74
|
-
)
|
|
75
|
-
from .webhooks import (
|
|
76
|
-
WebhooksResource,
|
|
77
|
-
AsyncWebhooksResource,
|
|
78
|
-
WebhooksResourceWithRawResponse,
|
|
79
|
-
AsyncWebhooksResourceWithRawResponse,
|
|
80
|
-
WebhooksResourceWithStreamingResponse,
|
|
81
|
-
AsyncWebhooksResourceWithStreamingResponse,
|
|
82
|
-
)
|
|
83
|
-
from .templates import (
|
|
84
|
-
TemplatesResource,
|
|
85
|
-
AsyncTemplatesResource,
|
|
86
|
-
TemplatesResourceWithRawResponse,
|
|
87
|
-
AsyncTemplatesResourceWithRawResponse,
|
|
88
|
-
TemplatesResourceWithStreamingResponse,
|
|
89
|
-
AsyncTemplatesResourceWithStreamingResponse,
|
|
90
|
-
)
|
|
91
|
-
from .workflows import (
|
|
92
|
-
WorkflowsResource,
|
|
93
|
-
AsyncWorkflowsResource,
|
|
94
|
-
WorkflowsResourceWithRawResponse,
|
|
95
|
-
AsyncWorkflowsResourceWithRawResponse,
|
|
96
|
-
WorkflowsResourceWithStreamingResponse,
|
|
97
|
-
AsyncWorkflowsResourceWithStreamingResponse,
|
|
98
|
-
)
|
|
99
59
|
|
|
100
60
|
__all__ = [
|
|
101
|
-
"ActionsResource",
|
|
102
|
-
"AsyncActionsResource",
|
|
103
|
-
"ActionsResourceWithRawResponse",
|
|
104
|
-
"AsyncActionsResourceWithRawResponse",
|
|
105
|
-
"ActionsResourceWithStreamingResponse",
|
|
106
|
-
"AsyncActionsResourceWithStreamingResponse",
|
|
107
61
|
"ComputeResource",
|
|
108
62
|
"AsyncComputeResource",
|
|
109
63
|
"ComputeResourceWithRawResponse",
|
|
110
64
|
"AsyncComputeResourceWithRawResponse",
|
|
111
65
|
"ComputeResourceWithStreamingResponse",
|
|
112
66
|
"AsyncComputeResourceWithStreamingResponse",
|
|
113
|
-
"ConvertResource",
|
|
114
|
-
"AsyncConvertResource",
|
|
115
|
-
"ConvertResourceWithRawResponse",
|
|
116
|
-
"AsyncConvertResourceWithRawResponse",
|
|
117
|
-
"ConvertResourceWithStreamingResponse",
|
|
118
|
-
"AsyncConvertResourceWithStreamingResponse",
|
|
119
67
|
"FormatResource",
|
|
120
68
|
"AsyncFormatResource",
|
|
121
69
|
"FormatResourceWithRawResponse",
|
|
@@ -152,22 +100,4 @@ __all__ = [
|
|
|
152
100
|
"AsyncVoiceResourceWithRawResponse",
|
|
153
101
|
"VoiceResourceWithStreamingResponse",
|
|
154
102
|
"AsyncVoiceResourceWithStreamingResponse",
|
|
155
|
-
"WebhooksResource",
|
|
156
|
-
"AsyncWebhooksResource",
|
|
157
|
-
"WebhooksResourceWithRawResponse",
|
|
158
|
-
"AsyncWebhooksResourceWithRawResponse",
|
|
159
|
-
"WebhooksResourceWithStreamingResponse",
|
|
160
|
-
"AsyncWebhooksResourceWithStreamingResponse",
|
|
161
|
-
"TemplatesResource",
|
|
162
|
-
"AsyncTemplatesResource",
|
|
163
|
-
"TemplatesResourceWithRawResponse",
|
|
164
|
-
"AsyncTemplatesResourceWithRawResponse",
|
|
165
|
-
"TemplatesResourceWithStreamingResponse",
|
|
166
|
-
"AsyncTemplatesResourceWithStreamingResponse",
|
|
167
|
-
"WorkflowsResource",
|
|
168
|
-
"AsyncWorkflowsResource",
|
|
169
|
-
"WorkflowsResourceWithRawResponse",
|
|
170
|
-
"AsyncWorkflowsResourceWithRawResponse",
|
|
171
|
-
"WorkflowsResourceWithStreamingResponse",
|
|
172
|
-
"AsyncWorkflowsResourceWithStreamingResponse",
|
|
173
103
|
]
|