voltagegpu-cli 1.2.0__tar.gz → 1.2.1__tar.gz

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.
@@ -5,6 +5,50 @@ All notable changes to `voltagegpu-cli` are documented here.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.2.1] — 2026-04-11
9
+
10
+ Restores first-class access to the curated Confidential Compute template
11
+ catalog and the machines endpoint. 1.2.0 dropped them over-eagerly — the
12
+ upstream provider (Targon) ships ~20 public templates (Jupyter, Ubuntu,
13
+ DeepSeek-R1, GLM-4.6, Kimi-K2, Qwen3-Coder, MiniMax, GPT-OSS, etc.) and
14
+ this release lets the CLI surface them natively.
15
+
16
+ ### Added
17
+ - `volt templates list [--type RENTAL|SERVERLESS|ALL] [--json]` — list
18
+ public Targon Confidential Compute templates.
19
+ - `volt templates get <uid>` — show the full template manifest (image,
20
+ resource_name, commands, args, ports).
21
+ - `volt machines list [--json]` — list available Confidential GPU
22
+ machine tiers with live pricing (includes the 1.50x markup).
23
+ - `volt cc deploy --template <uid>` — deploy straight from a curated
24
+ template. `--resource` / `--image` become optional and override the
25
+ template manifest when supplied.
26
+ - Python SDK:
27
+ - `VoltageGPUClient.list_templates()` / `get_template(uid)`
28
+ - `VoltageGPUClient.list_machines()`
29
+ - `VoltageGPUClient.create_confidential_pod(template_uid=…)`
30
+ - New `Template` and `Machine` dataclasses exported from `volt.sdk`.
31
+
32
+ ### Changed
33
+ - `VoltageGPUClient.create_confidential_pod()` now accepts an optional
34
+ `template_uid`. When provided, `resource_name` and `image` become
35
+ optional and are inherited from the template manifest. Explicit
36
+ parameters still win to allow selective overrides.
37
+ - REST: `POST /api/volt/pods` now accepts an optional `template_uid`
38
+ alongside `provider: "targon"`. Template resolution is server-side
39
+ against the Targon `/tha/v2/templates` catalog.
40
+ - REST: `GET /api/volt/templates` and `GET /api/volt/templates/:uid`
41
+ now proxy the Targon catalog (public, curated, read-only). `POST` /
42
+ `PUT` / `DELETE` on these endpoints return 405.
43
+ - REST: `GET /api/volt/machines` now returns Confidential-only items
44
+ (Intel TDX / TVM-backed). Non-TDX tiers (RTX 4090) are excluded.
45
+ - REST: `GET /api/volt/pods` no longer merges in legacy Lium pods.
46
+
47
+ ### Fixed
48
+ - Pod name is now sanitised server-side to Targon's
49
+ `^[a-z0-9-]+$` pattern. Previously `volt cc deploy --name My Pod`
50
+ would reach the upstream unsanitised and 400 on create.
51
+
8
52
  ## [1.2.0] — 2026-04-11
9
53
 
10
54
  This release realigns the CLI with the VoltageGPU product: **Confidential
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voltagegpu-cli
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: VoltageGPU CLI — Deploy and manage Confidential Compute (Intel TDX) GPU pods from the command line.
5
5
  Project-URL: Homepage, https://voltagegpu.com
6
6
  Project-URL: Documentation, https://docs.voltagegpu.com
@@ -101,11 +101,35 @@ volt pods delete <pod_id>
101
101
  ### Confidential Compute
102
102
 
103
103
  ```bash
104
- volt cc inventory # list available GPU tiers + prices
105
- volt cc deploy --name NAME \ # deploy a pod
104
+ # List available GPU tiers with live pricing and availability.
105
+ volt cc inventory
106
+
107
+ # Option A — deploy from scratch with an explicit image + resource.
108
+ volt cc deploy --name NAME \
106
109
  --resource TIER \
107
110
  --image ubuntu:22.04 \
108
111
  [--ssh-key <uid>]
112
+
113
+ # Option B — deploy from a curated template (image + resource come
114
+ # from the template manifest; you can still override either).
115
+ volt cc deploy --name NAME --template <tpl-uid>
116
+ ```
117
+
118
+ ### Templates
119
+
120
+ ```bash
121
+ # List curated templates (Jupyter, DeepSeek, GLM, Kimi, Qwen3, …).
122
+ volt templates list [--type RENTAL|SERVERLESS|ALL] [--json]
123
+
124
+ # Show the full manifest for a single template.
125
+ volt templates get <tpl-uid>
126
+ ```
127
+
128
+ ### Machines
129
+
130
+ ```bash
131
+ # List Confidential GPU machine tiers with live pricing.
132
+ volt machines list [--json]
109
133
  ```
