lightning-sdk 0.2.15__py3-none-any.whl → 0.2.16__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.
Files changed (74) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/base_studio_api.py +7 -1
  3. lightning_sdk/api/cluster_api.py +83 -1
  4. lightning_sdk/api/llm_api.py +24 -5
  5. lightning_sdk/api/studio_api.py +3 -0
  6. lightning_sdk/api/teamspace_api.py +127 -1
  7. lightning_sdk/api/utils.py +4 -0
  8. lightning_sdk/base_studio.py +14 -1
  9. lightning_sdk/cli/create.py +21 -1
  10. lightning_sdk/cli/deploy/__init__.py +0 -0
  11. lightning_sdk/cli/deploy/_auth.py +189 -0
  12. lightning_sdk/cli/deploy/devbox.py +157 -0
  13. lightning_sdk/cli/{serve.py → deploy/serve.py} +11 -322
  14. lightning_sdk/cli/download.py +44 -16
  15. lightning_sdk/cli/entrypoint.py +1 -1
  16. lightning_sdk/cli/open.py +21 -2
  17. lightning_sdk/cli/start.py +12 -3
  18. lightning_sdk/cli/upload.py +2 -4
  19. lightning_sdk/lightning_cloud/openapi/__init__.py +18 -0
  20. lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +121 -0
  21. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +105 -0
  22. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +105 -0
  23. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +747 -105
  24. lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +93 -0
  25. lightning_sdk/lightning_cloud/openapi/models/__init__.py +18 -0
  26. lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +27 -1
  27. lightning_sdk/lightning_cloud/openapi/models/cloudspaces_id_body.py +53 -1
  28. lightning_sdk/lightning_cloud/openapi/models/deployment_id_alertingpolicies_body.py +331 -0
  29. lightning_sdk/lightning_cloud/openapi/models/deployment_id_alertingpolicies_body1.py +305 -0
  30. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +53 -1
  31. lightning_sdk/lightning_cloud/openapi/models/models_id_body.py +123 -0
  32. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +105 -1
  33. lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
  34. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +29 -3
  35. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space.py +53 -1
  36. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_source_type.py +103 -0
  37. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_tagging_options.py +27 -1
  38. lightning_sdk/lightning_cloud/openapi/models/v1_delete_deployment_alerting_policy_response.py +175 -0
  39. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +53 -1
  40. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_event.py +487 -0
  41. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy.py +383 -0
  42. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_frequency.py +105 -0
  43. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_operation.py +105 -0
  44. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_severity.py +106 -0
  45. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_type.py +111 -0
  46. lightning_sdk/lightning_cloud/openapi/models/v1_ge_list_deployment_routing_telemetry_response.py +27 -1
  47. lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_instance_open_ports_response.py +123 -0
  48. lightning_sdk/lightning_cloud/openapi/models/v1_get_deployment_routing_telemetry_content_response.py +123 -0
  49. lightning_sdk/lightning_cloud/openapi/models/v1_get_organization_storage_metadata_response.py +331 -0
  50. lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +1 -27
  51. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +27 -1
  52. lightning_sdk/lightning_cloud/openapi/models/v1_list_deployment_alerting_events_response.py +123 -0
  53. lightning_sdk/lightning_cloud/openapi/models/v1_list_deployment_alerting_policies_response.py +175 -0
  54. lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +27 -1
  55. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +105 -1
  56. lightning_sdk/lightning_cloud/openapi/models/v1_project.py +27 -1
  57. lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +27 -1
  58. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +29 -3
  59. lightning_sdk/lightning_cloud/openapi/models/v1_project_storage.py +53 -1
  60. lightning_sdk/lightning_cloud/openapi/models/v1_routing_telemetry.py +253 -0
  61. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +1 -0
  62. lightning_sdk/lightning_cloud/openapi/models/v1_sleep_server_response.py +97 -0
  63. lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +1 -27
  64. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +79 -27
  65. lightning_sdk/lightning_cloud/openapi/models/v1_user_requested_compute_config.py +27 -1
  66. lightning_sdk/llm/llm.py +52 -8
  67. lightning_sdk/studio.py +32 -1
  68. lightning_sdk/teamspace.py +68 -0
  69. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.16.dist-info}/METADATA +1 -1
  70. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.16.dist-info}/RECORD +74 -53
  71. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.16.dist-info}/LICENSE +0 -0
  72. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.16.dist-info}/WHEEL +0 -0
  73. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.16.dist-info}/entry_points.txt +0 -0
  74. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.16.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,487 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ external/v1/auth_service.proto
