together 2.0.0a17__py3-none-any.whl → 2.0.0a19__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.
- together/_base_client.py +5 -2
- together/_client.py +1 -77
- together/_compat.py +3 -3
- together/_utils/_json.py +35 -0
- together/_version.py +1 -1
- together/lib/cli/api/beta/__init__.py +2 -0
- together/lib/cli/api/beta/jig/__init__.py +52 -0
- together/lib/cli/api/beta/jig/_config.py +170 -0
- together/lib/cli/api/beta/jig/jig.py +664 -0
- together/lib/cli/api/beta/jig/secrets.py +138 -0
- together/lib/cli/api/beta/jig/volumes.py +509 -0
- together/lib/cli/api/endpoints/create.py +7 -3
- together/lib/cli/api/endpoints/hardware.py +38 -7
- together/lib/cli/api/models/upload.py +5 -1
- together/resources/__init__.py +0 -28
- together/resources/beta/__init__.py +14 -0
- together/resources/beta/beta.py +32 -0
- together/resources/beta/clusters/clusters.py +12 -12
- together/resources/beta/clusters/storage.py +10 -10
- together/resources/beta/jig/__init__.py +61 -0
- together/resources/beta/jig/jig.py +1004 -0
- together/resources/beta/jig/queue.py +482 -0
- together/resources/beta/jig/secrets.py +548 -0
- together/resources/beta/jig/volumes.py +514 -0
- together/resources/chat/completions.py +10 -0
- together/resources/endpoints.py +103 -1
- together/resources/models/__init__.py +33 -0
- together/resources/{models.py → models/models.py} +41 -9
- together/resources/models/uploads.py +163 -0
- together/types/__init__.py +2 -4
- together/types/beta/__init__.py +6 -0
- together/types/beta/deployment.py +261 -0
- together/types/beta/deployment_logs.py +11 -0
- together/types/beta/jig/__init__.py +20 -0
- together/types/beta/jig/queue_cancel_params.py +13 -0
- together/types/beta/jig/queue_cancel_response.py +11 -0
- together/types/beta/jig/queue_metrics_params.py +12 -0
- together/types/beta/jig/queue_metrics_response.py +8 -0
- together/types/beta/jig/queue_retrieve_params.py +15 -0
- together/types/beta/jig/queue_retrieve_response.py +35 -0
- together/types/beta/jig/queue_submit_params.py +19 -0
- together/types/beta/jig/queue_submit_response.py +25 -0
- together/types/beta/jig/secret.py +33 -0
- together/types/beta/jig/secret_create_params.py +34 -0
- together/types/beta/jig/secret_list_response.py +16 -0
- together/types/beta/jig/secret_update_params.py +34 -0
- together/types/beta/jig/volume.py +47 -0
- together/types/beta/jig/volume_create_params.py +34 -0
- together/types/beta/jig/volume_list_response.py +16 -0
- together/types/beta/jig/volume_update_params.py +34 -0
- together/types/beta/jig_deploy_params.py +150 -0
- together/types/beta/jig_list_response.py +16 -0
- together/types/beta/jig_retrieve_logs_params.py +12 -0
- together/types/beta/jig_update_params.py +141 -0
- together/types/chat/completion_create_params.py +11 -0
- together/types/{hardware_list_params.py → endpoint_list_hardware_params.py} +2 -2
- together/types/{hardware_list_response.py → endpoint_list_hardware_response.py} +2 -2
- together/types/models/__init__.py +5 -0
- together/types/{job_retrieve_response.py → models/upload_status_response.py} +3 -3
- {together-2.0.0a17.dist-info → together-2.0.0a19.dist-info}/METADATA +15 -14
- {together-2.0.0a17.dist-info → together-2.0.0a19.dist-info}/RECORD +64 -30
- together/resources/hardware.py +0 -181
- together/resources/jobs.py +0 -214
- together/types/job_list_response.py +0 -47
- {together-2.0.0a17.dist-info → together-2.0.0a19.dist-info}/WHEEL +0 -0
- {together-2.0.0a17.dist-info → together-2.0.0a19.dist-info}/entry_points.txt +0 -0
- {together-2.0.0a17.dist-info → together-2.0.0a19.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import re
|
|
3
4
|
import json as json_lib
|
|
5
|
+
from typing import Any, Dict, List
|
|
4
6
|
|
|
5
7
|
import click
|
|
8
|
+
from tabulate import tabulate
|
|
6
9
|
|
|
7
10
|
from together import Together, omit
|
|
11
|
+
from together.types import EndpointListHardwareResponse
|
|
8
12
|
from together.lib.cli.api._utils import handle_api_errors
|
|
9
13
|
from together.lib.utils.serializer import datetime_serializer
|
|
10
14
|
|
|
@@ -21,20 +25,47 @@ from together.lib.utils.serializer import datetime_serializer
|
|
|
21
25
|
@handle_api_errors("Endpoints")
|
|
22
26
|
def hardware(client: Together, model: str | None, json: bool, available: bool) -> None:
|
|
23
27
|
"""List all available hardware options, optionally filtered by model."""
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
hardware_options = client.hardware.list(model=model or omit)
|
|
27
|
-
# hardware_options = client.endpoints.list_hardware(model)
|
|
28
|
+
hardware_options = client.endpoints.list_hardware(model=model or omit)
|
|
29
|
+
|
|
28
30
|
if available:
|
|
29
31
|
hardware_options.data = [
|
|
30
32
|
hardware
|
|
31
33
|
for hardware in hardware_options.data
|
|
32
34
|
if hardware.availability is not None and hardware.availability.status == "available"
|
|
33
35
|
]
|
|
34
|
-
|
|
35
36
|
if json:
|
|
36
37
|
json_output = [hardware.model_dump() for hardware in hardware_options.data]
|
|
37
38
|
click.echo(json_lib.dumps(json_output, default=datetime_serializer, indent=2))
|
|
38
39
|
else:
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
_format_hardware_options(hardware_options, show_availability=model is not None)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _format_hardware_options(hardware_options: EndpointListHardwareResponse, show_availability: bool = True) -> None:
|
|
44
|
+
display_list: List[Dict[str, Any]] = []
|
|
45
|
+
|
|
46
|
+
for hw in hardware_options.data:
|
|
47
|
+
data = {
|
|
48
|
+
"Hardware ID": hw.id,
|
|
49
|
+
"GPU": re.sub(r"\-\d+[a-zA-Z][a-zA-Z]$", "", hw.specs.gpu_type)
|
|
50
|
+
if hw.specs and hw.specs.gpu_type
|
|
51
|
+
else "N/A",
|
|
52
|
+
"Memory": f"{int(hw.specs.gpu_memory)}GB" if hw.specs else "N/A",
|
|
53
|
+
"Count": hw.specs.gpu_count if hw.specs else "N/A",
|
|
54
|
+
"Price (per minute)": (f"${hw.pricing.cents_per_minute / 100:.2f}" if hw.pricing else "N/A"),
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if show_availability:
|
|
58
|
+
status_display = "—"
|
|
59
|
+
if hw.availability:
|
|
60
|
+
status = hw.availability.status
|
|
61
|
+
# Add visual indicators for status
|
|
62
|
+
if status == "available":
|
|
63
|
+
status_display = click.style("✓ available", fg="green")
|
|
64
|
+
elif status == "unavailable":
|
|
65
|
+
status_display = click.style("✗ unavailable", fg="red")
|
|
66
|
+
else: # insufficient
|
|
67
|
+
status_display = click.style("⚠ insufficient", fg="yellow")
|
|
68
|
+
data["availability"] = status_display
|
|
69
|
+
display_list.append(data)
|
|
70
|
+
|
|
71
|
+
click.echo(tabulate(display_list, headers="keys", numalign="left"))
|
|
@@ -3,7 +3,7 @@ from typing import Literal, Optional
|
|
|
3
3
|
|
|
4
4
|
import click
|
|
5
5
|
|
|
6
|
-
from together import Together, omit
|
|
6
|
+
from together import Together, TogetherError, omit
|
|
7
7
|
from together._response import APIResponse as APIResponse
|
|
8
8
|
from together.lib.cli.api._utils import handle_api_errors
|
|
9
9
|
from together.types.model_upload_response import ModelUploadResponse
|
|
@@ -76,6 +76,10 @@ def upload(
|
|
|
76
76
|
if json:
|
|
77
77
|
click.echo(json_lib.dumps(response.model_dump(), indent=2))
|
|
78
78
|
else:
|
|
79
|
+
# If the model weights already exist, the api is returning 200 but with no data
|
|
80
|
+
if response.data is None: # type: ignore
|
|
81
|
+
raise TogetherError(response.message)
|
|
82
|
+
|
|
79
83
|
click.echo(f"Model upload job created successfully!")
|
|
80
84
|
if response.data.job_id:
|
|
81
85
|
click.echo(f"Job ID: {response.data.job_id}")
|
together/resources/__init__.py
CHANGED
|
@@ -16,14 +16,6 @@ from .chat import (
|
|
|
16
16
|
ChatResourceWithStreamingResponse,
|
|
17
17
|
AsyncChatResourceWithStreamingResponse,
|
|
18
18
|
)
|
|
19
|
-
from .jobs import (
|
|
20
|
-
JobsResource,
|
|
21
|
-
AsyncJobsResource,
|
|
22
|
-
JobsResourceWithRawResponse,
|
|
23
|
-
AsyncJobsResourceWithRawResponse,
|
|
24
|
-
JobsResourceWithStreamingResponse,
|
|
25
|
-
AsyncJobsResourceWithStreamingResponse,
|
|
26
|
-
)
|
|
27
19
|
from .audio import (
|
|
28
20
|
AudioResource,
|
|
29
21
|
AsyncAudioResource,
|
|
@@ -88,14 +80,6 @@ from .batches import (
|
|
|
88
80
|
BatchesResourceWithStreamingResponse,
|
|
89
81
|
AsyncBatchesResourceWithStreamingResponse,
|
|
90
82
|
)
|
|
91
|
-
from .hardware import (
|
|
92
|
-
HardwareResource,
|
|
93
|
-
AsyncHardwareResource,
|
|
94
|
-
HardwareResourceWithRawResponse,
|
|
95
|
-
AsyncHardwareResourceWithRawResponse,
|
|
96
|
-
HardwareResourceWithStreamingResponse,
|
|
97
|
-
AsyncHardwareResourceWithStreamingResponse,
|
|
98
|
-
)
|
|
99
83
|
from .endpoints import (
|
|
100
84
|
EndpointsResource,
|
|
101
85
|
AsyncEndpointsResource,
|
|
@@ -204,24 +188,12 @@ __all__ = [
|
|
|
204
188
|
"AsyncModelsResourceWithRawResponse",
|
|
205
189
|
"ModelsResourceWithStreamingResponse",
|
|
206
190
|
"AsyncModelsResourceWithStreamingResponse",
|
|
207
|
-
"JobsResource",
|
|
208
|
-
"AsyncJobsResource",
|
|
209
|
-
"JobsResourceWithRawResponse",
|
|
210
|
-
"AsyncJobsResourceWithRawResponse",
|
|
211
|
-
"JobsResourceWithStreamingResponse",
|
|
212
|
-
"AsyncJobsResourceWithStreamingResponse",
|
|
213
191
|
"EndpointsResource",
|
|
214
192
|
"AsyncEndpointsResource",
|
|
215
193
|
"EndpointsResourceWithRawResponse",
|
|
216
194
|
"AsyncEndpointsResourceWithRawResponse",
|
|
217
195
|
"EndpointsResourceWithStreamingResponse",
|
|
218
196
|
"AsyncEndpointsResourceWithStreamingResponse",
|
|
219
|
-
"HardwareResource",
|
|
220
|
-
"AsyncHardwareResource",
|
|
221
|
-
"HardwareResourceWithRawResponse",
|
|
222
|
-
"AsyncHardwareResourceWithRawResponse",
|
|
223
|
-
"HardwareResourceWithStreamingResponse",
|
|
224
|
-
"AsyncHardwareResourceWithStreamingResponse",
|
|
225
197
|
"RerankResource",
|
|
226
198
|
"AsyncRerankResource",
|
|
227
199
|
"RerankResourceWithRawResponse",
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from .jig import (
|
|
4
|
+
JigResource,
|
|
5
|
+
AsyncJigResource,
|
|
6
|
+
JigResourceWithRawResponse,
|
|
7
|
+
AsyncJigResourceWithRawResponse,
|
|
8
|
+
JigResourceWithStreamingResponse,
|
|
9
|
+
AsyncJigResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
3
11
|
from .beta import (
|
|
4
12
|
BetaResource,
|
|
5
13
|
AsyncBetaResource,
|
|
@@ -18,6 +26,12 @@ from .clusters import (
|
|
|
18
26
|
)
|
|
19
27
|
|
|
20
28
|
__all__ = [
|
|
29
|
+
"JigResource",
|
|
30
|
+
"AsyncJigResource",
|
|
31
|
+
"JigResourceWithRawResponse",
|
|
32
|
+
"AsyncJigResourceWithRawResponse",
|
|
33
|
+
"JigResourceWithStreamingResponse",
|
|
34
|
+
"AsyncJigResourceWithStreamingResponse",
|
|
21
35
|
"ClustersResource",
|
|
22
36
|
"AsyncClustersResource",
|
|
23
37
|
"ClustersResourceWithRawResponse",
|
together/resources/beta/beta.py
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from .jig.jig import (
|
|
6
|
+
JigResource,
|
|
7
|
+
AsyncJigResource,
|
|
8
|
+
JigResourceWithRawResponse,
|
|
9
|
+
AsyncJigResourceWithRawResponse,
|
|
10
|
+
JigResourceWithStreamingResponse,
|
|
11
|
+
AsyncJigResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
5
13
|
from ..._compat import cached_property
|
|
6
14
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
7
15
|
from .clusters.clusters import (
|
|
@@ -17,6 +25,10 @@ __all__ = ["BetaResource", "AsyncBetaResource"]
|
|
|
17
25
|
|
|
18
26
|
|
|
19
27
|
class BetaResource(SyncAPIResource):
|
|
28
|
+
@cached_property
|
|
29
|
+
def jig(self) -> JigResource:
|
|
30
|
+
return JigResource(self._client)
|
|
31
|
+
|
|
20
32
|
@cached_property
|
|
21
33
|
def clusters(self) -> ClustersResource:
|
|
22
34
|
return ClustersResource(self._client)
|
|
@@ -42,6 +54,10 @@ class BetaResource(SyncAPIResource):
|
|
|
42
54
|
|
|
43
55
|
|
|
44
56
|
class AsyncBetaResource(AsyncAPIResource):
|
|
57
|
+
@cached_property
|
|
58
|
+
def jig(self) -> AsyncJigResource:
|
|
59
|
+
return AsyncJigResource(self._client)
|
|
60
|
+
|
|
45
61
|
@cached_property
|
|
46
62
|
def clusters(self) -> AsyncClustersResource:
|
|
47
63
|
return AsyncClustersResource(self._client)
|
|
@@ -70,6 +86,10 @@ class BetaResourceWithRawResponse:
|
|
|
70
86
|
def __init__(self, beta: BetaResource) -> None:
|
|
71
87
|
self._beta = beta
|
|
72
88
|
|
|
89
|
+
@cached_property
|
|
90
|
+
def jig(self) -> JigResourceWithRawResponse:
|
|
91
|
+
return JigResourceWithRawResponse(self._beta.jig)
|
|
92
|
+
|
|
73
93
|
@cached_property
|
|
74
94
|
def clusters(self) -> ClustersResourceWithRawResponse:
|
|
75
95
|
return ClustersResourceWithRawResponse(self._beta.clusters)
|
|
@@ -79,6 +99,10 @@ class AsyncBetaResourceWithRawResponse:
|
|
|
79
99
|
def __init__(self, beta: AsyncBetaResource) -> None:
|
|
80
100
|
self._beta = beta
|
|
81
101
|
|
|
102
|
+
@cached_property
|
|
103
|
+
def jig(self) -> AsyncJigResourceWithRawResponse:
|
|
104
|
+
return AsyncJigResourceWithRawResponse(self._beta.jig)
|
|
105
|
+
|
|
82
106
|
@cached_property
|
|
83
107
|
def clusters(self) -> AsyncClustersResourceWithRawResponse:
|
|
84
108
|
return AsyncClustersResourceWithRawResponse(self._beta.clusters)
|
|
@@ -88,6 +112,10 @@ class BetaResourceWithStreamingResponse:
|
|
|
88
112
|
def __init__(self, beta: BetaResource) -> None:
|
|
89
113
|
self._beta = beta
|
|
90
114
|
|
|
115
|
+
@cached_property
|
|
116
|
+
def jig(self) -> JigResourceWithStreamingResponse:
|
|
117
|
+
return JigResourceWithStreamingResponse(self._beta.jig)
|
|
118
|
+
|
|
91
119
|
@cached_property
|
|
92
120
|
def clusters(self) -> ClustersResourceWithStreamingResponse:
|
|
93
121
|
return ClustersResourceWithStreamingResponse(self._beta.clusters)
|
|
@@ -97,6 +125,10 @@ class AsyncBetaResourceWithStreamingResponse:
|
|
|
97
125
|
def __init__(self, beta: AsyncBetaResource) -> None:
|
|
98
126
|
self._beta = beta
|
|
99
127
|
|
|
128
|
+
@cached_property
|
|
129
|
+
def jig(self) -> AsyncJigResourceWithStreamingResponse:
|
|
130
|
+
return AsyncJigResourceWithStreamingResponse(self._beta.jig)
|
|
131
|
+
|
|
100
132
|
@cached_property
|
|
101
133
|
def clusters(self) -> AsyncClustersResourceWithStreamingResponse:
|
|
102
134
|
return AsyncClustersResourceWithStreamingResponse(self._beta.clusters)
|
|
@@ -110,7 +110,7 @@ class ClustersResource(SyncAPIResource):
|
|
|
110
110
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
111
111
|
"""
|
|
112
112
|
return self._post(
|
|
113
|
-
"/clusters",
|
|
113
|
+
"/compute/clusters",
|
|
114
114
|
body=maybe_transform(
|
|
115
115
|
{
|
|
116
116
|
"billing_type": billing_type,
|
|
@@ -158,7 +158,7 @@ class ClustersResource(SyncAPIResource):
|
|
|
158
158
|
if not cluster_id:
|
|
159
159
|
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
160
160
|
return self._get(
|
|
161
|
-
f"/clusters/{cluster_id}",
|
|
161
|
+
f"/compute/clusters/{cluster_id}",
|
|
162
162
|
options=make_request_options(
|
|
163
163
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
164
164
|
),
|
|
@@ -193,7 +193,7 @@ class ClustersResource(SyncAPIResource):
|
|
|
193
193
|
if not cluster_id:
|
|
194
194
|
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
195
195
|
return self._put(
|
|
196
|
-
f"/clusters/{cluster_id}",
|
|
196
|
+
f"/compute/clusters/{cluster_id}",
|
|
197
197
|
body=maybe_transform(
|
|
198
198
|
{
|
|
199
199
|
"cluster_type": cluster_type,
|
|
@@ -219,7 +219,7 @@ class ClustersResource(SyncAPIResource):
|
|
|
219
219
|
) -> ClusterListResponse:
|
|
220
220
|
"""List all GPU clusters."""
|
|
221
221
|
return self._get(
|
|
222
|
-
"/clusters",
|
|
222
|
+
"/compute/clusters",
|
|
223
223
|
options=make_request_options(
|
|
224
224
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
225
225
|
),
|
|
@@ -252,7 +252,7 @@ class ClustersResource(SyncAPIResource):
|
|
|
252
252
|
if not cluster_id:
|
|
253
253
|
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
254
254
|
return self._delete(
|
|
255
|
-
f"/clusters/{cluster_id}",
|
|
255
|
+
f"/compute/clusters/{cluster_id}",
|
|
256
256
|
options=make_request_options(
|
|
257
257
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
258
258
|
),
|
|
@@ -271,7 +271,7 @@ class ClustersResource(SyncAPIResource):
|
|
|
271
271
|
) -> ClusterListRegionsResponse:
|
|
272
272
|
"""List regions and corresponding supported driver versions"""
|
|
273
273
|
return self._get(
|
|
274
|
-
"/
|
|
274
|
+
"/compute/regions",
|
|
275
275
|
options=make_request_options(
|
|
276
276
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
277
277
|
),
|
|
@@ -355,7 +355,7 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
355
355
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
356
356
|
"""
|
|
357
357
|
return await self._post(
|
|
358
|
-
"/clusters",
|
|
358
|
+
"/compute/clusters",
|
|
359
359
|
body=await async_maybe_transform(
|
|
360
360
|
{
|
|
361
361
|
"billing_type": billing_type,
|
|
@@ -403,7 +403,7 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
403
403
|
if not cluster_id:
|
|
404
404
|
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
405
405
|
return await self._get(
|
|
406
|
-
f"/clusters/{cluster_id}",
|
|
406
|
+
f"/compute/clusters/{cluster_id}",
|
|
407
407
|
options=make_request_options(
|
|
408
408
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
409
409
|
),
|
|
@@ -438,7 +438,7 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
438
438
|
if not cluster_id:
|
|
439
439
|
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
440
440
|
return await self._put(
|
|
441
|
-
f"/clusters/{cluster_id}",
|
|
441
|
+
f"/compute/clusters/{cluster_id}",
|
|
442
442
|
body=await async_maybe_transform(
|
|
443
443
|
{
|
|
444
444
|
"cluster_type": cluster_type,
|
|
@@ -464,7 +464,7 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
464
464
|
) -> ClusterListResponse:
|
|
465
465
|
"""List all GPU clusters."""
|
|
466
466
|
return await self._get(
|
|
467
|
-
"/clusters",
|
|
467
|
+
"/compute/clusters",
|
|
468
468
|
options=make_request_options(
|
|
469
469
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
470
470
|
),
|
|
@@ -497,7 +497,7 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
497
497
|
if not cluster_id:
|
|
498
498
|
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
499
499
|
return await self._delete(
|
|
500
|
-
f"/clusters/{cluster_id}",
|
|
500
|
+
f"/compute/clusters/{cluster_id}",
|
|
501
501
|
options=make_request_options(
|
|
502
502
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
503
503
|
),
|
|
@@ -516,7 +516,7 @@ class AsyncClustersResource(AsyncAPIResource):
|
|
|
516
516
|
) -> ClusterListRegionsResponse:
|
|
517
517
|
"""List regions and corresponding supported driver versions"""
|
|
518
518
|
return await self._get(
|
|
519
|
-
"/
|
|
519
|
+
"/compute/regions",
|
|
520
520
|
options=make_request_options(
|
|
521
521
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
522
522
|
),
|
|
@@ -77,7 +77,7 @@ class StorageResource(SyncAPIResource):
|
|
|
77
77
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
78
78
|
"""
|
|
79
79
|
return self._post(
|
|
80
|
-
"/clusters/
|
|
80
|
+
"/compute/clusters/storage/volumes",
|
|
81
81
|
body=maybe_transform(
|
|
82
82
|
{
|
|
83
83
|
"region": region,
|
|
@@ -118,7 +118,7 @@ class StorageResource(SyncAPIResource):
|
|
|
118
118
|
if not volume_id:
|
|
119
119
|
raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
|
|
120
120
|
return self._get(
|
|
121
|
-
f"/clusters/
|
|
121
|
+
f"/compute/clusters/storage/volumes/{volume_id}",
|
|
122
122
|
options=make_request_options(
|
|
123
123
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
124
124
|
),
|
|
@@ -150,7 +150,7 @@ class StorageResource(SyncAPIResource):
|
|
|
150
150
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
151
151
|
"""
|
|
152
152
|
return self._put(
|
|
153
|
-
"/clusters/
|
|
153
|
+
"/compute/clusters/storage/volumes",
|
|
154
154
|
body=maybe_transform(
|
|
155
155
|
{
|
|
156
156
|
"size_tib": size_tib,
|
|
@@ -176,7 +176,7 @@ class StorageResource(SyncAPIResource):
|
|
|
176
176
|
) -> StorageListResponse:
|
|
177
177
|
"""List all shared volumes."""
|
|
178
178
|
return self._get(
|
|
179
|
-
"/clusters/
|
|
179
|
+
"/compute/clusters/storage/volumes",
|
|
180
180
|
options=make_request_options(
|
|
181
181
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
182
182
|
),
|
|
@@ -211,7 +211,7 @@ class StorageResource(SyncAPIResource):
|
|
|
211
211
|
if not volume_id:
|
|
212
212
|
raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
|
|
213
213
|
return self._delete(
|
|
214
|
-
f"/clusters/
|
|
214
|
+
f"/compute/clusters/storage/volumes/{volume_id}",
|
|
215
215
|
options=make_request_options(
|
|
216
216
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
217
217
|
),
|
|
@@ -273,7 +273,7 @@ class AsyncStorageResource(AsyncAPIResource):
|
|
|
273
273
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
274
274
|
"""
|
|
275
275
|
return await self._post(
|
|
276
|
-
"/clusters/
|
|
276
|
+
"/compute/clusters/storage/volumes",
|
|
277
277
|
body=await async_maybe_transform(
|
|
278
278
|
{
|
|
279
279
|
"region": region,
|
|
@@ -314,7 +314,7 @@ class AsyncStorageResource(AsyncAPIResource):
|
|
|
314
314
|
if not volume_id:
|
|
315
315
|
raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
|
|
316
316
|
return await self._get(
|
|
317
|
-
f"/clusters/
|
|
317
|
+
f"/compute/clusters/storage/volumes/{volume_id}",
|
|
318
318
|
options=make_request_options(
|
|
319
319
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
320
320
|
),
|
|
@@ -346,7 +346,7 @@ class AsyncStorageResource(AsyncAPIResource):
|
|
|
346
346
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
347
347
|
"""
|
|
348
348
|
return await self._put(
|
|
349
|
-
"/clusters/
|
|
349
|
+
"/compute/clusters/storage/volumes",
|
|
350
350
|
body=await async_maybe_transform(
|
|
351
351
|
{
|
|
352
352
|
"size_tib": size_tib,
|
|
@@ -372,7 +372,7 @@ class AsyncStorageResource(AsyncAPIResource):
|
|
|
372
372
|
) -> StorageListResponse:
|
|
373
373
|
"""List all shared volumes."""
|
|
374
374
|
return await self._get(
|
|
375
|
-
"/clusters/
|
|
375
|
+
"/compute/clusters/storage/volumes",
|
|
376
376
|
options=make_request_options(
|
|
377
377
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
378
378
|
),
|
|
@@ -407,7 +407,7 @@ class AsyncStorageResource(AsyncAPIResource):
|
|
|
407
407
|
if not volume_id:
|
|
408
408
|
raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
|
|
409
409
|
return await self._delete(
|
|
410
|
-
f"/clusters/
|
|
410
|
+
f"/compute/clusters/storage/volumes/{volume_id}",
|
|
411
411
|
options=make_request_options(
|
|
412
412
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
413
413
|
),
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .jig import (
|
|
4
|
+
JigResource,
|
|
5
|
+
AsyncJigResource,
|
|
6
|
+
JigResourceWithRawResponse,
|
|
7
|
+
AsyncJigResourceWithRawResponse,
|
|
8
|
+
JigResourceWithStreamingResponse,
|
|
9
|
+
AsyncJigResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .queue import (
|
|
12
|
+
QueueResource,
|
|
13
|
+
AsyncQueueResource,
|
|
14
|
+
QueueResourceWithRawResponse,
|
|
15
|
+
AsyncQueueResourceWithRawResponse,
|
|
16
|
+
QueueResourceWithStreamingResponse,
|
|
17
|
+
AsyncQueueResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .secrets import (
|
|
20
|
+
SecretsResource,
|
|
21
|
+
AsyncSecretsResource,
|
|
22
|
+
SecretsResourceWithRawResponse,
|
|
23
|
+
AsyncSecretsResourceWithRawResponse,
|
|
24
|
+
SecretsResourceWithStreamingResponse,
|
|
25
|
+
AsyncSecretsResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
from .volumes import (
|
|
28
|
+
VolumesResource,
|
|
29
|
+
AsyncVolumesResource,
|
|
30
|
+
VolumesResourceWithRawResponse,
|
|
31
|
+
AsyncVolumesResourceWithRawResponse,
|
|
32
|
+
VolumesResourceWithStreamingResponse,
|
|
33
|
+
AsyncVolumesResourceWithStreamingResponse,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"QueueResource",
|
|
38
|
+
"AsyncQueueResource",
|
|
39
|
+
"QueueResourceWithRawResponse",
|
|
40
|
+
"AsyncQueueResourceWithRawResponse",
|
|
41
|
+
"QueueResourceWithStreamingResponse",
|
|
42
|
+
"AsyncQueueResourceWithStreamingResponse",
|
|
43
|
+
"VolumesResource",
|
|
44
|
+
"AsyncVolumesResource",
|
|
45
|
+
"VolumesResourceWithRawResponse",
|
|
46
|
+
"AsyncVolumesResourceWithRawResponse",
|
|
47
|
+
"VolumesResourceWithStreamingResponse",
|
|
48
|
+
"AsyncVolumesResourceWithStreamingResponse",
|
|
49
|
+
"SecretsResource",
|
|
50
|
+
"AsyncSecretsResource",
|
|
51
|
+
"SecretsResourceWithRawResponse",
|
|
52
|
+
"AsyncSecretsResourceWithRawResponse",
|
|
53
|
+
"SecretsResourceWithStreamingResponse",
|
|
54
|
+
"AsyncSecretsResourceWithStreamingResponse",
|
|
55
|
+
"JigResource",
|
|
56
|
+
"AsyncJigResource",
|
|
57
|
+
"JigResourceWithRawResponse",
|
|
58
|
+
"AsyncJigResourceWithRawResponse",
|
|
59
|
+
"JigResourceWithStreamingResponse",
|
|
60
|
+
"AsyncJigResourceWithStreamingResponse",
|
|
61
|
+
]
|