110
134
 
111
135
  ### Pods
@@ -146,12 +170,21 @@ with VoltageGPUClient() as client:
146
170
  for item in client.list_confidential_inventory():
147
171
  print(item["display_name"], item["final_price_per_hour"])
148
172
 
149
- # Deploy a pod
173
+ # Browse templates (Jupyter, DeepSeek-R1, GLM-4.6, Kimi, Qwen3-Coder…)
174
+ for tpl in client.list_templates():
175
+ print(tpl.uid, tpl.name, tpl.resource_name)
176
+
177
+ # Deploy a pod — either from an explicit image/resource…
150
178
  result = client.create_confidential_pod(
151
179
  name="training-run",
152
180
  resource_name="h200-small",
153
181
  image="ubuntu:22.04",
154
182
  )
183
+ # …or from a curated template uid.
184
+ result = client.create_confidential_pod(
185
+ name="deepseek-infer",
186
+ template_uid="tpl-5npuuq70m1uo", # DeepSeek-R1 (8x H200)
187
+ )
155
188
  pod = result["pod"]
156
189
  print(f"Deployed {pod['targonUid']} — {pod['ssh_command']}")
157
190
 
@@ -64,11 +64,35 @@ volt pods delete <pod_id>
64
64
  ### Confidential Compute
65
65
 
66
66
  ```bash
67
- volt cc inventory # list available GPU tiers + prices
68
- volt cc deploy --name NAME \ # deploy a pod
67
+ # List available GPU tiers with live pricing and availability.
68
+ volt cc inventory
69
+
70
+ # Option A — deploy from scratch with an explicit image + resource.
71
+ volt cc deploy --name NAME \
69
72
  --resource TIER \
70
73
  --image ubuntu:22.04 \
71
74
  [--ssh-key <uid>]
75
+
76
+ # Option B — deploy from a curated template (image + resource come
77
+ # from the template manifest; you can still override either).
78
+ volt cc deploy --name NAME --template <tpl-uid>
79
+ ```
80
+
81
+ ### Templates
82
+
83
+ ```bash
84
+ # List curated templates (Jupyter, DeepSeek, GLM, Kimi, Qwen3, …).
85
+ volt templates list [--type RENTAL|SERVERLESS|ALL] [--json]
86
+
87
+ # Show the full manifest for a single template.
88
+ volt templates get <tpl-uid>
89
+ ```
90
+
91
+ ### Machines
92
+
93
+ ```bash
94
+ # List Confidential GPU machine tiers with live pricing.
95
+ volt machines list [--json]
72
96
  ```
73
97
 
74
98
  ### Pods
@@ -109,12 +133,21 @@ with VoltageGPUClient() as client:
109
133
  for item in client.list_confidential_inventory():
110
134
  print(item["display_name"], item["final_price_per_hour"])
111
135
 
112
- # Deploy a pod
136
+ # Browse templates (Jupyter, DeepSeek-R1, GLM-4.6, Kimi, Qwen3-Coder…)
137
+ for tpl in client.list_templates():
138
+ print(tpl.uid, tpl.name, tpl.resource_name)
139
+
140
+ # Deploy a pod — either from an explicit image/resource…
113
141
  result = client.create_confidential_pod(
114
142
  name="training-run",
115
143
  resource_name="h200-small",
116
144
  image="ubuntu:22.04",
117
145
  )
146
+ # …or from a curated template uid.
147
+ result = client.create_confidential_pod(
148
+ name="deepseek-infer",
149
+ template_uid="tpl-5npuuq70m1uo", # DeepSeek-R1 (8x H200)
150
+ )
118
151
  pod = result["pod"]
119
152
  print(f"Deployed {pod['targonUid']} — {pod['ssh_command']}")
120
153
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "voltagegpu-cli"
7
- version = "1.2.0"
7
+ version = "1.2.1"
8
8
  description = "VoltageGPU CLI — Deploy and manage Confidential Compute (Intel TDX) GPU pods from the command line."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -0,0 +1,6 @@
1
+ """VoltageGPU — Confidential AI Infrastructure CLI and SDK."""
2
+
3
+ from volt.sdk import Config, Machine, Pod, SSHKey, Template, VoltageGPUClient
4
+
5
+ __all__ = ["VoltageGPUClient", "Config", "Pod", "SSHKey", "Template", "Machine"]
6
+ __version__ = "1.2.1"
@@ -11,7 +11,7 @@ from rich.table import Table
11
11
 
