guplet-sdk 1.0.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.
guplet/__init__.py ADDED
@@ -0,0 +1,42 @@
1
+ """Python SDK of the gup API (ARCHITECTURE.md D-23): create gups, run commands, reach ports.
2
+
3
+ import guplet
4
+ client = guplet.Client() # GUPLET_TOKEN or GUPLET_API_KEY_FILE; URL built in
5
+ with client.create(image="python:3.12-slim", ttl=600) as gup:
6
+ gup.wait() # Running
7
+ r = gup.run("python -c 'print(1+1)'") # ExecResult(stdout='2\\n', stderr='', exit_code=0)
8
+ gup.files.write("/tmp/hi.txt", "hello") # files: read/write/list/stat/remove/mkdir/rename/upload/download
9
+ p = gup.run("make build", background=True) # a background Process (D-62): output(), wait(), kill()
10
+ print(gup.port_url(8080))
11
+ """
12
+
13
+ from ._client import UPLOAD_PART_THRESHOLD, Client, Engines, ExecStream, Files, LogStream, Gup, Process, Processes, Secrets
14
+ from ._errors import (
15
+ Conflict,
16
+ ExecError,
17
+ ExecTimeout,
18
+ Forbidden,
19
+ Gone,
20
+ GupletError,
21
+ InsufficientCredits,
22
+ NotEnabled,
23
+ NotFound,
24
+ RateLimited,
25
+ ResizeRefused,
26
+ TeamLimit,
27
+ Unauthorized,
28
+ Unavailable,
29
+ )
30
+ from ._desktop import Desktop, DesktopStream
31
+ from ._types import Catalog, CatalogSize, DesktopStatus, EgressAuditRow, EgressInfo, Engine, ExecResult, FileEntry, JetsonState, LogLine, PowerMode, Profile, ProfilePool, Purpose, Resize, Secret, Snapshot, SSHCert, SSHInfo, Template, Thermal, Variant
32
+
33
+ __all__ = [
34
+ "Client", "Gup", "ExecStream", "ExecResult", "Files", "FileEntry", "LogStream", "LogLine", "Process", "Processes",
35
+ "UPLOAD_PART_THRESHOLD",
36
+ "Catalog", "CatalogSize", "Purpose", "Variant", "Desktop", "DesktopStream", "DesktopStatus", "Snapshot", "SSHCert", "SSHInfo", "Template",
37
+ "Profile", "ProfilePool", "PowerMode", "Thermal", "JetsonState", "Engine", "Engines",
38
+ "Secret", "Secrets", "EgressInfo", "EgressAuditRow",
39
+ "GupletError", "Unauthorized", "InsufficientCredits", "Forbidden", "NotFound", "Conflict", "Gone", "RateLimited", "TeamLimit",
40
+ "Unavailable", "NotEnabled", "ResizeRefused", "Resize",
41
+ "ExecError", "ExecTimeout",
42
+ ]