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.
- casedev/__init__.py +104 -0
- casedev/_base_client.py +1995 -0
- casedev/_client.py +560 -0
- casedev/_compat.py +219 -0
- casedev/_constants.py +14 -0
- casedev/_exceptions.py +108 -0
- casedev/_files.py +123 -0
- casedev/_models.py +857 -0
- casedev/_qs.py +150 -0
- casedev/_resource.py +43 -0
- casedev/_response.py +830 -0
- casedev/_streaming.py +333 -0
- casedev/_types.py +260 -0
- casedev/_utils/__init__.py +64 -0
- casedev/_utils/_compat.py +45 -0
- casedev/_utils/_datetime_parse.py +136 -0
- casedev/_utils/_logs.py +25 -0
- casedev/_utils/_proxy.py +65 -0
- casedev/_utils/_reflection.py +42 -0
- casedev/_utils/_resources_proxy.py +24 -0
- casedev/_utils/_streams.py +12 -0
- casedev/_utils/_sync.py +58 -0
- casedev/_utils/_transform.py +457 -0
- casedev/_utils/_typing.py +156 -0
- casedev/_utils/_utils.py +421 -0
- casedev/_version.py +4 -0
- casedev/lib/.keep +4 -0
- casedev/py.typed +0 -0
- casedev/resources/__init__.py +173 -0
- casedev/resources/actions/__init__.py +33 -0
- casedev/resources/actions/actions.py +102 -0
- casedev/resources/actions/v1.py +640 -0
- casedev/resources/compute/__init__.py +33 -0
- casedev/resources/compute/compute.py +102 -0
- casedev/resources/compute/v1/__init__.py +89 -0
- casedev/resources/compute/v1/environments.py +492 -0
- casedev/resources/compute/v1/functions.py +278 -0
- casedev/resources/compute/v1/invoke.py +216 -0
- casedev/resources/compute/v1/runs.py +290 -0
- casedev/resources/compute/v1/secrets.py +655 -0
- casedev/resources/compute/v1/v1.py +583 -0
- casedev/resources/convert/__init__.py +33 -0
- casedev/resources/convert/convert.py +102 -0
- casedev/resources/convert/v1/__init__.py +33 -0
- casedev/resources/convert/v1/jobs.py +254 -0
- casedev/resources/convert/v1/v1.py +450 -0
- casedev/resources/format/__init__.py +33 -0
- casedev/resources/format/format.py +102 -0
- casedev/resources/format/v1/__init__.py +33 -0
- casedev/resources/format/v1/templates.py +419 -0
- casedev/resources/format/v1/v1.py +244 -0
- casedev/resources/llm/__init__.py +33 -0
- casedev/resources/llm/llm.py +192 -0
- casedev/resources/llm/v1/__init__.py +33 -0
- casedev/resources/llm/v1/chat.py +243 -0
- casedev/resources/llm/v1/v1.py +317 -0
- casedev/resources/ocr/__init__.py +33 -0
- casedev/resources/ocr/ocr.py +102 -0
- casedev/resources/ocr/v1.py +407 -0
- casedev/resources/search/__init__.py +33 -0
- casedev/resources/search/search.py +102 -0
- casedev/resources/search/v1.py +1052 -0
- casedev/resources/templates/__init__.py +33 -0
- casedev/resources/templates/templates.py +102 -0
- casedev/resources/templates/v1.py +633 -0
- casedev/resources/vault/__init__.py +47 -0
- casedev/resources/vault/graphrag.py +256 -0
- casedev/resources/vault/objects.py +571 -0
- casedev/resources/vault/vault.py +764 -0
- casedev/resources/voice/__init__.py +61 -0
- casedev/resources/voice/streaming.py +160 -0
- casedev/resources/voice/transcription.py +327 -0
- casedev/resources/voice/v1/__init__.py +33 -0
- casedev/resources/voice/v1/speak.py +478 -0
- casedev/resources/voice/v1/v1.py +290 -0
- casedev/resources/voice/voice.py +166 -0
- casedev/resources/webhooks/__init__.py +33 -0
- casedev/resources/webhooks/v1.py +447 -0
- casedev/resources/webhooks/webhooks.py +102 -0
- casedev/resources/workflows/__init__.py +33 -0
- casedev/resources/workflows/v1.py +1053 -0
- casedev/resources/workflows/workflows.py +102 -0
- casedev/types/__init__.py +12 -0
- casedev/types/actions/__init__.py +8 -0
- casedev/types/actions/v1_create_params.py +22 -0
- casedev/types/actions/v1_create_response.py +33 -0
- casedev/types/actions/v1_execute_params.py +16 -0
- casedev/types/actions/v1_execute_response.py +31 -0
- casedev/types/compute/__init__.py +7 -0
- casedev/types/compute/v1/__init__.py +18 -0
- casedev/types/compute/v1/environment_create_params.py +12 -0
- casedev/types/compute/v1/environment_create_response.py +34 -0
- casedev/types/compute/v1/environment_delete_response.py +11 -0
- casedev/types/compute/v1/function_get_logs_params.py +12 -0
- casedev/types/compute/v1/function_list_params.py +12 -0
- casedev/types/compute/v1/invoke_run_params.py +21 -0
- casedev/types/compute/v1/invoke_run_response.py +39 -0
- casedev/types/compute/v1/run_list_params.py +18 -0
- casedev/types/compute/v1/secret_create_params.py +24 -0
- casedev/types/compute/v1/secret_create_response.py +24 -0
- casedev/types/compute/v1/secret_delete_group_params.py +18 -0
- casedev/types/compute/v1/secret_list_params.py +15 -0
- casedev/types/compute/v1/secret_retrieve_group_params.py +12 -0
- casedev/types/compute/v1/secret_update_group_params.py +16 -0
- casedev/types/compute/v1_deploy_params.py +114 -0
- casedev/types/compute/v1_deploy_response.py +30 -0
- casedev/types/compute/v1_get_usage_params.py +15 -0
- casedev/types/convert/__init__.py +8 -0
- casedev/types/convert/v1/__init__.py +3 -0
- casedev/types/convert/v1_process_params.py +15 -0
- casedev/types/convert/v1_process_response.py +19 -0
- casedev/types/convert/v1_webhook_params.py +32 -0
- casedev/types/convert/v1_webhook_response.py +13 -0
- casedev/types/format/__init__.py +5 -0
- casedev/types/format/v1/__init__.py +7 -0
- casedev/types/format/v1/template_create_params.py +32 -0
- casedev/types/format/v1/template_create_response.py +27 -0
- casedev/types/format/v1/template_list_params.py +12 -0
- casedev/types/format/v1_create_document_params.py +42 -0
- casedev/types/llm/__init__.py +5 -0
- casedev/types/llm/v1/__init__.py +6 -0
- casedev/types/llm/v1/chat_create_completion_params.py +42 -0
- casedev/types/llm/v1/chat_create_completion_response.py +49 -0
- casedev/types/llm/v1_create_embedding_params.py +27 -0
- casedev/types/ocr/__init__.py +6 -0
- casedev/types/ocr/v1_process_params.py +44 -0
- casedev/types/ocr/v1_process_response.py +32 -0
- casedev/types/search/__init__.py +15 -0
- casedev/types/search/v1_answer_params.py +45 -0
- casedev/types/search/v1_answer_response.py +35 -0
- casedev/types/search/v1_contents_params.py +42 -0
- casedev/types/search/v1_contents_response.py +31 -0
- casedev/types/search/v1_research_params.py +23 -0
- casedev/types/search/v1_research_response.py +20 -0
- casedev/types/search/v1_retrieve_research_params.py +15 -0
- casedev/types/search/v1_search_params.py +56 -0
- casedev/types/search/v1_search_response.py +38 -0
- casedev/types/search/v1_similar_params.py +44 -0
- casedev/types/search/v1_similar_response.py +33 -0
- casedev/types/templates/__init__.py +8 -0
- casedev/types/templates/v1_execute_params.py +22 -0
- casedev/types/templates/v1_execute_response.py +31 -0
- casedev/types/templates/v1_list_params.py +32 -0
- casedev/types/templates/v1_search_params.py +18 -0
- casedev/types/vault/__init__.py +6 -0
- casedev/types/vault/object_create_presigned_url_params.py +22 -0
- casedev/types/vault/object_create_presigned_url_response.py +51 -0
- casedev/types/vault_create_params.py +20 -0
- casedev/types/vault_create_response.py +36 -0
- casedev/types/vault_ingest_response.py +26 -0
- casedev/types/vault_list_response.py +40 -0
- casedev/types/vault_search_params.py +27 -0
- casedev/types/vault_search_response.py +53 -0
- casedev/types/vault_upload_params.py +26 -0
- casedev/types/vault_upload_response.py +39 -0
- casedev/types/voice/__init__.py +7 -0
- casedev/types/voice/transcription_create_params.py +36 -0
- casedev/types/voice/transcription_retrieve_response.py +41 -0
- casedev/types/voice/v1/__init__.py +6 -0
- casedev/types/voice/v1/speak_create_params.py +59 -0
- casedev/types/voice/v1/speak_stream_params.py +58 -0
- casedev/types/voice/v1_list_voices_params.py +36 -0
- casedev/types/webhooks/__init__.py +6 -0
- casedev/types/webhooks/v1_create_params.py +20 -0
- casedev/types/webhooks/v1_create_response.py +33 -0
- casedev/types/workflows/__init__.py +19 -0
- casedev/types/workflows/v1_create_params.py +32 -0
- casedev/types/workflows/v1_create_response.py +29 -0
- casedev/types/workflows/v1_delete_response.py +13 -0
- casedev/types/workflows/v1_deploy_response.py +20 -0
- casedev/types/workflows/v1_execute_params.py +12 -0
- casedev/types/workflows/v1_execute_response.py +22 -0
- casedev/types/workflows/v1_list_executions_params.py +13 -0
- casedev/types/workflows/v1_list_executions_response.py +27 -0
- casedev/types/workflows/v1_list_params.py +18 -0
- casedev/types/workflows/v1_list_response.py +37 -0
- casedev/types/workflows/v1_retrieve_execution_response.py +31 -0
- casedev/types/workflows/v1_retrieve_response.py +35 -0
- casedev/types/workflows/v1_undeploy_response.py +13 -0
- casedev/types/workflows/v1_update_params.py +26 -0
- casedev/types/workflows/v1_update_response.py +17 -0
- casedev-0.1.0.dist-info/METADATA +454 -0
- casedev-0.1.0.dist-info/RECORD +185 -0
- casedev-0.1.0.dist-info/WHEEL +4 -0
- casedev-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -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.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__ = ["ConvertResource", "AsyncConvertResource"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ConvertResource(SyncAPIResource):
|
|
20
|
+
@cached_property
|
|
21
|
+
def v1(self) -> V1Resource:
|
|
22
|
+
return V1Resource(self._client)
|
|
23
|
+
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> ConvertResourceWithRawResponse:
|
|
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 ConvertResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> ConvertResourceWithStreamingResponse:
|
|
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 ConvertResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AsyncConvertResource(AsyncAPIResource):
|
|
45
|
+
@cached_property
|
|
46
|
+
def v1(self) -> AsyncV1Resource:
|
|
47
|
+
return AsyncV1Resource(self._client)
|
|
48
|
+
|
|
49
|
+
@cached_property
|
|
50
|
+
def with_raw_response(self) -> AsyncConvertResourceWithRawResponse:
|
|
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 AsyncConvertResourceWithRawResponse(self)
|
|
58
|
+
|
|
59
|
+
@cached_property
|
|
60
|
+
def with_streaming_response(self) -> AsyncConvertResourceWithStreamingResponse:
|
|
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 AsyncConvertResourceWithStreamingResponse(self)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class ConvertResourceWithRawResponse:
|
|
70
|
+
def __init__(self, convert: ConvertResource) -> None:
|
|
71
|
+
self._convert = convert
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def v1(self) -> V1ResourceWithRawResponse:
|
|
75
|
+
return V1ResourceWithRawResponse(self._convert.v1)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AsyncConvertResourceWithRawResponse:
|
|
79
|
+
def __init__(self, convert: AsyncConvertResource) -> None:
|
|
80
|
+
self._convert = convert
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def v1(self) -> AsyncV1ResourceWithRawResponse:
|
|
84
|
+
return AsyncV1ResourceWithRawResponse(self._convert.v1)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class ConvertResourceWithStreamingResponse:
|
|
88
|
+
def __init__(self, convert: ConvertResource) -> None:
|
|
89
|
+
self._convert = convert
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def v1(self) -> V1ResourceWithStreamingResponse:
|
|
93
|
+
return V1ResourceWithStreamingResponse(self._convert.v1)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class AsyncConvertResourceWithStreamingResponse:
|
|
97
|
+
def __init__(self, convert: AsyncConvertResource) -> None:
|
|
98
|
+
self._convert = convert
|
|
99
|
+
|
|
100
|
+
@cached_property
|
|
101
|
+
def v1(self) -> AsyncV1ResourceWithStreamingResponse:
|
|
102
|
+
return AsyncV1ResourceWithStreamingResponse(self._convert.v1)
|
|
@@ -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 .jobs import (
|
|
12
|
+
JobsResource,
|
|
13
|
+
AsyncJobsResource,
|
|
14
|
+
JobsResourceWithRawResponse,
|
|
15
|
+
AsyncJobsResourceWithRawResponse,
|
|
16
|
+
JobsResourceWithStreamingResponse,
|
|
17
|
+
AsyncJobsResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"JobsResource",
|
|
22
|
+
"AsyncJobsResource",
|
|
23
|
+
"JobsResourceWithRawResponse",
|
|
24
|
+
"AsyncJobsResourceWithRawResponse",
|
|
25
|
+
"JobsResourceWithStreamingResponse",
|
|
26
|
+
"AsyncJobsResourceWithStreamingResponse",
|
|
27
|
+
"V1Resource",
|
|
28
|
+
"AsyncV1Resource",
|
|
29
|
+
"V1ResourceWithRawResponse",
|
|
30
|
+
"AsyncV1ResourceWithRawResponse",
|
|
31
|
+
"V1ResourceWithStreamingResponse",
|
|
32
|
+
"AsyncV1ResourceWithStreamingResponse",
|
|
33
|
+
]
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ...._types import Body, Query, Headers, NoneType, NotGiven, not_given
|
|
8
|
+
from ...._compat import cached_property
|
|
9
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from ...._response import (
|
|
11
|
+
to_raw_response_wrapper,
|
|
12
|
+
to_streamed_response_wrapper,
|
|
13
|
+
async_to_raw_response_wrapper,
|
|
14
|
+
async_to_streamed_response_wrapper,
|
|
15
|
+
)
|
|
16
|
+
from ...._base_client import make_request_options
|
|
17
|
+
|
|
18
|
+
__all__ = ["JobsResource", "AsyncJobsResource"]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class JobsResource(SyncAPIResource):
|
|
22
|
+
@cached_property
|
|
23
|
+
def with_raw_response(self) -> JobsResourceWithRawResponse:
|
|
24
|
+
"""
|
|
25
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
26
|
+
the raw response object instead of the parsed content.
|
|
27
|
+
|
|
28
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
29
|
+
"""
|
|
30
|
+
return JobsResourceWithRawResponse(self)
|
|
31
|
+
|
|
32
|
+
@cached_property
|
|
33
|
+
def with_streaming_response(self) -> JobsResourceWithStreamingResponse:
|
|
34
|
+
"""
|
|
35
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
36
|
+
|
|
37
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
38
|
+
"""
|
|
39
|
+
return JobsResourceWithStreamingResponse(self)
|
|
40
|
+
|
|
41
|
+
def retrieve(
|
|
42
|
+
self,
|
|
43
|
+
id: str,
|
|
44
|
+
*,
|
|
45
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
46
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
47
|
+
extra_headers: Headers | None = None,
|
|
48
|
+
extra_query: Query | None = None,
|
|
49
|
+
extra_body: Body | None = None,
|
|
50
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
51
|
+
) -> None:
|
|
52
|
+
"""Retrieve the status of a file conversion job.
|
|
53
|
+
|
|
54
|
+
Returns detailed information about
|
|
55
|
+
the conversion progress, completion status, and any errors that occurred during
|
|
56
|
+
processing.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
extra_headers: Send extra headers
|
|
60
|
+
|
|
61
|
+
extra_query: Add additional query parameters to the request
|
|
62
|
+
|
|
63
|
+
extra_body: Add additional JSON properties to the request
|
|
64
|
+
|
|
65
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
66
|
+
"""
|
|
67
|
+
if not id:
|
|
68
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
69
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
70
|
+
return self._get(
|
|
71
|
+
f"/convert/v1/jobs/{id}",
|
|
72
|
+
options=make_request_options(
|
|
73
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
74
|
+
),
|
|
75
|
+
cast_to=NoneType,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
def delete(
|
|
79
|
+
self,
|
|
80
|
+
id: str,
|
|
81
|
+
*,
|
|
82
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
83
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
84
|
+
extra_headers: Headers | None = None,
|
|
85
|
+
extra_query: Query | None = None,
|
|
86
|
+
extra_body: Body | None = None,
|
|
87
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
88
|
+
) -> None:
|
|
89
|
+
"""Delete a converted file from Modal storage by its job ID.
|
|
90
|
+
|
|
91
|
+
This permanently
|
|
92
|
+
removes the file and its associated metadata from the system.
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
extra_headers: Send extra headers
|
|
96
|
+
|
|
97
|
+
extra_query: Add additional query parameters to the request
|
|
98
|
+
|
|
99
|
+
extra_body: Add additional JSON properties to the request
|
|
100
|
+
|
|
101
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
102
|
+
"""
|
|
103
|
+
if not id:
|
|
104
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
105
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
106
|
+
return self._delete(
|
|
107
|
+
f"/convert/v1/jobs/{id}",
|
|
108
|
+
options=make_request_options(
|
|
109
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
110
|
+
),
|
|
111
|
+
cast_to=NoneType,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class AsyncJobsResource(AsyncAPIResource):
|
|
116
|
+
@cached_property
|
|
117
|
+
def with_raw_response(self) -> AsyncJobsResourceWithRawResponse:
|
|
118
|
+
"""
|
|
119
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
120
|
+
the raw response object instead of the parsed content.
|
|
121
|
+
|
|
122
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
123
|
+
"""
|
|
124
|
+
return AsyncJobsResourceWithRawResponse(self)
|
|
125
|
+
|
|
126
|
+
@cached_property
|
|
127
|
+
def with_streaming_response(self) -> AsyncJobsResourceWithStreamingResponse:
|
|
128
|
+
"""
|
|
129
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
130
|
+
|
|
131
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
132
|
+
"""
|
|
133
|
+
return AsyncJobsResourceWithStreamingResponse(self)
|
|
134
|
+
|
|
135
|
+
async def retrieve(
|
|
136
|
+
self,
|
|
137
|
+
id: str,
|
|
138
|
+
*,
|
|
139
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
140
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
141
|
+
extra_headers: Headers | None = None,
|
|
142
|
+
extra_query: Query | None = None,
|
|
143
|
+
extra_body: Body | None = None,
|
|
144
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
145
|
+
) -> None:
|
|
146
|
+
"""Retrieve the status of a file conversion job.
|
|
147
|
+
|
|
148
|
+
Returns detailed information about
|
|
149
|
+
the conversion progress, completion status, and any errors that occurred during
|
|
150
|
+
processing.
|
|
151
|
+
|
|
152
|
+
Args:
|
|
153
|
+
extra_headers: Send extra headers
|
|
154
|
+
|
|
155
|
+
extra_query: Add additional query parameters to the request
|
|
156
|
+
|
|
157
|
+
extra_body: Add additional JSON properties to the request
|
|
158
|
+
|
|
159
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
160
|
+
"""
|
|
161
|
+
if not id:
|
|
162
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
163
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
164
|
+
return await self._get(
|
|
165
|
+
f"/convert/v1/jobs/{id}",
|
|
166
|
+
options=make_request_options(
|
|
167
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
168
|
+
),
|
|
169
|
+
cast_to=NoneType,
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
async def delete(
|
|
173
|
+
self,
|
|
174
|
+
id: str,
|
|
175
|
+
*,
|
|
176
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
177
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
178
|
+
extra_headers: Headers | None = None,
|
|
179
|
+
extra_query: Query | None = None,
|
|
180
|
+
extra_body: Body | None = None,
|
|
181
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
182
|
+
) -> None:
|
|
183
|
+
"""Delete a converted file from Modal storage by its job ID.
|
|
184
|
+
|
|
185
|
+
This permanently
|
|
186
|
+
removes the file and its associated metadata from the system.
|
|
187
|
+
|
|
188
|
+
Args:
|
|
189
|
+
extra_headers: Send extra headers
|
|
190
|
+
|
|
191
|
+
extra_query: Add additional query parameters to the request
|
|
192
|
+
|
|
193
|
+
extra_body: Add additional JSON properties to the request
|
|
194
|
+
|
|
195
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
196
|
+
"""
|
|
197
|
+
if not id:
|
|
198
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
199
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
200
|
+
return await self._delete(
|
|
201
|
+
f"/convert/v1/jobs/{id}",
|
|
202
|
+
options=make_request_options(
|
|
203
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
204
|
+
),
|
|
205
|
+
cast_to=NoneType,
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
class JobsResourceWithRawResponse:
|
|
210
|
+
def __init__(self, jobs: JobsResource) -> None:
|
|
211
|
+
self._jobs = jobs
|
|
212
|
+
|
|
213
|
+
self.retrieve = to_raw_response_wrapper(
|
|
214
|
+
jobs.retrieve,
|
|
215
|
+
)
|
|
216
|
+
self.delete = to_raw_response_wrapper(
|
|
217
|
+
jobs.delete,
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class AsyncJobsResourceWithRawResponse:
|
|
222
|
+
def __init__(self, jobs: AsyncJobsResource) -> None:
|
|
223
|
+
self._jobs = jobs
|
|
224
|
+
|
|
225
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
226
|
+
jobs.retrieve,
|
|
227
|
+
)
|
|
228
|
+
self.delete = async_to_raw_response_wrapper(
|
|
229
|
+
jobs.delete,
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
class JobsResourceWithStreamingResponse:
|
|
234
|
+
def __init__(self, jobs: JobsResource) -> None:
|
|
235
|
+
self._jobs = jobs
|
|
236
|
+
|
|
237
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
238
|
+
jobs.retrieve,
|
|
239
|
+
)
|
|
240
|
+
self.delete = to_streamed_response_wrapper(
|
|
241
|
+
jobs.delete,
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
class AsyncJobsResourceWithStreamingResponse:
|
|
246
|
+
def __init__(self, jobs: AsyncJobsResource) -> None:
|
|
247
|
+
self._jobs = jobs
|
|
248
|
+
|
|
249
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
250
|
+
jobs.retrieve,
|
|
251
|
+
)
|
|
252
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
253
|
+
jobs.delete,
|
|
254
|
+
)
|