12
12
  from volt.sdk import Config, VoltageGPUClient
13
13
 
14
- __version__ = "1.2.0"
14
+ __version__ = "1.2.1"
15
15
 
16
16
  console = Console()
17
17
 
@@ -113,10 +113,17 @@ def cc_inventory(as_json: bool) -> None:
113
113
  @click.option("--name", required=True, help="Pod name")
114
114
  @click.option(
115
115
  "--resource",
116
- required=True,
117
- help="Resource tier (e.g. h200-small, b200-medium)",
116
+ help="Resource tier (e.g. h200-small, b200-medium). Required unless --template is provided.",
117
+ )
118
+ @click.option(
119
+ "--image",
120
+ help="Docker image. Required unless --template is provided; overrides the template image when both are set.",
121
+ )
122
+ @click.option(
123
+ "--template",
124
+ "template_uid",
125
+ help="Curated template uid (see `volt templates list`). Inherits image + resource from the manifest.",
118
126
  )
119
- @click.option("--image", default="ubuntu:22.04", help="Docker image")
120
127
  @click.option(
121
128
  "--ssh-key",
122
129
  "ssh_key_uids",
@@ -125,22 +132,35 @@ def cc_inventory(as_json: bool) -> None:
125
132
  )
126
133
  def cc_deploy(
127
134
  name: str,
128
- resource: str,
129
- image: str,
135
+ resource: Optional[str],
136
+ image: Optional[str],
137
+ template_uid: Optional[str],
130
138
  ssh_key_uids: tuple,
131
139
  ) -> None:
132
140
  """Deploy a new Confidential Compute pod."""
141
+ if not template_uid and not (resource and image):
142
+ console.print(
143
+ "[red]Error:[/red] provide either [cyan]--template[/cyan] or both "
144
+ "[cyan]--resource[/cyan] and [cyan]--image[/cyan]."
145
+ )
146
+ sys.exit(2)
147
+
133
148
  with get_client() as client:
134
149
  console.print("[bold]Deploying Confidential Compute pod...[/bold]")
135
150
  console.print(f" Name: {name}")
136
- console.print(f" Resource: {resource}")
137
- console.print(f" Image: {image}")
151
+ if template_uid:
152
+ console.print(f" Template: {template_uid}")
153
+ if resource:
154
+ console.print(f" Resource: {resource}")
155
+ if image:
156
+ console.print(f" Image: {image}")
138
157
 
139
158
  try:
140
159
  result = client.create_confidential_pod(
141
160
  name=name,
142
161
  resource_name=resource,
143
162
  image=image,
163
+ template_uid=template_uid,
144
164
  ssh_key_uids=list(ssh_key_uids) if ssh_key_uids else None,
145
165
  )
146
166
  except Exception as exc:
