casedev 0.3.0__py3-none-any.whl → 0.4.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/_client.py +275 -1
- casedev/_version.py +1 -1
- casedev/resources/__init__.py +98 -0
- casedev/resources/applications/__init__.py +33 -0
- casedev/resources/applications/applications.py +102 -0
- casedev/resources/applications/v1/__init__.py +61 -0
- casedev/resources/applications/v1/deployments.py +867 -0
- casedev/resources/applications/v1/projects.py +1377 -0
- casedev/resources/applications/v1/v1.py +166 -0
- casedev/resources/applications/v1/workflows.py +182 -0
- casedev/resources/compute/v1/__init__.py +28 -0
- casedev/resources/compute/v1/instance_types.py +145 -0
- casedev/resources/compute/v1/instances.py +448 -0
- casedev/resources/compute/v1/v1.py +64 -0
- casedev/resources/database/__init__.py +33 -0
- casedev/resources/database/database.py +102 -0
- casedev/resources/database/v1/__init__.py +33 -0
- casedev/resources/database/v1/projects.py +771 -0
- casedev/resources/database/v1/v1.py +175 -0
- casedev/resources/legal/__init__.py +33 -0
- casedev/resources/legal/legal.py +102 -0
- casedev/resources/legal/v1.py +924 -0
- casedev/resources/memory/__init__.py +33 -0
- casedev/resources/memory/memory.py +102 -0
- casedev/resources/memory/v1.py +1100 -0
- casedev/resources/privilege/__init__.py +33 -0
- casedev/resources/privilege/privilege.py +102 -0
- casedev/resources/privilege/v1.py +260 -0
- casedev/resources/superdoc/__init__.py +33 -0
- casedev/resources/superdoc/superdoc.py +102 -0
- casedev/resources/superdoc/v1.py +349 -0
- casedev/resources/translate/__init__.py +33 -0
- casedev/resources/translate/translate.py +102 -0
- casedev/resources/translate/v1.py +418 -0
- casedev/resources/vault/__init__.py +14 -0
- casedev/resources/vault/graphrag.py +91 -0
- casedev/resources/vault/multipart.py +549 -0
- casedev/resources/vault/objects.py +475 -5
- casedev/resources/vault/vault.py +262 -5
- casedev/types/__init__.py +4 -0
- casedev/types/applications/v1/__init__.py +20 -0
- casedev/types/applications/v1/deployment_cancel_params.py +14 -0
- casedev/types/applications/v1/deployment_create_params.py +20 -0
- casedev/types/applications/v1/deployment_get_logs_params.py +14 -0
- casedev/types/applications/v1/deployment_list_params.py +23 -0
- casedev/types/applications/v1/deployment_retrieve_params.py +17 -0
- casedev/types/applications/v1/deployment_stream_params.py +17 -0
- casedev/types/applications/v1/project_create_deployment_params.py +29 -0
- casedev/types/applications/v1/project_create_domain_params.py +17 -0
- casedev/types/applications/v1/project_create_env_params.py +27 -0
- casedev/types/applications/v1/project_create_params.py +53 -0
- casedev/types/applications/v1/project_delete_params.py +14 -0
- casedev/types/applications/v1/project_get_runtime_logs_params.py +12 -0
- casedev/types/applications/v1/project_list_deployments_params.py +18 -0
- casedev/types/applications/v1/project_list_env_params.py +12 -0
- casedev/types/applications/v1/project_list_response.py +45 -0
- casedev/types/applications/v1/workflow_get_status_params.py +14 -0
- casedev/types/compute/v1/__init__.py +6 -0
- casedev/types/compute/v1/instance_create_params.py +28 -0
- casedev/types/compute/v1/instance_create_response.py +35 -0
- casedev/types/compute/v1/instance_delete_response.py +23 -0
- casedev/types/compute/v1/instance_list_response.py +45 -0
- casedev/types/compute/v1/instance_retrieve_response.py +55 -0
- casedev/types/compute/v1/instance_type_list_response.py +46 -0
- casedev/types/database/__init__.py +5 -0
- casedev/types/database/v1/__init__.py +14 -0
- casedev/types/database/v1/project_create_branch_params.py +17 -0
- casedev/types/database/v1/project_create_branch_response.py +30 -0
- casedev/types/database/v1/project_create_params.py +27 -0
- casedev/types/database/v1/project_create_response.py +47 -0
- casedev/types/database/v1/project_delete_response.py +13 -0
- casedev/types/database/v1/project_get_connection_params.py +15 -0
- casedev/types/database/v1/project_get_connection_response.py +18 -0
- casedev/types/database/v1/project_list_branches_response.py +37 -0
- casedev/types/database/v1/project_list_response.py +64 -0
- casedev/types/database/v1/project_retrieve_response.py +100 -0
- casedev/types/database/v1_get_usage_response.py +116 -0
- casedev/types/legal/__init__.py +20 -0
- casedev/types/legal/v1_find_params.py +23 -0
- casedev/types/legal/v1_find_response.py +37 -0
- casedev/types/legal/v1_get_citations_from_url_params.py +12 -0
- casedev/types/legal/v1_get_citations_from_url_response.py +69 -0
- casedev/types/legal/v1_get_citations_params.py +16 -0
- casedev/types/legal/v1_get_citations_response.py +60 -0
- casedev/types/legal/v1_get_full_text_params.py +23 -0
- casedev/types/legal/v1_get_full_text_response.py +35 -0
- casedev/types/legal/v1_list_jurisdictions_params.py +12 -0
- casedev/types/legal/v1_list_jurisdictions_response.py +35 -0
- casedev/types/legal/v1_research_params.py +27 -0
- casedev/types/legal/v1_research_response.py +51 -0
- casedev/types/legal/v1_similar_params.py +25 -0
- casedev/types/legal/v1_similar_response.py +42 -0
- casedev/types/legal/v1_verify_params.py +16 -0
- casedev/types/legal/v1_verify_response.py +92 -0
- casedev/types/memory/__init__.py +14 -0
- casedev/types/memory/v1_create_params.py +69 -0
- casedev/types/memory/v1_create_response.py +23 -0
- casedev/types/memory/v1_delete_all_params.py +45 -0
- casedev/types/memory/v1_delete_all_response.py +12 -0
- casedev/types/memory/v1_delete_response.py +13 -0
- casedev/types/memory/v1_list_params.py +54 -0
- casedev/types/memory/v1_list_response.py +29 -0
- casedev/types/memory/v1_retrieve_response.py +23 -0
- casedev/types/memory/v1_search_params.py +54 -0
- casedev/types/memory/v1_search_response.py +61 -0
- casedev/types/privilege/__init__.py +6 -0
- casedev/types/privilege/v1_detect_params.py +34 -0
- casedev/types/privilege/v1_detect_response.py +41 -0
- casedev/types/superdoc/__init__.py +6 -0
- casedev/types/superdoc/v1_annotate_params.py +56 -0
- casedev/types/superdoc/v1_convert_params.py +23 -0
- casedev/types/translate/__init__.py +10 -0
- casedev/types/translate/v1_detect_params.py +18 -0
- casedev/types/translate/v1_detect_response.py +28 -0
- casedev/types/translate/v1_list_languages_params.py +18 -0
- casedev/types/translate/v1_list_languages_response.py +23 -0
- casedev/types/translate/v1_translate_params.py +30 -0
- casedev/types/translate/v1_translate_response.py +28 -0
- casedev/types/vault/__init__.py +14 -0
- casedev/types/vault/graphrag_process_object_response.py +45 -0
- casedev/types/vault/multipart_abort_params.py +15 -0
- casedev/types/vault/multipart_complete_params.py +26 -0
- casedev/types/vault/multipart_get_part_urls_params.py +24 -0
- casedev/types/vault/multipart_get_part_urls_response.py +19 -0
- casedev/types/vault/multipart_init_params.py +32 -0
- casedev/types/vault/multipart_init_response.py +23 -0
- casedev/types/vault/object_create_presigned_url_params.py +1 -1
- casedev/types/vault/object_delete_params.py +17 -0
- casedev/types/vault/object_delete_response.py +29 -0
- casedev/types/vault/object_get_ocr_words_params.py +28 -0
- casedev/types/vault/object_get_ocr_words_response.py +48 -0
- casedev/types/vault/object_get_summarize_job_response.py +40 -0
- casedev/types/vault/object_update_params.py +24 -0
- casedev/types/vault/object_update_response.py +39 -0
- casedev/types/vault_delete_params.py +17 -0
- casedev/types/vault_delete_response.py +30 -0
- casedev/types/vault_update_params.py +21 -0
- casedev/types/vault_update_response.py +60 -0
- casedev/types/vault_upload_params.py +1 -1
- {casedev-0.3.0.dist-info → casedev-0.4.0.dist-info}/METADATA +1 -1
- casedev-0.4.0.dist-info/RECORD +275 -0
- casedev-0.3.0.dist-info/RECORD +0 -150
- /casedev/types/{webhooks → applications}/__init__.py +0 -0
- {casedev-0.3.0.dist-info → casedev-0.4.0.dist-info}/WHEEL +0 -0
- {casedev-0.3.0.dist-info → casedev-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .projects import (
|
|
6
|
+
ProjectsResource,
|
|
7
|
+
AsyncProjectsResource,
|
|
8
|
+
ProjectsResourceWithRawResponse,
|
|
9
|
+
AsyncProjectsResourceWithRawResponse,
|
|
10
|
+
ProjectsResourceWithStreamingResponse,
|
|
11
|
+
AsyncProjectsResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from .workflows import (
|
|
14
|
+
WorkflowsResource,
|
|
15
|
+
AsyncWorkflowsResource,
|
|
16
|
+
WorkflowsResourceWithRawResponse,
|
|
17
|
+
AsyncWorkflowsResourceWithRawResponse,
|
|
18
|
+
WorkflowsResourceWithStreamingResponse,
|
|
19
|
+
AsyncWorkflowsResourceWithStreamingResponse,
|
|
20
|
+
)
|
|
21
|
+
from ...._compat import cached_property
|
|
22
|
+
from .deployments import (
|
|
23
|
+
DeploymentsResource,
|
|
24
|
+
AsyncDeploymentsResource,
|
|
25
|
+
DeploymentsResourceWithRawResponse,
|
|
26
|
+
AsyncDeploymentsResourceWithRawResponse,
|
|
27
|
+
DeploymentsResourceWithStreamingResponse,
|
|
28
|
+
AsyncDeploymentsResourceWithStreamingResponse,
|
|
29
|
+
)
|
|
30
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
31
|
+
|
|
32
|
+
__all__ = ["V1Resource", "AsyncV1Resource"]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class V1Resource(SyncAPIResource):
|
|
36
|
+
@cached_property
|
|
37
|
+
def deployments(self) -> DeploymentsResource:
|
|
38
|
+
return DeploymentsResource(self._client)
|
|
39
|
+
|
|
40
|
+
@cached_property
|
|
41
|
+
def projects(self) -> ProjectsResource:
|
|
42
|
+
return ProjectsResource(self._client)
|
|
43
|
+
|
|
44
|
+
@cached_property
|
|
45
|
+
def workflows(self) -> WorkflowsResource:
|
|
46
|
+
return WorkflowsResource(self._client)
|
|
47
|
+
|
|
48
|
+
@cached_property
|
|
49
|
+
def with_raw_response(self) -> V1ResourceWithRawResponse:
|
|
50
|
+
"""
|
|
51
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
52
|
+
the raw response object instead of the parsed content.
|
|
53
|
+
|
|
54
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
55
|
+
"""
|
|
56
|
+
return V1ResourceWithRawResponse(self)
|
|
57
|
+
|
|
58
|
+
@cached_property
|
|
59
|
+
def with_streaming_response(self) -> V1ResourceWithStreamingResponse:
|
|
60
|
+
"""
|
|
61
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
62
|
+
|
|
63
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
64
|
+
"""
|
|
65
|
+
return V1ResourceWithStreamingResponse(self)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class AsyncV1Resource(AsyncAPIResource):
|
|
69
|
+
@cached_property
|
|
70
|
+
def deployments(self) -> AsyncDeploymentsResource:
|
|
71
|
+
return AsyncDeploymentsResource(self._client)
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def projects(self) -> AsyncProjectsResource:
|
|
75
|
+
return AsyncProjectsResource(self._client)
|
|
76
|
+
|
|
77
|
+
@cached_property
|
|
78
|
+
def workflows(self) -> AsyncWorkflowsResource:
|
|
79
|
+
return AsyncWorkflowsResource(self._client)
|
|
80
|
+
|
|
81
|
+
@cached_property
|
|
82
|
+
def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
|
|
83
|
+
"""
|
|
84
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
85
|
+
the raw response object instead of the parsed content.
|
|
86
|
+
|
|
87
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
88
|
+
"""
|
|
89
|
+
return AsyncV1ResourceWithRawResponse(self)
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def with_streaming_response(self) -> AsyncV1ResourceWithStreamingResponse:
|
|
93
|
+
"""
|
|
94
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
95
|
+
|
|
96
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
97
|
+
"""
|
|
98
|
+
return AsyncV1ResourceWithStreamingResponse(self)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class V1ResourceWithRawResponse:
|
|
102
|
+
def __init__(self, v1: V1Resource) -> None:
|
|
103
|
+
self._v1 = v1
|
|
104
|
+
|
|
105
|
+
@cached_property
|
|
106
|
+
def deployments(self) -> DeploymentsResourceWithRawResponse:
|
|
107
|
+
return DeploymentsResourceWithRawResponse(self._v1.deployments)
|
|
108
|
+
|
|
109
|
+
@cached_property
|
|
110
|
+
def projects(self) -> ProjectsResourceWithRawResponse:
|
|
111
|
+
return ProjectsResourceWithRawResponse(self._v1.projects)
|
|
112
|
+
|
|
113
|
+
@cached_property
|
|
114
|
+
def workflows(self) -> WorkflowsResourceWithRawResponse:
|
|
115
|
+
return WorkflowsResourceWithRawResponse(self._v1.workflows)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class AsyncV1ResourceWithRawResponse:
|
|
119
|
+
def __init__(self, v1: AsyncV1Resource) -> None:
|
|
120
|
+
self._v1 = v1
|
|
121
|
+
|
|
122
|
+
@cached_property
|
|
123
|
+
def deployments(self) -> AsyncDeploymentsResourceWithRawResponse:
|
|
124
|
+
return AsyncDeploymentsResourceWithRawResponse(self._v1.deployments)
|
|
125
|
+
|
|
126
|
+
@cached_property
|
|
127
|
+
def projects(self) -> AsyncProjectsResourceWithRawResponse:
|
|
128
|
+
return AsyncProjectsResourceWithRawResponse(self._v1.projects)
|
|
129
|
+
|
|
130
|
+
@cached_property
|
|
131
|
+
def workflows(self) -> AsyncWorkflowsResourceWithRawResponse:
|
|
132
|
+
return AsyncWorkflowsResourceWithRawResponse(self._v1.workflows)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class V1ResourceWithStreamingResponse:
|
|
136
|
+
def __init__(self, v1: V1Resource) -> None:
|
|
137
|
+
self._v1 = v1
|
|
138
|
+
|
|
139
|
+
@cached_property
|
|
140
|
+
def deployments(self) -> DeploymentsResourceWithStreamingResponse:
|
|
141
|
+
return DeploymentsResourceWithStreamingResponse(self._v1.deployments)
|
|
142
|
+
|
|
143
|
+
@cached_property
|
|
144
|
+
def projects(self) -> ProjectsResourceWithStreamingResponse:
|
|
145
|
+
return ProjectsResourceWithStreamingResponse(self._v1.projects)
|
|
146
|
+
|
|
147
|
+
@cached_property
|
|
148
|
+
def workflows(self) -> WorkflowsResourceWithStreamingResponse:
|
|
149
|
+
return WorkflowsResourceWithStreamingResponse(self._v1.workflows)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class AsyncV1ResourceWithStreamingResponse:
|
|
153
|
+
def __init__(self, v1: AsyncV1Resource) -> None:
|
|
154
|
+
self._v1 = v1
|
|
155
|
+
|
|
156
|
+
@cached_property
|
|
157
|
+
def deployments(self) -> AsyncDeploymentsResourceWithStreamingResponse:
|
|
158
|
+
return AsyncDeploymentsResourceWithStreamingResponse(self._v1.deployments)
|
|
159
|
+
|
|
160
|
+
@cached_property
|
|
161
|
+
def projects(self) -> AsyncProjectsResourceWithStreamingResponse:
|
|
162
|
+
return AsyncProjectsResourceWithStreamingResponse(self._v1.projects)
|
|
163
|
+
|
|
164
|
+
@cached_property
|
|
165
|
+
def workflows(self) -> AsyncWorkflowsResourceWithStreamingResponse:
|
|
166
|
+
return AsyncWorkflowsResourceWithStreamingResponse(self._v1.workflows)
|
|
@@ -0,0 +1,182 @@
|
|
|
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 ...._utils import maybe_transform, async_maybe_transform
|
|
9
|
+
from ...._compat import cached_property
|
|
10
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
11
|
+
from ...._response import (
|
|
12
|
+
to_raw_response_wrapper,
|
|
13
|
+
to_streamed_response_wrapper,
|
|
14
|
+
async_to_raw_response_wrapper,
|
|
15
|
+
async_to_streamed_response_wrapper,
|
|
16
|
+
)
|
|
17
|
+
from ...._base_client import make_request_options
|
|
18
|
+
from ....types.applications.v1 import workflow_get_status_params
|
|
19
|
+
|
|
20
|
+
__all__ = ["WorkflowsResource", "AsyncWorkflowsResource"]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class WorkflowsResource(SyncAPIResource):
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> WorkflowsResourceWithRawResponse:
|
|
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 WorkflowsResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> WorkflowsResourceWithStreamingResponse:
|
|
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 WorkflowsResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
def get_status(
|
|
44
|
+
self,
|
|
45
|
+
id: str,
|
|
46
|
+
*,
|
|
47
|
+
project_id: str,
|
|
48
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
49
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
50
|
+
extra_headers: Headers | None = None,
|
|
51
|
+
extra_query: Query | None = None,
|
|
52
|
+
extra_body: Body | None = None,
|
|
53
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
54
|
+
) -> None:
|
|
55
|
+
"""
|
|
56
|
+
Get current deployment workflow status and accumulated events
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
project_id: Project ID (for authorization)
|
|
60
|
+
|
|
61
|
+
extra_headers: Send extra headers
|
|
62
|
+
|
|
63
|
+
extra_query: Add additional query parameters to the request
|
|
64
|
+
|
|
65
|
+
extra_body: Add additional JSON properties to the request
|
|
66
|
+
|
|
67
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
68
|
+
"""
|
|
69
|
+
if not id:
|
|
70
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
71
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
72
|
+
return self._get(
|
|
73
|
+
f"/applications/v1/workflows/{id}/status",
|
|
74
|
+
options=make_request_options(
|
|
75
|
+
extra_headers=extra_headers,
|
|
76
|
+
extra_query=extra_query,
|
|
77
|
+
extra_body=extra_body,
|
|
78
|
+
timeout=timeout,
|
|
79
|
+
query=maybe_transform({"project_id": project_id}, workflow_get_status_params.WorkflowGetStatusParams),
|
|
80
|
+
),
|
|
81
|
+
cast_to=NoneType,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class AsyncWorkflowsResource(AsyncAPIResource):
|
|
86
|
+
@cached_property
|
|
87
|
+
def with_raw_response(self) -> AsyncWorkflowsResourceWithRawResponse:
|
|
88
|
+
"""
|
|
89
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
90
|
+
the raw response object instead of the parsed content.
|
|
91
|
+
|
|
92
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
93
|
+
"""
|
|
94
|
+
return AsyncWorkflowsResourceWithRawResponse(self)
|
|
95
|
+
|
|
96
|
+
@cached_property
|
|
97
|
+
def with_streaming_response(self) -> AsyncWorkflowsResourceWithStreamingResponse:
|
|
98
|
+
"""
|
|
99
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
100
|
+
|
|
101
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
102
|
+
"""
|
|
103
|
+
return AsyncWorkflowsResourceWithStreamingResponse(self)
|
|
104
|
+
|
|
105
|
+
async def get_status(
|
|
106
|
+
self,
|
|
107
|
+
id: str,
|
|
108
|
+
*,
|
|
109
|
+
project_id: str,
|
|
110
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
111
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
112
|
+
extra_headers: Headers | None = None,
|
|
113
|
+
extra_query: Query | None = None,
|
|
114
|
+
extra_body: Body | None = None,
|
|
115
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
116
|
+
) -> None:
|
|
117
|
+
"""
|
|
118
|
+
Get current deployment workflow status and accumulated events
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
project_id: Project ID (for authorization)
|
|
122
|
+
|
|
123
|
+
extra_headers: Send extra headers
|
|
124
|
+
|
|
125
|
+
extra_query: Add additional query parameters to the request
|
|
126
|
+
|
|
127
|
+
extra_body: Add additional JSON properties to the request
|
|
128
|
+
|
|
129
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
130
|
+
"""
|
|
131
|
+
if not id:
|
|
132
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
133
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
134
|
+
return await self._get(
|
|
135
|
+
f"/applications/v1/workflows/{id}/status",
|
|
136
|
+
options=make_request_options(
|
|
137
|
+
extra_headers=extra_headers,
|
|
138
|
+
extra_query=extra_query,
|
|
139
|
+
extra_body=extra_body,
|
|
140
|
+
timeout=timeout,
|
|
141
|
+
query=await async_maybe_transform(
|
|
142
|
+
{"project_id": project_id}, workflow_get_status_params.WorkflowGetStatusParams
|
|
143
|
+
),
|
|
144
|
+
),
|
|
145
|
+
cast_to=NoneType,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class WorkflowsResourceWithRawResponse:
|
|
150
|
+
def __init__(self, workflows: WorkflowsResource) -> None:
|
|
151
|
+
self._workflows = workflows
|
|
152
|
+
|
|
153
|
+
self.get_status = to_raw_response_wrapper(
|
|
154
|
+
workflows.get_status,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
class AsyncWorkflowsResourceWithRawResponse:
|
|
159
|
+
def __init__(self, workflows: AsyncWorkflowsResource) -> None:
|
|
160
|
+
self._workflows = workflows
|
|
161
|
+
|
|
162
|
+
self.get_status = async_to_raw_response_wrapper(
|
|
163
|
+
workflows.get_status,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class WorkflowsResourceWithStreamingResponse:
|
|
168
|
+
def __init__(self, workflows: WorkflowsResource) -> None:
|
|
169
|
+
self._workflows = workflows
|
|
170
|
+
|
|
171
|
+
self.get_status = to_streamed_response_wrapper(
|
|
172
|
+
workflows.get_status,
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class AsyncWorkflowsResourceWithStreamingResponse:
|
|
177
|
+
def __init__(self, workflows: AsyncWorkflowsResource) -> None:
|
|
178
|
+
self._workflows = workflows
|
|
179
|
+
|
|
180
|
+
self.get_status = async_to_streamed_response_wrapper(
|
|
181
|
+
workflows.get_status,
|
|
182
|
+
)
|
|
@@ -16,6 +16,14 @@ from .secrets import (
|
|
|
16
16
|
SecretsResourceWithStreamingResponse,
|
|
17
17
|
AsyncSecretsResourceWithStreamingResponse,
|
|
18
18
|
)
|
|
19
|
+
from .instances import (
|
|
20
|
+
InstancesResource,
|
|
21
|
+
AsyncInstancesResource,
|
|
22
|
+
InstancesResourceWithRawResponse,
|
|
23
|
+
AsyncInstancesResourceWithRawResponse,
|
|
24
|
+
InstancesResourceWithStreamingResponse,
|
|
25
|
+
AsyncInstancesResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
19
27
|
from .environments import (
|
|
20
28
|
EnvironmentsResource,
|
|
21
29
|
AsyncEnvironmentsResource,
|
|
@@ -24,6 +32,14 @@ from .environments import (
|
|
|
24
32
|
EnvironmentsResourceWithStreamingResponse,
|
|
25
33
|
AsyncEnvironmentsResourceWithStreamingResponse,
|
|
26
34
|
)
|
|
35
|
+
from .instance_types import (
|
|
36
|
+
InstanceTypesResource,
|
|
37
|
+
AsyncInstanceTypesResource,
|
|
38
|
+
InstanceTypesResourceWithRawResponse,
|
|
39
|
+
AsyncInstanceTypesResourceWithRawResponse,
|
|
40
|
+
InstanceTypesResourceWithStreamingResponse,
|
|
41
|
+
AsyncInstanceTypesResourceWithStreamingResponse,
|
|
42
|
+
)
|
|
27
43
|
|
|
28
44
|
__all__ = [
|
|
29
45
|
"EnvironmentsResource",
|
|
@@ -32,6 +48,18 @@ __all__ = [
|
|
|
32
48
|
"AsyncEnvironmentsResourceWithRawResponse",
|
|
33
49
|
"EnvironmentsResourceWithStreamingResponse",
|
|
34
50
|
"AsyncEnvironmentsResourceWithStreamingResponse",
|
|
51
|
+
"InstanceTypesResource",
|
|
52
|
+
"AsyncInstanceTypesResource",
|
|
53
|
+
"InstanceTypesResourceWithRawResponse",
|
|
54
|
+
"AsyncInstanceTypesResourceWithRawResponse",
|
|
55
|
+
"InstanceTypesResourceWithStreamingResponse",
|
|
56
|
+
"AsyncInstanceTypesResourceWithStreamingResponse",
|
|
57
|
+
"InstancesResource",
|
|
58
|
+
"AsyncInstancesResource",
|
|
59
|
+
"InstancesResourceWithRawResponse",
|
|
60
|
+
"AsyncInstancesResourceWithRawResponse",
|
|
61
|
+
"InstancesResourceWithStreamingResponse",
|
|
62
|
+
"AsyncInstancesResourceWithStreamingResponse",
|
|
35
63
|
"SecretsResource",
|
|
36
64
|
"AsyncSecretsResource",
|
|
37
65
|
"SecretsResourceWithRawResponse",
|
|
@@ -0,0 +1,145 @@
|
|
|
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, 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
|
+
from ....types.compute.v1.instance_type_list_response import InstanceTypeListResponse
|
|
18
|
+
|
|
19
|
+
__all__ = ["InstanceTypesResource", "AsyncInstanceTypesResource"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class InstanceTypesResource(SyncAPIResource):
|
|
23
|
+
@cached_property
|
|
24
|
+
def with_raw_response(self) -> InstanceTypesResourceWithRawResponse:
|
|
25
|
+
"""
|
|
26
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
27
|
+
the raw response object instead of the parsed content.
|
|
28
|
+
|
|
29
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
30
|
+
"""
|
|
31
|
+
return InstanceTypesResourceWithRawResponse(self)
|
|
32
|
+
|
|
33
|
+
@cached_property
|
|
34
|
+
def with_streaming_response(self) -> InstanceTypesResourceWithStreamingResponse:
|
|
35
|
+
"""
|
|
36
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
37
|
+
|
|
38
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
39
|
+
"""
|
|
40
|
+
return InstanceTypesResourceWithStreamingResponse(self)
|
|
41
|
+
|
|
42
|
+
def list(
|
|
43
|
+
self,
|
|
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
|
+
) -> InstanceTypeListResponse:
|
|
52
|
+
"""
|
|
53
|
+
Retrieves all available GPU instance types with pricing, specifications, and
|
|
54
|
+
regional availability. Includes T4, A10, A100, H100, and H200 GPUs powered by
|
|
55
|
+
Lambda Labs. Perfect for AI model training, inference workloads, and legal
|
|
56
|
+
document OCR processing at scale.
|
|
57
|
+
"""
|
|
58
|
+
return self._get(
|
|
59
|
+
"/compute/v1/instance-types",
|
|
60
|
+
options=make_request_options(
|
|
61
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
62
|
+
),
|
|
63
|
+
cast_to=InstanceTypeListResponse,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class AsyncInstanceTypesResource(AsyncAPIResource):
|
|
68
|
+
@cached_property
|
|
69
|
+
def with_raw_response(self) -> AsyncInstanceTypesResourceWithRawResponse:
|
|
70
|
+
"""
|
|
71
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
72
|
+
the raw response object instead of the parsed content.
|
|
73
|
+
|
|
74
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
75
|
+
"""
|
|
76
|
+
return AsyncInstanceTypesResourceWithRawResponse(self)
|
|
77
|
+
|
|
78
|
+
@cached_property
|
|
79
|
+
def with_streaming_response(self) -> AsyncInstanceTypesResourceWithStreamingResponse:
|
|
80
|
+
"""
|
|
81
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
82
|
+
|
|
83
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
84
|
+
"""
|
|
85
|
+
return AsyncInstanceTypesResourceWithStreamingResponse(self)
|
|
86
|
+
|
|
87
|
+
async def list(
|
|
88
|
+
self,
|
|
89
|
+
*,
|
|
90
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
91
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
92
|
+
extra_headers: Headers | None = None,
|
|
93
|
+
extra_query: Query | None = None,
|
|
94
|
+
extra_body: Body | None = None,
|
|
95
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
96
|
+
) -> InstanceTypeListResponse:
|
|
97
|
+
"""
|
|
98
|
+
Retrieves all available GPU instance types with pricing, specifications, and
|
|
99
|
+
regional availability. Includes T4, A10, A100, H100, and H200 GPUs powered by
|
|
100
|
+
Lambda Labs. Perfect for AI model training, inference workloads, and legal
|
|
101
|
+
document OCR processing at scale.
|
|
102
|
+
"""
|
|
103
|
+
return await self._get(
|
|
104
|
+
"/compute/v1/instance-types",
|
|
105
|
+
options=make_request_options(
|
|
106
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
107
|
+
),
|
|
108
|
+
cast_to=InstanceTypeListResponse,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class InstanceTypesResourceWithRawResponse:
|
|
113
|
+
def __init__(self, instance_types: InstanceTypesResource) -> None:
|
|
114
|
+
self._instance_types = instance_types
|
|
115
|
+
|
|
116
|
+
self.list = to_raw_response_wrapper(
|
|
117
|
+
instance_types.list,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class AsyncInstanceTypesResourceWithRawResponse:
|
|
122
|
+
def __init__(self, instance_types: AsyncInstanceTypesResource) -> None:
|
|
123
|
+
self._instance_types = instance_types
|
|
124
|
+
|
|
125
|
+
self.list = async_to_raw_response_wrapper(
|
|
126
|
+
instance_types.list,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class InstanceTypesResourceWithStreamingResponse:
|
|
131
|
+
def __init__(self, instance_types: InstanceTypesResource) -> None:
|
|
132
|
+
self._instance_types = instance_types
|
|
133
|
+
|
|
134
|
+
self.list = to_streamed_response_wrapper(
|
|
135
|
+
instance_types.list,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class AsyncInstanceTypesResourceWithStreamingResponse:
|
|
140
|
+
def __init__(self, instance_types: AsyncInstanceTypesResource) -> None:
|
|
141
|
+
self._instance_types = instance_types
|
|
142
|
+
|
|
143
|
+
self.list = async_to_streamed_response_wrapper(
|
|
144
|
+
instance_types.list,
|
|
145
|
+
)
|