sandboxplease 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.
@@ -0,0 +1,493 @@
1
+ """Generated by scripts/gen_capabilities.py from GET /v1/catalog/capabilities. Do not edit."""
2
+
3
+ # ruff: noqa: E501
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Literal, TypedDict
8
+
9
+ CapabilityGroup = Literal[
10
+ "lifecycle", "compute", "images", "data", "network", "interaction", "trust", "limits", "ops", "pricing"
11
+ ]
12
+ CapabilityId = Literal[
13
+ "pause",
14
+ "pause_keeps_memory",
15
+ "fork",
16
+ "snapshot",
17
+ "checkpoint",
18
+ "max_lifetime_s",
19
+ "idle_auto_stop",
20
+ "persistent_volumes",
21
+ "extend_timeout",
22
+ "vcpu",
23
+ "memory_gb",
24
+ "disk_gb",
25
+ "gpu",
26
+ "gpu_count",
27
+ "gpu_vram_gb",
28
+ "arch",
29
+ "os",
30
+ "root",
31
+ "docker",
32
+ "nested_virtualization",
33
+ "custom_image",
34
+ "templates",
35
+ "base_image",
36
+ "languages",
37
+ "volume_max_gb",
38
+ "secret_store",
39
+ "max_upload_mb",
40
+ "git_helpers",
41
+ "internet",
42
+ "egress_deny_all",
43
+ "egress_allowlist",
44
+ "ports",
45
+ "inbound_auth",
46
+ "static_ip",
47
+ "private_networking",
48
+ "ipv6",
49
+ "custom_domains",
50
+ "streaming_exec",
51
+ "pty",
52
+ "background_processes",
53
+ "file_watch",
54
+ "ssh",
55
+ "desktop",
56
+ "browser",
57
+ "code_interpreter",
58
+ "mobile_devices",
59
+ "isolation",
60
+ "regions",
61
+ "locations",
62
+ "eu_data_residency",
63
+ "soc2",
64
+ "iso27001",
65
+ "hipaa",
66
+ "dpa",
67
+ "data_retention_days",
68
+ "self_hosted",
69
+ "concurrency",
70
+ "create_rate",
71
+ "max_exec_timeout_s",
72
+ "metrics",
73
+ "logs",
74
+ "webhooks",
75
+ "log_streaming",
76
+ "uptime_sla",
77
+ "support",
78
+ "billing_granularity",
79
+ "billing_minimum_s",
80
+ "storage_price",
81
+ "egress_price",
82
+ "spot",
83
+ "free_tier",
84
+ ]
85
+ RequireName = Literal[
86
+ "pause",
87
+ "pause_keeps_memory",
88
+ "fork",
89
+ "snapshot",
90
+ "checkpoint",
91
+ "idle_auto_stop",
92
+ "persistent_volumes",
93
+ "extend_timeout",
94
+ "gpu",
95
+ "arch",
96
+ "os",
97
+ "root",
98
+ "docker",
99
+ "nested_virtualization",
100
+ "custom_image",
101
+ "templates",
102
+ "base_image",
103
+ "languages",
104
+ "secret_store",
105
+ "git_helpers",
106
+ "egress_deny_all",
107
+ "egress_allowlist",
108
+ "ports",
109
+ "inbound_auth",
110
+ "static_ip",
111
+ "private_networking",
112
+ "ipv6",
113
+ "custom_domains",
114
+ "streaming_exec",
115
+ "pty",
116
+ "background_processes",
117
+ "file_watch",
118
+ "ssh",
119
+ "desktop",
120
+ "browser",
121
+ "code_interpreter",
122
+ "mobile_devices",
123
+ "regions",
124
+ "locations",
125
+ "eu_data_residency",
126
+ "soc2",
127
+ "iso27001",
128
+ "hipaa",
129
+ "dpa",
130
+ "self_hosted",
131
+ "metrics",
132
+ "logs",
133
+ "webhooks",
134
+ "log_streaming",
135
+ "support",
136
+ "spot",
137
+ "free_tier",
138
+ "snapshots",
139
+ "internet",
140
+ "registries",
141
+ ]
142
+ """Names ``provider["require"]`` takes in its list form."""
143
+
144
+
145
+ class CapabilityRequirements(TypedDict, total=False):
146
+ """Capabilities a provider must have, by id: ``True``, a minimum, a value, or ``"any"``."""
147
+
148
+ pause: Literal[True]
149
+ """Pause and resume: Freeze a sandbox, stop paying for its compute, and resume it later."""
150
+ pause_keeps_memory: Literal[True]
151
+ """Pause keeps memory: A resumed sandbox gets its running processes and memory back, not only its files."""
152
+ fork: Literal[True]
153
+ """Fork: Copy a running sandbox, memory and processes included, into new sandboxes."""
154
+ snapshot: Literal[True]
155
+ """Snapshots: Save a running sandbox's filesystem and start new sandboxes from it."""
156
+ checkpoint: Literal[True]
157
+ """Checkpoint and restore: Roll the same sandbox back to an earlier saved state."""
158
+ max_lifetime_s: float
159
+ """Max lifetime: The longest a sandbox may run before the provider stops it. Minimum, in seconds."""
160
+ idle_auto_stop: Literal[True]
161
+ """Idle auto-stop: Stops or pauses a sandbox on its own once nothing uses it."""
162
+ persistent_volumes: Literal[True]
163
+ """Persistent volumes: Storage that outlives a sandbox and mounts into the next one."""
164
+ extend_timeout: Literal[True]
165
+ """Extend a running sandbox: Push back a running sandbox's deadline without restarting it."""
166
+ vcpu: float
167
+ """Max vCPU: The most vCPUs one sandbox gets through SandboxPlease. Minimum, in vCPUs."""
168
+ memory_gb: float
169
+ """Max memory: The most memory one sandbox gets through SandboxPlease. Minimum, in GB."""
170
+ disk_gb: float
171
+ """Disk: Writable disk in a sandbox at the largest size. Minimum, in GB."""
172
+ gpu: Literal[
173
+ "T4",
174
+ "L4",
175
+ "A10G",
176
+ "L40S",
177
+ "A100",
178
+ "H100",
179
+ "H200",
180
+ "B200",
181
+ "B300",
182
+ "MI355X",
183
+ "RTX 4000 SFF Ada",
184
+ "RTX A6000",
185
+ "RTX 4090",
186
+ "RTX 5090",
187
+ "RTX PRO 6000",
188
+ "any",
189
+ True,
190
+ ]
191
+ """GPU: GPU models a sandbox can attach. ``"any"`` (or ``true``) accepts any value."""
192
+ gpu_count: float
193
+ """Max GPUs: The most GPUs one sandbox gets through SandboxPlease. Minimum, in None."""
194
+ gpu_vram_gb: float
195
+ """Max GPU memory: The most memory one GPU has among those SandboxPlease attaches. Minimum, in GB."""
196
+ arch: Literal["x86_64", "arm64", "any", True]
197
+ """CPU architecture: Instruction sets a sandbox can run on. ``"any"`` (or ``true``) accepts any value."""
198
+ os: Literal["linux", "macos", "windows", "any", True]
199
+ """Operating system: Operating systems a sandbox can run. ``"any"`` (or ``true``) accepts any value."""
200
+ root: Literal[True]
201
+ """Root access: Commands can run as root or through passwordless sudo."""
202
+ docker: Literal[True]
203
+ """Docker inside: A Docker daemon runs inside the sandbox."""
204
+ nested_virtualization: Literal[True]
205
+ """Nested virtualization: KVM is available inside the sandbox, to run VMs or emulators."""
206
+ custom_image: Literal[True]
207
+ """Custom image: Start from your own OCI image or Dockerfile."""
208
+ templates: Literal[True]
209
+ """Saved templates: Build an environment once and start sandboxes from it by name."""
210
+ base_image: Literal[True]
211
+ """sandboxplease/base: Runs sandboxplease/base, the same tools on every provider."""
212
+ languages: Literal["python", "node", "bun", "deno", "go", "rust", "java", "ruby", "php", "any", True]
213
+ """Prebuilt languages: Runtimes ready when a sandbox starts: sandboxplease/base where the provider runs it, else its own image. ``"any"`` (or ``true``) accepts any value."""
214
+ volume_max_gb: float
215
+ """Max volume size: The largest persistent volume one sandbox can mount. Minimum, in GB."""
216
+ secret_store: Literal[True]
217
+ """Secret store: Secrets kept at the provider and injected into a sandbox when it starts."""
218
+ max_upload_mb: float
219
+ """Max file upload: The largest single file the provider's file API takes. Minimum, in mb."""
220
+ git_helpers: Literal[True]
221
+ """Git helpers: SDK or API calls to clone, commit and push with credentials."""
222
+ internet: Literal["open", "developer", "registries", "none", True]
223
+ """Internet by default: What a new sandbox reaches: the open internet; developer hosts (package and container registries, GitHub, Ubuntu, nodejs.org, the Playwright CDN); package registries only; or nothing. Ranked best first: asking for one accepts it or better. ``true`` means "open"."""
224
+ egress_deny_all: Literal[True]
225
+ """Block all egress: Cut a sandbox off from the internet at create."""
226
+ egress_allowlist: Literal[True]
227
+ """Egress allowlist: Let a sandbox reach only the domains or IP ranges you list."""
228
+ ports: Literal[True]
229
+ """Public ports: A public HTTPS URL reaches a port inside the sandbox."""
230
+ inbound_auth: Literal[True]
231
+ """Private preview URLs: Preview URLs can require a token, so only you reach the port."""
232
+ static_ip: Literal[True]
233
+ """Static egress IP: Outbound traffic leaves from a fixed IP you can allowlist."""
234
+ private_networking: Literal[True]
235
+ """Private networking: Sandboxes reach each other or your private network without the public internet."""
236
+ ipv6: Literal[True]
237
+ """IPv6: Sandboxes reach the internet over IPv6."""
238
+ custom_domains: Literal[True]
239
+ """Custom domains: Serve a sandbox's ports on your own domain."""
240
+ streaming_exec: Literal[True]
241
+ """Streaming output: Command output arrives as it is printed."""
242
+ pty: Literal[True]
243
+ """Terminal (PTY): An interactive terminal with a real TTY."""
244
+ background_processes: Literal[True]
245
+ """Background processes: A process keeps running after the command that started it returns."""
246
+ file_watch: Literal[True]
247
+ """File watching: Get notified when files in the sandbox change."""
248
+ ssh: Literal[True]
249
+ """SSH: Connect to the sandbox with an SSH client."""
250
+ desktop: Literal[True]
251
+ """Desktop (computer use): A graphical desktop reachable over VNC or a stream, for computer-use agents."""
252
+ browser: Literal[True]
253
+ """Browser: A headless or headed browser ready to drive inside or next to the sandbox."""
254
+ code_interpreter: Literal[True]
255
+ """Code interpreter: A Jupyter-style kernel that keeps state between runs and returns rich results."""
256
+ mobile_devices: Literal[True]
257
+ """Mobile devices: Attach Android and iOS devices to the sandbox. Only miniSandbox sandboxes take devices."""
258
+ isolation: Literal["microvm", "gvisor", "container"]
259
+ """Isolation: What separates your sandbox from others on the same machine, strongest first. Ranked best first: asking for one accepts it or better."""
260
+ regions: Literal["eu", "us", "any", True]
261
+ """Regions: Where sandboxes run. ``"any"`` (or ``true``) accepts any value."""
262
+ locations: str | Literal[True]
263
+ """Data centers: The cities sandboxes run in. ``"any"`` (or ``true``) accepts any value."""
264
+ eu_data_residency: Literal[True]
265
+ """EU data residency: Sandboxes and their data can be kept in the EU."""
266
+ soc2: Literal[True]
267
+ """SOC 2: Holds a SOC 2 Type II report."""
268
+ iso27001: Literal[True]
269
+ """ISO 27001: Certified ISO/IEC 27001."""
270
+ hipaa: Literal[True]
271
+ """HIPAA: Signs a business associate agreement for health data."""
272
+ dpa: Literal[True]
273
+ """DPA: Offers a GDPR data processing agreement."""
274
+ data_retention_days: float
275
+ """Data retention: How long the provider keeps a sandbox's data or logs after it ends. Minimum, in days."""
276
+ self_hosted: Literal[True]
277
+ """Self-hosted: Run the provider in your own cloud account or on premises."""
278
+ concurrency: float
279
+ """Concurrent sandboxes: How many sandboxes can run at once on the account SandboxPlease runs them on. Minimum, in sandboxes."""
280
+ create_rate: float
281
+ """Create rate: How many sandboxes the provider lets an account start per minute. Minimum, in per minute."""
282
+ max_exec_timeout_s: float
283
+ """Max command time: The longest one command may run. Minimum, in seconds."""
284
+ metrics: Literal[True]
285
+ """Resource metrics: CPU, memory and disk usage of a running sandbox."""
286
+ logs: Literal[True]
287
+ """Logs: The provider keeps a sandbox's logs to read later."""
288
+ webhooks: Literal[True]
289
+ """Lifecycle events: Webhooks or events when a sandbox starts, stops or fails."""
290
+ log_streaming: Literal[True]
291
+ """Live logs: Follow a sandbox's or a process's output live through the provider's API."""
292
+ uptime_sla: float
293
+ """Uptime SLA: The uptime the provider commits to in a contract; the note says on which plan. Minimum, in percent."""
294
+ support: Literal["community", "email", "chat", "dedicated", "any", True]
295
+ """Support: How you reach the provider: community forum or Discord, email, a shared chat channel, or a dedicated engineer. ``"any"`` (or ``true``) accepts any value."""
296
+ billing_granularity: Literal["second", "minute", "hour"]
297
+ """Billing granularity: The smallest unit compute is billed in. Ranked best first: asking for one accepts it or better."""
298
+ billing_minimum_s: float
299
+ """Minimum billed time: The shortest time a sandbox is billed for, even when it ran less. Minimum, in seconds."""
300
+ storage_price: float
301
+ """Storage price: List price of volumes, snapshots or disks that outlive a sandbox. Minimum, in usd_per_gb_month."""
302
+ egress_price: float
303
+ """Egress price: List price of outbound data transfer; 0 when it is included. Minimum, in usd_per_gb."""
304
+ spot: Literal[True]
305
+ """Spot capacity: Cheaper capacity the provider may interrupt."""
306
+ free_tier: Literal[True]
307
+ """Free tier: Free usage or credits for a new account at the provider, on your own provider key."""
308
+ snapshots: Literal[True]
309
+ """Same as ``snapshot``."""
310
+ registries: Literal[True]
311
+ """Same as ``internet: "registries"``: at least PyPI and npm."""
312
+
313
+
314
+ class CapabilityFact(TypedDict, total=False):
315
+ """One capability of one provider, with where it comes from and when it was last checked."""
316
+
317
+ value: object
318
+ """``None`` when unknown; the type of each capability is in ``CapabilityValues``."""
319
+ source: str
320
+ verified: Literal["live", "docs", "provider"]
321
+ """``live``: measured by SandboxPlease; ``docs``: the provider's documentation; ``provider``: the provider told us."""
322
+ checked_at: str
323
+ note: str
324
+
325
+
326
+ class CapabilityValues(TypedDict):
327
+ """The type of each capability's ``value``."""
328
+
329
+ pause: bool
330
+ pause_keeps_memory: bool
331
+ fork: bool
332
+ snapshot: bool
333
+ checkpoint: bool
334
+ max_lifetime_s: float
335
+ idle_auto_stop: bool
336
+ persistent_volumes: bool
337
+ extend_timeout: bool
338
+ vcpu: float
339
+ memory_gb: float
340
+ disk_gb: float
341
+ gpu: list[
342
+ Literal[
343
+ "T4",
344
+ "L4",
345
+ "A10G",
346
+ "L40S",
347
+ "A100",
348
+ "H100",
349
+ "H200",
350
+ "B200",
351
+ "B300",
352
+ "MI355X",
353
+ "RTX 4000 SFF Ada",
354
+ "RTX A6000",
355
+ "RTX 4090",
356
+ "RTX 5090",
357
+ "RTX PRO 6000",
358
+ ]
359
+ ]
360
+ gpu_count: float
361
+ gpu_vram_gb: float
362
+ arch: list[Literal["x86_64", "arm64"]]
363
+ os: list[Literal["linux", "macos", "windows"]]
364
+ root: bool
365
+ docker: bool
366
+ nested_virtualization: bool
367
+ custom_image: bool
368
+ templates: bool
369
+ base_image: bool
370
+ languages: list[Literal["python", "node", "bun", "deno", "go", "rust", "java", "ruby", "php"]]
371
+ volume_max_gb: float
372
+ secret_store: bool
373
+ max_upload_mb: float
374
+ git_helpers: bool
375
+ internet: Literal["open", "developer", "registries", "none"]
376
+ egress_deny_all: bool
377
+ egress_allowlist: bool
378
+ ports: bool
379
+ inbound_auth: bool
380
+ static_ip: bool
381
+ private_networking: bool
382
+ ipv6: bool
383
+ custom_domains: bool
384
+ streaming_exec: bool
385
+ pty: bool
386
+ background_processes: bool
387
+ file_watch: bool
388
+ ssh: bool
389
+ desktop: bool
390
+ browser: bool
391
+ code_interpreter: bool
392
+ mobile_devices: bool
393
+ isolation: Literal["microvm", "gvisor", "container"]
394
+ regions: list[Literal["eu", "us"]]
395
+ locations: list[str]
396
+ eu_data_residency: bool
397
+ soc2: bool
398
+ iso27001: bool
399
+ hipaa: bool
400
+ dpa: bool
401
+ data_retention_days: float
402
+ self_hosted: bool
403
+ concurrency: float
404
+ create_rate: float
405
+ max_exec_timeout_s: float
406
+ metrics: bool
407
+ logs: bool
408
+ webhooks: bool
409
+ log_streaming: bool
410
+ uptime_sla: float
411
+ support: list[Literal["community", "email", "chat", "dedicated"]]
412
+ billing_granularity: Literal["second", "minute", "hour"]
413
+ billing_minimum_s: float
414
+ storage_price: float
415
+ egress_price: float
416
+ spot: bool
417
+ free_tier: bool
418
+
419
+
420
+ class CatalogCapabilities(TypedDict):
421
+ """What a provider can do, by capability id."""
422
+
423
+ pause: CapabilityFact
424
+ pause_keeps_memory: CapabilityFact
425
+ fork: CapabilityFact
426
+ snapshot: CapabilityFact
427
+ checkpoint: CapabilityFact
428
+ max_lifetime_s: CapabilityFact
429
+ idle_auto_stop: CapabilityFact
430
+ persistent_volumes: CapabilityFact
431
+ extend_timeout: CapabilityFact
432
+ vcpu: CapabilityFact
433
+ memory_gb: CapabilityFact
434
+ disk_gb: CapabilityFact
435
+ gpu: CapabilityFact
436
+ gpu_count: CapabilityFact
437
+ gpu_vram_gb: CapabilityFact
438
+ arch: CapabilityFact
439
+ os: CapabilityFact
440
+ root: CapabilityFact
441
+ docker: CapabilityFact
442
+ nested_virtualization: CapabilityFact
443
+ custom_image: CapabilityFact
444
+ templates: CapabilityFact
445
+ base_image: CapabilityFact
446
+ languages: CapabilityFact
447
+ volume_max_gb: CapabilityFact
448
+ secret_store: CapabilityFact
449
+ max_upload_mb: CapabilityFact
450
+ git_helpers: CapabilityFact
451
+ internet: CapabilityFact
452
+ egress_deny_all: CapabilityFact
453
+ egress_allowlist: CapabilityFact
454
+ ports: CapabilityFact
455
+ inbound_auth: CapabilityFact
456
+ static_ip: CapabilityFact
457
+ private_networking: CapabilityFact
458
+ ipv6: CapabilityFact
459
+ custom_domains: CapabilityFact
460
+ streaming_exec: CapabilityFact
461
+ pty: CapabilityFact
462
+ background_processes: CapabilityFact
463
+ file_watch: CapabilityFact
464
+ ssh: CapabilityFact
465
+ desktop: CapabilityFact
466
+ browser: CapabilityFact
467
+ code_interpreter: CapabilityFact
468
+ mobile_devices: CapabilityFact
469
+ isolation: CapabilityFact
470
+ regions: CapabilityFact
471
+ locations: CapabilityFact
472
+ eu_data_residency: CapabilityFact
473
+ soc2: CapabilityFact
474
+ iso27001: CapabilityFact
475
+ hipaa: CapabilityFact
476
+ dpa: CapabilityFact
477
+ data_retention_days: CapabilityFact
478
+ self_hosted: CapabilityFact
479
+ concurrency: CapabilityFact
480
+ create_rate: CapabilityFact
481
+ max_exec_timeout_s: CapabilityFact
482
+ metrics: CapabilityFact
483
+ logs: CapabilityFact
484
+ webhooks: CapabilityFact
485
+ log_streaming: CapabilityFact
486
+ uptime_sla: CapabilityFact
487
+ support: CapabilityFact
488
+ billing_granularity: CapabilityFact
489
+ billing_minimum_s: CapabilityFact
490
+ storage_price: CapabilityFact
491
+ egress_price: CapabilityFact
492
+ spot: CapabilityFact
493
+ free_tier: CapabilityFact