@@ -158,10 +178,160 @@ def cc_deploy(
158
178
  console.print(f" ID: {pod.get('targonUid', pod.get('id', 'N/A'))}")
159
179
  console.print(f" Status: {pod.get('status', 'N/A')}")
160
180
  console.print(f" Price: ${float(pod.get('hourlyPrice', 0)):.2f}/hr")
181
+ if pod.get("resource_name"):
182
+ console.print(f" Resource: {pod.get('resource_name')}")
183
+ if pod.get("image"):
184
+ console.print(f" Image: {pod.get('image')}")
161
185
  if pod.get("ssh_command"):
162
186
  console.print(f" SSH: {pod['ssh_command']}")
163
187
 
164
188
 
189
+ # ==================== TEMPLATES ====================
190
+
191
+
192
+ @cli.group()
193
+ def templates() -> None:
194
+ """Browse curated Confidential Compute templates (Jupyter, DeepSeek, GLM, Kimi, Qwen3…)."""
195
+
196
+
197
+ @templates.command("list")
198
+ @click.option("--json", "as_json", is_flag=True, help="Output as JSON")
199
+ @click.option(
200
+ "--type",
201
+ "type_filter",
202
+ type=click.Choice(["RENTAL", "SERVERLESS", "ALL"], case_sensitive=False),
203
+ default="ALL",
204
+ help="Filter by template type",
205
+ )
206
+ def templates_list(as_json: bool, type_filter: str) -> None:
207
+ """List curated templates."""
208
+ with get_client() as client:
209
+ tpls = client.list_templates()
210
+ if type_filter.upper() != "ALL":
211
+ tpls = [t for t in tpls if t.type.upper() == type_filter.upper()]
212
+
213
+ if as_json:
214
+ click.echo(
215
+ json.dumps(
216
+ [
217
+ {
218
+ "uid": t.uid,
219
+ "name": t.name,
220
+ "description": t.description,
221
+ "type": t.type,
222
+ "image": t.image,
223
+ "resource_name": t.resource_name,
224
+ }
225
+ for t in tpls
226
+ ],
227
+ indent=2,
228
+ )
229
+ )
230
+ return
231
+
232
+ if not tpls:
233
+ console.print("[yellow]No templates available.[/yellow]")
234
+ return
235
+
236
+ table = Table(title="Confidential Compute Templates")
237
+ table.add_column("UID", style="cyan", overflow="fold")
238
+ table.add_column("Name", style="green")
239
+ table.add_column("Type", style="bold", justify="center")
240
+ table.add_column("Resource", style="magenta")
241
+ table.add_column("Image", style="dim", overflow="fold", max_width=40)
242
+
243
+ for t in tpls:
244
+ table.add_row(t.uid, t.name, t.type, t.resource_name or "-", t.image or "-")
245
+ console.print(table)
246
+ console.print(
247
+ "\n[dim]Deploy a template with:[/dim] "
248
+ "[cyan]volt cc deploy --name MY-POD --template TPL-UID[/cyan]"
249
+ )
250
+
251
+
252
+ @templates.command("get")
253
+ @click.argument("uid")
254
+ def templates_get(uid: str) -> None:
255
+ """Show the full manifest of a template."""
256
+ with get_client() as client:
257
+ try:
258
+ t = client.get_template(uid)
259
+ except Exception as exc:
260
+ console.print(f"[red]Error:[/red] {exc}")
261
+ sys.exit(1)
262
+
263
+ lines = [
264
+ f"[cyan]UID:[/cyan] {t.uid}",
265
+ f"[cyan]Name:[/cyan] {t.name}",
266
+ f"[cyan]Type:[/cyan] {t.type}",
267
+ f"[cyan]Resource:[/cyan] {t.resource_name or '-'}",
268
+ f"[cyan]Image:[/cyan] {t.image or '-'}",
269
+ ]
270
+ if t.description:
271
+ lines.append(f"[cyan]Description:[/cyan] {t.description}")
272
+ console.print(Panel("\n".join(lines), title=f"Template: {t.name}", border_style="green"))
273
+
274
+ if t.manifest:
275
+ console.print("\n[dim]Full manifest:[/dim]")
276
+ click.echo(json.dumps(t.manifest, indent=2))
277
+
278
+
279
+ # ==================== MACHINES ====================
280
+
281
+
282
+ @cli.group()
283
+ def machines() -> None:
284
+ """Browse available Confidential GPU machines with live pricing."""
285
+
286
+
287
+ @machines.command("list")
288
+ @click.option("--json", "as_json", is_flag=True, help="Output as JSON")
289
+ def machines_list(as_json: bool) -> None:
290
+ """List available Confidential GPU machines."""
291
+ with get_client() as client:
292
+ items = client.list_machines()
293
+
294
+ if as_json:
295
+ click.echo(
296
+ json.dumps(
297
+ [
298
+ {
299
+ "name": m.name,
300
+ "resource_name": m.resource_name,
301
+ "gpu_type": m.gpu_type,
302
+ "gpu_count": m.gpu_count,
303
+ "price": m.price,
304
+ "total_gpu_count": m.total_gpu_count,
305
+ }
306
+ for m in items
307
+ ],
308
+ indent=2,
309
+ )
310
+ )
311
+ return
312
+
313
+ if not items:
314
+ console.print("[yellow]No machines available.[/yellow]")
315
+ return
316
+
317
+ table = Table(title="Confidential GPU Machines")
318
+ table.add_column("Resource", style="cyan")
319
+ table.add_column("GPU", style="magenta")
320
+ table.add_column("GPUs", justify="center")
321
+ table.add_column("$/hr", style="yellow", justify="right")
322
+ table.add_column("Available", style="green", justify="center")
323
+
324
+ for m in items:
325
+ table.add_row(
326
+ m.resource_name,
327
+ m.gpu_type,
328
+ str(m.gpu_count),
329
+ f"${m.price:.2f}",
330
+ str(m.total_gpu_count),
331
+ )
332
+ console.print(table)
333
+
334
+
165
335
  # ==================== PODS ====================
166
336
 
167
337
 
@@ -0,0 +1,7 @@
1
+ """VoltageGPU SDK — Confidential Compute Python client."""
2
+
3
+ from .client import Machine, Pod, SSHKey, Template, VoltageGPUClient
4
+ from .config import Config
5
+
6
+ __all__ = ["Config", "VoltageGPUClient", "Pod", "SSHKey", "Template", "Machine"]
7
+ __version__ = "1.2.1"
@@ -1,13 +1,13 @@
1
1
  """VoltageGPU SDK client — Confidential Compute (Intel TDX)."""
2
2
 
3
- from dataclasses import dataclass
3
+ from dataclasses import dataclass, field
4
4
  from typing import Any, Dict, List, Optional
5
5
 
6
6
  import httpx
7
7
 
8
8
  from .config import Config
9
9
 
10
- __version__ = "1.2.0"
10
+ __version__ = "1.2.1"
11
11
 
12
12
 
13
13
  @dataclass
@@ -39,6 +39,36 @@ class SSHKey:
39
39
  created_at: Optional[str] = None
40
40
 
41
41
 
42
+ @dataclass
43
+ class Template:
44
+ """Represents a curated Confidential Compute template."""
45
+
46
+ uid: str
47
+ name: str
48
+ description: str
49
+ type: str # "RENTAL" | "SERVERLESS"
50
+ image: str
51
+ resource_name: str
52
+ manifest: Optional[Dict[str, Any]] = None
53
+
54
+
55
+ @dataclass
56
+ class Machine:
57
+ """Represents an available Confidential GPU machine tier."""
58
+
59
+ name: str
60
+ resource_name: str
61
+ gpu_type: str
62
+ gpu_count: int
63
+ price: float
64
+ base_price: float
65
+ total_gpu_count: int
66
+ vcpu: Optional[int] = None
67
+ memory: Optional[int] = None
68
+ provider: str = "targon"
69
+ confidential_compute: bool = True
70
+
71
+
42
72
  def _as_list(data: Any) -> List[Dict[str, Any]]:
43
73
  """Normalize an API response to a list of dicts."""
44
74
  if isinstance(data, list):
@@ -105,7 +135,7 @@ class VoltageGPUClient:
105
135
  # ==================== CONFIDENTIAL COMPUTE ====================
106
136
 
107
137
  def list_confidential_inventory(self) -> List[Dict[str, Any]]:
108
- """List available Confidential Compute GPU tiers."""
138
+ """List available Confidential Compute GPU tiers (raw Targon shape)."""
109
139
  response = self._client.get("/targon/inventory")
110
140
  response.raise_for_status()
111
141
  data = response.json()
@@ -116,27 +146,38 @@ class VoltageGPUClient:
116
146
  def create_confidential_pod(
117
147
  self,
118
148
  name: str,
119
- resource_name: str,
120
- image: str = "ubuntu:22.04",
121
- cost_per_hour: float = 0,
149
+ resource_name: Optional[str] = None,
150
+ image: Optional[str] = None,
151
+ template_uid: Optional[str] = None,
122
152
  ssh_key_uids: Optional[List[str]] = None,
123
153
  ) -> Dict[str, Any]:
124
154
  """Deploy a Confidential Compute pod.
125
155
 
156
+ Provide either:
157
+ - a curated ``template_uid`` (image and resource come from the
158
+ Targon template manifest), optionally overriding ``image`` or
159
+ ``resource_name`` to customise the deploy, OR
160
+ - an explicit ``resource_name`` + ``image`` pair.
161
+
126
162
  Args:
127
163
  name: Pod name.
128
- resource_name: Resource tier (e.g. "h200-small", "b200-medium").
129
- image: Docker image (default "ubuntu:22.04").
130
- cost_per_hour: Raw provider cost; server computes the final price.
131
- ssh_key_uids: Optional list of SSH key uids to attach.
164
+ resource_name: Resource tier (e.g. "h200-small").
165
+ image: Docker image (e.g. "ubuntu:22.04").
166
+ template_uid: Curated Targon template uid (e.g. "tpl-...").
167
+ ssh_key_uids: Optional Targon SSH key uids to attach.
132
168
  """
133
- payload: Dict[str, Any] = {
134
- "provider": "targon",
135
- "name": name,
136
- "resource_name": resource_name,
137
- "image": image,
138
- "cost_per_hour": cost_per_hour,
139
- }
169
+ if not template_uid and not (resource_name and image):
170
+ raise ValueError(
171
+ "create_confidential_pod requires either template_uid or both resource_name and image"
172
+ )
173
+
174
+ payload: Dict[str, Any] = {"provider": "targon", "name": name}
175
+ if template_uid:
176
+ payload["template_uid"] = template_uid
177
+ if resource_name:
178
+ payload["resource_name"] = resource_name
179
+ if image:
180
+ payload["image"] = image
140
181
  if ssh_key_uids:
141
182
  payload["ssh_key_uids"] = ssh_key_uids
142
183
 
@@ -163,6 +204,63 @@ class VoltageGPUClient:
163
204
  confidential_compute=bool(data.get("confidential_compute", True)),
164
205
  )
