wheelmachine 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.
Potentially problematic release.
This version of wheelmachine might be problematic. Click here for more details.
- wheelmachine/__init__.py +230 -0
- wheelmachine/_client.py +550 -0
- wheelmachine/_errors.py +215 -0
- wheelmachine/_http.py +418 -0
- wheelmachine/_login.py +126 -0
- wheelmachine/_models.py +1987 -0
- wheelmachine/_pagination.py +36 -0
- wheelmachine/_resources.py +1323 -0
- wheelmachine/_version.py +3 -0
- wheelmachine/py.typed +0 -0
- wheelmachine-0.1.0.dist-info/METADATA +253 -0
- wheelmachine-0.1.0.dist-info/RECORD +15 -0
- wheelmachine-0.1.0.dist-info/WHEEL +4 -0
- wheelmachine-0.1.0.dist-info/licenses/LICENSE +202 -0
- wheelmachine-0.1.0.dist-info/licenses/NOTICE +4 -0
wheelmachine/__init__.py
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"""The Wheelmachine API, from Python: machines for agents and people, by the second.
|
|
2
|
+
|
|
3
|
+
from wheelmachine import Wheelmachine
|
|
4
|
+
|
|
5
|
+
client = Wheelmachine() # the key from WHEELMACHINE_API_KEY
|
|
6
|
+
machine = client.machines.create(name="build")
|
|
7
|
+
print(client.machines.exec(machine.id, shell="uname -a").stdout)
|
|
8
|
+
client.machines.delete(machine.id)
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from ._client import DEFAULT_BASE_URL, Wheelmachine
|
|
12
|
+
from ._login import DeviceLogin
|
|
13
|
+
from ._errors import (
|
|
14
|
+
APIConnectionError,
|
|
15
|
+
APITimeoutError,
|
|
16
|
+
AuthenticationError,
|
|
17
|
+
BadRequestError,
|
|
18
|
+
ConflictError,
|
|
19
|
+
InternalServerError,
|
|
20
|
+
NotFoundError,
|
|
21
|
+
PaymentRequiredError,
|
|
22
|
+
PermissionDeniedError,
|
|
23
|
+
RateLimitError,
|
|
24
|
+
UnavailableError,
|
|
25
|
+
WaitTimeoutError,
|
|
26
|
+
WheelmachineError,
|
|
27
|
+
)
|
|
28
|
+
from ._models import (
|
|
29
|
+
Account,
|
|
30
|
+
Agent,
|
|
31
|
+
AgentList,
|
|
32
|
+
AllowedModels,
|
|
33
|
+
AgentSupplier,
|
|
34
|
+
APIObject,
|
|
35
|
+
App,
|
|
36
|
+
AppKind,
|
|
37
|
+
AuditEvent,
|
|
38
|
+
AuditPerson,
|
|
39
|
+
Backup,
|
|
40
|
+
CreditBalance,
|
|
41
|
+
CreditCheckout,
|
|
42
|
+
CreditEntry,
|
|
43
|
+
CreditEntryKind,
|
|
44
|
+
CreditPurchase,
|
|
45
|
+
ExecResult,
|
|
46
|
+
GpuList,
|
|
47
|
+
GpuOffer,
|
|
48
|
+
GpuRef,
|
|
49
|
+
HeldBy,
|
|
50
|
+
Key,
|
|
51
|
+
KeyCreated,
|
|
52
|
+
KeyState,
|
|
53
|
+
Level,
|
|
54
|
+
Location,
|
|
55
|
+
Machine,
|
|
56
|
+
MachineMetrics,
|
|
57
|
+
MachineRequest,
|
|
58
|
+
MachineState,
|
|
59
|
+
MetricsPoint,
|
|
60
|
+
Me,
|
|
61
|
+
Model,
|
|
62
|
+
ModelIntelligence,
|
|
63
|
+
ModelList,
|
|
64
|
+
ModelPrice,
|
|
65
|
+
ModelSupplier,
|
|
66
|
+
NetworkPolicy,
|
|
67
|
+
Org,
|
|
68
|
+
ConfirmCodeSent,
|
|
69
|
+
Origin,
|
|
70
|
+
PauseReason,
|
|
71
|
+
Person,
|
|
72
|
+
PersonLimits,
|
|
73
|
+
PersonName,
|
|
74
|
+
Port,
|
|
75
|
+
PortLink,
|
|
76
|
+
Project,
|
|
77
|
+
RateLimit,
|
|
78
|
+
Code,
|
|
79
|
+
CodeConnection,
|
|
80
|
+
CodeGrant,
|
|
81
|
+
FolderEntry,
|
|
82
|
+
FolderGrant,
|
|
83
|
+
FolderList,
|
|
84
|
+
FolderListing,
|
|
85
|
+
FolderTrash,
|
|
86
|
+
SharedFolder,
|
|
87
|
+
Region,
|
|
88
|
+
RequestMachine,
|
|
89
|
+
RequestState,
|
|
90
|
+
ResponseInfo,
|
|
91
|
+
Role,
|
|
92
|
+
RuleWay,
|
|
93
|
+
Scope,
|
|
94
|
+
Secret,
|
|
95
|
+
SecretPreset,
|
|
96
|
+
HeaderRule,
|
|
97
|
+
Outside,
|
|
98
|
+
Size,
|
|
99
|
+
Standing,
|
|
100
|
+
TeamRules,
|
|
101
|
+
AccountLimit,
|
|
102
|
+
LimitNear,
|
|
103
|
+
PersonLimit,
|
|
104
|
+
TeamLimit,
|
|
105
|
+
Usage,
|
|
106
|
+
UsageLimits,
|
|
107
|
+
UsageLine,
|
|
108
|
+
WaitingOn,
|
|
109
|
+
)
|
|
110
|
+
from ._pagination import PageIterator
|
|
111
|
+
from ._resources import (SECRET_VALUE_MAX, Agents, Apps, Audit, Credit, FileData, Keys, Machines, Models, Orgs, Ports,
|
|
112
|
+
Projects, Requests, Secrets)
|
|
113
|
+
from ._version import __version__
|
|
114
|
+
|
|
115
|
+
__all__ = [
|
|
116
|
+
"__version__",
|
|
117
|
+
"DEFAULT_BASE_URL",
|
|
118
|
+
"Wheelmachine",
|
|
119
|
+
"DeviceLogin",
|
|
120
|
+
"Machines",
|
|
121
|
+
"Ports",
|
|
122
|
+
"Apps",
|
|
123
|
+
"Projects",
|
|
124
|
+
"Keys",
|
|
125
|
+
"Secrets",
|
|
126
|
+
"Models",
|
|
127
|
+
"Agents",
|
|
128
|
+
"Orgs",
|
|
129
|
+
"Requests",
|
|
130
|
+
"Audit",
|
|
131
|
+
"Credit",
|
|
132
|
+
"SECRET_VALUE_MAX",
|
|
133
|
+
"PageIterator",
|
|
134
|
+
"FileData",
|
|
135
|
+
# errors
|
|
136
|
+
"WheelmachineError",
|
|
137
|
+
"APIConnectionError",
|
|
138
|
+
"APITimeoutError",
|
|
139
|
+
"BadRequestError",
|
|
140
|
+
"AuthenticationError",
|
|
141
|
+
"PaymentRequiredError",
|
|
142
|
+
"PermissionDeniedError",
|
|
143
|
+
"NotFoundError",
|
|
144
|
+
"WaitTimeoutError",
|
|
145
|
+
"ConflictError",
|
|
146
|
+
"RateLimitError",
|
|
147
|
+
"InternalServerError",
|
|
148
|
+
"UnavailableError",
|
|
149
|
+
# what the API answers with
|
|
150
|
+
"APIObject",
|
|
151
|
+
"ResponseInfo",
|
|
152
|
+
"RateLimit",
|
|
153
|
+
"MachineState",
|
|
154
|
+
"Scope",
|
|
155
|
+
"KeyState",
|
|
156
|
+
"Role",
|
|
157
|
+
"Level",
|
|
158
|
+
"RuleWay",
|
|
159
|
+
"RequestState",
|
|
160
|
+
"Account",
|
|
161
|
+
"Person",
|
|
162
|
+
"PersonName",
|
|
163
|
+
"PersonLimits",
|
|
164
|
+
"HeldBy",
|
|
165
|
+
"Standing",
|
|
166
|
+
"Key",
|
|
167
|
+
"KeyCreated",
|
|
168
|
+
"ConfirmCodeSent",
|
|
169
|
+
"Me",
|
|
170
|
+
"Org",
|
|
171
|
+
"AuditPerson",
|
|
172
|
+
"AuditEvent",
|
|
173
|
+
"NetworkPolicy",
|
|
174
|
+
"Project",
|
|
175
|
+
"GpuRef",
|
|
176
|
+
"Size",
|
|
177
|
+
"Location",
|
|
178
|
+
"Machine",
|
|
179
|
+
"Origin",
|
|
180
|
+
"PauseReason",
|
|
181
|
+
"MachineRequest",
|
|
182
|
+
"RequestMachine",
|
|
183
|
+
"WaitingOn",
|
|
184
|
+
"TeamRules",
|
|
185
|
+
"Backup",
|
|
186
|
+
"ExecResult",
|
|
187
|
+
"MachineMetrics",
|
|
188
|
+
"MetricsPoint",
|
|
189
|
+
"Secret",
|
|
190
|
+
"Outside",
|
|
191
|
+
"HeaderRule",
|
|
192
|
+
"SecretPreset",
|
|
193
|
+
"Port",
|
|
194
|
+
"PortLink",
|
|
195
|
+
"AppKind",
|
|
196
|
+
"App",
|
|
197
|
+
"Model",
|
|
198
|
+
"ModelIntelligence",
|
|
199
|
+
"ModelPrice",
|
|
200
|
+
"ModelSupplier",
|
|
201
|
+
"ModelList",
|
|
202
|
+
"Agent",
|
|
203
|
+
"AgentSupplier",
|
|
204
|
+
"AgentList",
|
|
205
|
+
"AllowedModels",
|
|
206
|
+
"Code",
|
|
207
|
+
"CodeConnection",
|
|
208
|
+
"CodeGrant",
|
|
209
|
+
"FolderEntry",
|
|
210
|
+
"FolderGrant",
|
|
211
|
+
"FolderList",
|
|
212
|
+
"FolderListing",
|
|
213
|
+
"FolderTrash",
|
|
214
|
+
"SharedFolder",
|
|
215
|
+
"Region",
|
|
216
|
+
"GpuOffer",
|
|
217
|
+
"GpuList",
|
|
218
|
+
"UsageLine",
|
|
219
|
+
"Usage",
|
|
220
|
+
"CreditBalance",
|
|
221
|
+
"CreditEntry",
|
|
222
|
+
"CreditEntryKind",
|
|
223
|
+
"CreditPurchase",
|
|
224
|
+
"CreditCheckout",
|
|
225
|
+
"UsageLimits",
|
|
226
|
+
"AccountLimit",
|
|
227
|
+
"TeamLimit",
|
|
228
|
+
"PersonLimit",
|
|
229
|
+
"LimitNear",
|
|
230
|
+
]
|