5
+
6
+ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7
+
8
+ OpenAPI spec version: version not set
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+
12
+ NOTE
13
+ ----
14
+ standard swagger-codegen-cli for this python client has been modified
15
+ by custom templates. The purpose of these templates is to include
16
+ typing information in the API and Model code. Please refer to the
17
+ main grid repository for more info
18
+ """
19
+
20
+ import pprint
21
+ import re # noqa: F401
22
+
23
+ from typing import TYPE_CHECKING
24
+
25
+ import six
26
+
27
+ if TYPE_CHECKING:
28
+ from datetime import datetime
29
+ from lightning_sdk.lightning_cloud.openapi.models import *
30
+
31
+ class V1DeploymentAlertingEvent(object):
32
+ """NOTE: This class is auto generated by the swagger code generator program.
33
+
34
+ Do not edit the class manually.
35
+ """
36
+ """
37
+ Attributes:
38
+ swagger_types (dict): The key is attribute name
39
+ and the value is attribute type.
40
+ attribute_map (dict): The key is attribute name
41
+ and the value is json key in definition.
42
+ """
43
+ swagger_types = {
44
+ 'alerting_policy_id': 'str',
45
+ 'created_at': 'datetime',
46
+ 'deployment_id': 'str',
47
+ 'description': 'str',
48
+ 'frequency': 'V1DeploymentAlertingPolicyFrequency',
49
+ 'id': 'str',
50
+ 'limit': 'float',
51
+ 'message': 'str',
52
+ 'name': 'str',
53
+ 'operation': 'V1DeploymentAlertingPolicyOperation',
54
+ 'project_id': 'str',
55
+ 'severity': 'V1DeploymentAlertingPolicySeverity',
56
+ 'type': 'V1DeploymentAlertingPolicyType',
57
+ 'value': 'float',
58
+ 'viewed': 'bool'
59
+ }
60
+
61
+ attribute_map = {
62
+ 'alerting_policy_id': 'alertingPolicyId',
63
+ 'created_at': 'createdAt',
64
+ 'deployment_id': 'deploymentId',
65
+ 'description': 'description',
66
+ 'frequency': 'frequency',
67
+ 'id': 'id',
68
+ 'limit': 'limit',
69
+ 'message': 'message',
70
+ 'name': 'name',
71
+ 'operation': 'operation',
72
+ 'project_id': 'projectId',
73
+ 'severity': 'severity',
74
+ 'type': 'type',
75
+ 'value': 'value',
76
+ 'viewed': 'viewed'
77
+ }
78
+
79
+ def __init__(self, alerting_policy_id: 'str' =None, created_at: 'datetime' =None, deployment_id: 'str' =None, description: 'str' =None, frequency: 'V1DeploymentAlertingPolicyFrequency' =None, id: 'str' =None, limit: 'float' =None, message: 'str' =None, name: 'str' =None, operation: 'V1DeploymentAlertingPolicyOperation' =None, project_id: 'str' =None, severity: 'V1DeploymentAlertingPolicySeverity' =None, type: 'V1DeploymentAlertingPolicyType' =None, value: 'float' =None, viewed: 'bool' =None): # noqa: E501
80
+ """V1DeploymentAlertingEvent - a model defined in Swagger""" # noqa: E501
81
+ self._alerting_policy_id = None
82
+ self._created_at = None
83
+ self._deployment_id = None
84
+ self._description = None
85
+ self._frequency = None
86
+ self._id = None
87
+ self._limit = None
88
+ self._message = None
89
+ self._name = None
90
+ self._operation = None
91
+ self._project_id = None
92
+ self._severity = None
93
+ self._type = None
94
+ self._value = None
95
+ self._viewed = None
96
+ self.discriminator = None
97
+ if alerting_policy_id is not None:
98
+ self.alerting_policy_id = alerting_policy_id
99
+ if created_at is not None:
100
+ self.created_at = created_at
101
+ if deployment_id is not None:
102
+ self.deployment_id = deployment_id
103
+ if description is not None:
104
+ self.description = description
105
+ if frequency is not None:
106
+ self.frequency = frequency
107
+ if id is not None:
108
+ self.id = id
109
+ if limit is not None:
110
+ self.limit = limit
111
+ if message is not None:
112
+ self.message = message
113
+ if name is not None:
114
+ self.name = name
115
+ if operation is not None:
116
+ self.operation = operation
117
+ if project_id is not None:
118
+ self.project_id = project_id
119
+ if severity is not None:
120
+ self.severity = severity
121
+ if type is not None:
122
+ self.type = type
123
+ if value is not None:
124
+ self.value = value
125
+ if viewed is not None:
126
+ self.viewed = viewed
127
+
128
+ @property
129
+ def alerting_policy_id(self) -> 'str':
130
+ """Gets the alerting_policy_id of this V1DeploymentAlertingEvent. # noqa: E501
131
+
132
+
133
+ :return: The alerting_policy_id of this V1DeploymentAlertingEvent. # noqa: E501
134
+ :rtype: str
135
+ """
136
+ return self._alerting_policy_id
137
+
138
+ @alerting_policy_id.setter
139
+ def alerting_policy_id(self, alerting_policy_id: 'str'):
140
+ """Sets the alerting_policy_id of this V1DeploymentAlertingEvent.
141
+
142
+
143
+ :param alerting_policy_id: The alerting_policy_id of this V1DeploymentAlertingEvent. # noqa: E501
144
+ :type: str
145
+ """
146
+
147
+ self._alerting_policy_id = alerting_policy_id
148
+
149
+ @property
150
+ def created_at(self) -> 'datetime':
151
+ """Gets the created_at of this V1DeploymentAlertingEvent. # noqa: E501
152
+
153
+
154
+ :return: The created_at of this V1DeploymentAlertingEvent. # noqa: E501
155
+ :rtype: datetime
156
+ """
157
+ return self._created_at
158
+
159
+ @created_at.setter
160
+ def created_at(self, created_at: 'datetime'):
161
+ """Sets the created_at of this V1DeploymentAlertingEvent.
162
+
163
+
164
+ :param created_at: The created_at of this V1DeploymentAlertingEvent. # noqa: E501
165
+ :type: datetime
166
+ """
167
+
168
+ self._created_at = created_at
169
+
170
+ @property
171
+ def deployment_id(self) -> 'str':
172
+ """Gets the deployment_id of this V1DeploymentAlertingEvent. # noqa: E501
173
+
174
+
175
+ :return: The deployment_id of this V1DeploymentAlertingEvent. # noqa: E501
176
+ :rtype: str
177
+ """
178
+ return self._deployment_id
179
+
180
+ @deployment_id.setter
181
+ def deployment_id(self, deployment_id: 'str'):
182
+ """Sets the deployment_id of this V1DeploymentAlertingEvent.
183
+
184
+
185
+ :param deployment_id: The deployment_id of this V1DeploymentAlertingEvent. # noqa: E501
186
+ :type: str
187
+ """
188
+
189
+ self._deployment_id = deployment_id
190
+
191
+ @property
192
+ def description(self) -> 'str':
193
+ """Gets the description of this V1DeploymentAlertingEvent. # noqa: E501
194
+
195
+
196
+ :return: The description of this V1DeploymentAlertingEvent. # noqa: E501
197
+ :rtype: str
198
+ """
199
+ return self._description
200
+
201
+ @description.setter
202
+ def description(self, description: 'str'):
203
+ """Sets the description of this V1DeploymentAlertingEvent.
204
+
205
+
206
+ :param description: The description of this V1DeploymentAlertingEvent. # noqa: E501
207
+ :type: str
208
+ """
209
+
210
+ self._description = description
211
+
212
+ @property
213
+ def frequency(self) -> 'V1DeploymentAlertingPolicyFrequency':
214
+ """Gets the frequency of this V1DeploymentAlertingEvent. # noqa: E501
215
+
216
+
217
+ :return: The frequency of this V1DeploymentAlertingEvent. # noqa: E501
218
+ :rtype: V1DeploymentAlertingPolicyFrequency
219
+ """
220
+ return self._frequency
221
+
222
+ @frequency.setter
223
+ def frequency(self, frequency: 'V1DeploymentAlertingPolicyFrequency'):
224
+ """Sets the frequency of this V1DeploymentAlertingEvent.
225
+
226
+
227
+ :param frequency: The frequency of this V1DeploymentAlertingEvent. # noqa: E501
228
+ :type: V1DeploymentAlertingPolicyFrequency
229
+ """
230
+
231
+ self._frequency = frequency
232
+
233
+ @property
234
+ def id(self) -> 'str':
235
+ """Gets the id of this V1DeploymentAlertingEvent. # noqa: E501
236
+
237
+
238
+ :return: The id of this V1DeploymentAlertingEvent. # noqa: E501
239
+ :rtype: str
240
+ """
241
+ return self._id
242
+
243
+ @id.setter
244
+ def id(self, id: 'str'):
245
+ """Sets the id of this V1DeploymentAlertingEvent.
246
+
247
+
248
+ :param id: The id of this V1DeploymentAlertingEvent. # noqa: E501
249
+ :type: str
250
+ """
251
+
252
+ self._id = id
253
+
254
+ @property
255
+ def limit(self) -> 'float':
256
+ """Gets the limit of this V1DeploymentAlertingEvent. # noqa: E501
257
+
258
+
259
+ :return: The limit of this V1DeploymentAlertingEvent. # noqa: E501
260
+ :rtype: float
261
+ """
262
+ return self._limit
263
+
264
+ @limit.setter
265
+ def limit(self, limit: 'float'):
266
+ """Sets the limit of this V1DeploymentAlertingEvent.
267
+
268
+
269
+ :param limit: The limit of this V1DeploymentAlertingEvent. # noqa: E501
270
+ :type: float
271
+ """
272
+
273
+ self._limit = limit
274
+
275
+ @property
276
+ def message(self) -> 'str':
277
+ """Gets the message of this V1DeploymentAlertingEvent. # noqa: E501
278
+
279
+
280
+ :return: The message of this V1DeploymentAlertingEvent. # noqa: E501
281
+ :rtype: str
282
+ """
283
+ return self._message
284
+
285
+ @message.setter
286
+ def message(self, message: 'str'):
287
+ """Sets the message of this V1DeploymentAlertingEvent.
288
+
289
+
290
+ :param message: The message of this V1DeploymentAlertingEvent. # noqa: E501
291
+ :type: str
292
+ """
293
+
294
+ self._message = message
295
+
296
+ @property
297
+ def name(self) -> 'str':
298
+ """Gets the name of this V1DeploymentAlertingEvent. # noqa: E501
299
+
300
+
301
+ :return: The name of this V1DeploymentAlertingEvent. # noqa: E501
302
+ :rtype: str
303
+ """
304
+ return self._name
305
+
306
+ @name.setter
307
+ def name(self, name: 'str'):
308
+ """Sets the name of this V1DeploymentAlertingEvent.
309
+
310
+
311
+ :param name: The name of this V1DeploymentAlertingEvent. # noqa: E501
312
+ :type: str
313
+ """
314
+
315
+ self._name = name
316
+
317
+ @property
318
+ def operation(self) -> 'V1DeploymentAlertingPolicyOperation':
319
+ """Gets the operation of this V1DeploymentAlertingEvent. # noqa: E501
320
+
321
+
322
+ :return: The operation of this V1DeploymentAlertingEvent. # noqa: E501
323
+ :rtype: V1DeploymentAlertingPolicyOperation
324
+ """
325
+ return self._operation
326
+
327
+ @operation.setter
328
+ def operation(self, operation: 'V1DeploymentAlertingPolicyOperation'):
329
+ """Sets the operation of this V1DeploymentAlertingEvent.
330
+
331
+
332
+ :param operation: The operation of this V1DeploymentAlertingEvent. # noqa: E501
333
+ :type: V1DeploymentAlertingPolicyOperation
334
+ """
335
+
336
+ self._operation = operation
337
+
338
+ @property
339
+ def project_id(self) -> 'str':
340
+ """Gets the project_id of this V1DeploymentAlertingEvent. # noqa: E501
341
+
342
+
343
+ :return: The project_id of this V1DeploymentAlertingEvent. # noqa: E501
344
+ :rtype: str
345
+ """
346
+ return self._project_id
347
+
348
+ @project_id.setter
349
+ def project_id(self, project_id: 'str'):
350
+ """Sets the project_id of this V1DeploymentAlertingEvent.
351
+
352
+
353
+ :param project_id: The project_id of this V1DeploymentAlertingEvent. # noqa: E501
354
+ :type: str
355
+ """
356
+
357
+ self._project_id = project_id
358
+
359
+ @property
360
+ def severity(self) -> 'V1DeploymentAlertingPolicySeverity':
361
+ """Gets the severity of this V1DeploymentAlertingEvent. # noqa: E501
362
+
363
+
364
+ :return: The severity of this V1DeploymentAlertingEvent. # noqa: E501
365
+ :rtype: V1DeploymentAlertingPolicySeverity
366
+ """
367
+ return self._severity
368
+
369
+ @severity.setter
370
+ def severity(self, severity: 'V1DeploymentAlertingPolicySeverity'):
371
+ """Sets the severity of this V1DeploymentAlertingEvent.
372
+
373
+
374
+ :param severity: The severity of this V1DeploymentAlertingEvent. # noqa: E501
375
+ :type: V1DeploymentAlertingPolicySeverity
376
+ """
377
+
378
+ self._severity = severity
379
+
380
+ @property
381
+ def type(self) -> 'V1DeploymentAlertingPolicyType':
382
+ """Gets the type of this V1DeploymentAlertingEvent. # noqa: E501
383
+
384
+
385
+ :return: The type of this V1DeploymentAlertingEvent. # noqa: E501
386
+ :rtype: V1DeploymentAlertingPolicyType
387
+ """
388
+ return self._type
389
+
390
+ @type.setter
391
+ def type(self, type: 'V1DeploymentAlertingPolicyType'):
392
+ """Sets the type of this V1DeploymentAlertingEvent.
393
+
394
+
395
+ :param type: The type of this V1DeploymentAlertingEvent. # noqa: E501
396
+ :type: V1DeploymentAlertingPolicyType
397
+ """
398
+
399
+ self._type = type
400
+
401
+ @property
402
+ def value(self) -> 'float':
403
+ """Gets the value of this V1DeploymentAlertingEvent. # noqa: E501
404
+
405
+
406
+ :return: The value of this V1DeploymentAlertingEvent. # noqa: E501
407
+ :rtype: float
408
+ """
409
+ return self._value
410
+
411
+ @value.setter
412
+ def value(self, value: 'float'):
413
+ """Sets the value of this V1DeploymentAlertingEvent.
414
+
415
+
416
+ :param value: The value of this V1DeploymentAlertingEvent. # noqa: E501
417
+ :type: float
418
+ """
419
+
420
+ self._value = value
421
+
422
+ @property
423
+ def viewed(self) -> 'bool':
424
+ """Gets the viewed of this V1DeploymentAlertingEvent. # noqa: E501
425
+
426
+
427
+ :return: The viewed of this V1DeploymentAlertingEvent. # noqa: E501
428
+ :rtype: bool
429
+ """
430
+ return self._viewed
431
+
432
+ @viewed.setter
433
+ def viewed(self, viewed: 'bool'):
434
+ """Sets the viewed of this V1DeploymentAlertingEvent.
435
+
436
+
437
+ :param viewed: The viewed of this V1DeploymentAlertingEvent. # noqa: E501
438
+ :type: bool
439
+ """
440
+
441
+ self._viewed = viewed
442
+
443
+ def to_dict(self) -> dict:
444
+ """Returns the model properties as a dict"""
445
+ result = {}
446
+
447
+ for attr, _ in six.iteritems(self.swagger_types):
448
+ value = getattr(self, attr)
449
+ if isinstance(value, list):
450
+ result[attr] = list(map(
451
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
452
+ value
453
+ ))
454
+ elif hasattr(value, "to_dict"):
455
+ result[attr] = value.to_dict()
456
+ elif isinstance(value, dict):
457
+ result[attr] = dict(map(
458
+ lambda item: (item[0], item[1].to_dict())
459
+ if hasattr(item[1], "to_dict") else item,
460
+ value.items()
461
+ ))
462
+ else:
463
+ result[attr] = value
464
+ if issubclass(V1DeploymentAlertingEvent, dict):
465
+ for key, value in self.items():
466
+ result[key] = value
467
+
468
+ return result
469
+
470
+ def to_str(self) -> str:
471
+ """Returns the string representation of the model"""
472
+ return pprint.pformat(self.to_dict())
473
+
474
+ def __repr__(self) -> str:
475
+ """For `print` and `pprint`"""
476
+ return self.to_str()
477
+
478
+ def __eq__(self, other: 'V1DeploymentAlertingEvent') -> bool:
479
+ """Returns true if both objects are equal"""
480
+ if not isinstance(other, V1DeploymentAlertingEvent):
481
+ return False
482
+
483
+ return self.__dict__ == other.__dict__
484
+
485
+ def __ne__(self, other: 'V1DeploymentAlertingEvent') -> bool:
486
+ """Returns true if both objects are not equal"""
487
+ return not self == other