165
206
 
207
+ # ==================== TEMPLATES ====================
208
+
209
+ def list_templates(self) -> List[Template]:
210
+ """List curated Confidential Compute templates."""
211
+ response = self._client.get("/volt/templates")
212
+ response.raise_for_status()
213
+ data = response.json()
214
+ items = data.get("items", []) if isinstance(data, dict) else data
215
+ return [self._parse_template(t) for t in items]
216
+
217
+ def get_template(self, uid: str) -> Template:
218
+ """Fetch a single template by uid (includes the full manifest)."""
219
+ response = self._client.get(f"/volt/templates/{uid}")
220
+ response.raise_for_status()
221
+ data = response.json()
222
+ tpl = data.get("template", data) if isinstance(data, dict) else data
223
+ return self._parse_template(tpl)
224
+
225
+ def _parse_template(self, data: Dict[str, Any]) -> Template:
226
+ manifest = data.get("manifest") or {}
227
+ return Template(
228
+ uid=str(data.get("uid", "")),
229
+ name=str(data.get("name", "")),
230
+ description=str(data.get("description", "")),
231
+ type=str(data.get("type") or manifest.get("type") or "RENTAL"),
232
+ image=str(data.get("image") or manifest.get("image") or ""),
233
+ resource_name=str(
234
+ data.get("resource_name") or manifest.get("resource_name") or ""
235
+ ),
236
+ manifest=manifest if manifest else None,
237
+ )
238
+
239
+ # ==================== MACHINES ====================
240
+
241
+ def list_machines(self) -> List[Machine]:
242
+ """List available Confidential GPU machines with live pricing."""
243
+ response = self._client.get("/volt/machines")
244
+ response.raise_for_status()
245
+ data = response.json()
246
+ items = data if isinstance(data, list) else _as_list(data)
247
+ return [self._parse_machine(m) for m in items]
248
+
249
+ def _parse_machine(self, data: Dict[str, Any]) -> Machine:
250
+ return Machine(
251
+ name=str(data.get("name", "")),
252
+ resource_name=str(data.get("resource_name", "")),
253
+ gpu_type=str(data.get("gpu_type", "")),
254
+ gpu_count=int(data.get("gpu_count", 1) or 1),
255
+ price=float(data.get("price", 0) or 0),
256
+ base_price=float(data.get("base_price", 0) or 0),
257
+ total_gpu_count=int(data.get("total_gpu_count", 0) or 0),
258
+ vcpu=data.get("vcpu"),
259
+ memory=data.get("memory"),
260
+ provider=str(data.get("provider", "targon")),
261
+ confidential_compute=bool(data.get("confidential_compute", True)),
262
+ )
263
+
166
264
  # ==================== SSH KEYS ====================
167
265
 
168
266
  def list_ssh_keys(self) -> List[SSHKey]:
@@ -212,4 +310,4 @@ class VoltageGPUClient:
212
310
  return response.json()
213
311
 
214
312
 
215
- __all__ = ["VoltageGPUClient", "Pod", "SSHKey"]
313
+ __all__ = ["VoltageGPUClient", "Pod", "SSHKey", "Template", "Machine"]
@@ -1,6 +0,0 @@
1
- """VoltageGPU — Confidential AI Infrastructure CLI and SDK."""
2
-
3
- from volt.sdk import Config, Pod, SSHKey, VoltageGPUClient
4
-
5
- __all__ = ["VoltageGPUClient", "Config", "Pod", "SSHKey"]
6
- __version__ = "1.2.0"
@@ -1,7 +0,0 @@
1
- """VoltageGPU SDK — Confidential Compute Python client."""
2
-
3
- from .client import Pod, SSHKey, VoltageGPUClient
4
- from .config import Config
5
-
6
- __all__ = ["Config", "VoltageGPUClient", "Pod", "SSHKey"]
7
- __version__ = "1.2.0"
File without changes