lightning-sdk 0.2.15__py3-none-any.whl → 0.2.17__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 (80) 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 +27 -5
  5. lightning_sdk/api/studio_api.py +64 -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 +19 -0
  20. lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +126 -1
  21. lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +97 -0
  22. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +105 -0
  23. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +105 -0
  24. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +752 -106
  25. lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +93 -0
  26. lightning_sdk/lightning_cloud/openapi/models/__init__.py +19 -0
  27. lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +53 -1
  28. lightning_sdk/lightning_cloud/openapi/models/cloudspaces_id_body.py +53 -1
  29. lightning_sdk/lightning_cloud/openapi/models/create_deployment_request_defines_a_spec_for_the_job_that_allows_for_autoscaling_jobs.py +27 -1
  30. lightning_sdk/lightning_cloud/openapi/models/deployment_id_alertingpolicies_body.py +357 -0
  31. lightning_sdk/lightning_cloud/openapi/models/deployment_id_alertingpolicies_body1.py +331 -0
  32. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +79 -1
  33. lightning_sdk/lightning_cloud/openapi/models/models_id_body.py +123 -0
  34. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +105 -1
  35. lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
  36. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +29 -3
  37. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space.py +79 -1
  38. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +27 -1
  39. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_source_type.py +103 -0
  40. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_tagging_options.py +27 -1
  41. lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py +27 -1
  42. lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
  43. lightning_sdk/lightning_cloud/openapi/models/v1_delete_deployment_alerting_policy_response.py +175 -0
  44. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +79 -1
  45. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_event.py +487 -0
  46. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy.py +409 -0
  47. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_frequency.py +105 -0
  48. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_operation.py +105 -0
  49. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_severity.py +106 -0
  50. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_type.py +111 -0
  51. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_recipients.py +175 -0
  52. lightning_sdk/lightning_cloud/openapi/models/v1_ge_list_deployment_routing_telemetry_response.py +27 -1
  53. lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_instance_open_ports_response.py +123 -0
  54. lightning_sdk/lightning_cloud/openapi/models/v1_get_deployment_routing_telemetry_content_response.py +123 -0
  55. lightning_sdk/lightning_cloud/openapi/models/v1_get_organization_storage_metadata_response.py +331 -0
  56. lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +1 -27
  57. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +27 -1
  58. lightning_sdk/lightning_cloud/openapi/models/v1_list_deployment_alerting_events_response.py +123 -0
  59. lightning_sdk/lightning_cloud/openapi/models/v1_list_deployment_alerting_policies_response.py +175 -0
  60. lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +27 -1
  61. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +105 -1
  62. lightning_sdk/lightning_cloud/openapi/models/v1_project.py +27 -1
  63. lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +27 -1
  64. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +29 -3
  65. lightning_sdk/lightning_cloud/openapi/models/v1_project_storage.py +53 -1
  66. lightning_sdk/lightning_cloud/openapi/models/v1_routing_telemetry.py +253 -0
  67. lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +1 -0
  68. lightning_sdk/lightning_cloud/openapi/models/v1_sleep_server_response.py +97 -0
  69. lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +1 -27
  70. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +105 -53
  71. lightning_sdk/lightning_cloud/openapi/models/v1_user_requested_compute_config.py +27 -1
  72. lightning_sdk/llm/llm.py +54 -8
  73. lightning_sdk/studio.py +40 -1
  74. lightning_sdk/teamspace.py +68 -0
  75. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.17.dist-info}/METADATA +1 -1
  76. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.17.dist-info}/RECORD +80 -58
  77. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.17.dist-info}/LICENSE +0 -0
  78. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.17.dist-info}/WHEEL +0 -0
  79. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.17.dist-info}/entry_points.txt +0 -0
  80. {lightning_sdk-0.2.15.dist-info → lightning_sdk-0.2.17.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,175 @@
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 V1DeleteDeploymentAlertingPolicyResponse(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
+ 'deployment_id': 'str',
45
+ 'id': 'str',
46
+ 'project_id': 'str'
47
+ }
48
+
49
+ attribute_map = {
50
+ 'deployment_id': 'deploymentId',
51
+ 'id': 'id',
52
+ 'project_id': 'projectId'
53
+ }
54
+
55
+ def __init__(self, deployment_id: 'str' =None, id: 'str' =None, project_id: 'str' =None): # noqa: E501
56
+ """V1DeleteDeploymentAlertingPolicyResponse - a model defined in Swagger""" # noqa: E501
57
+ self._deployment_id = None
58
+ self._id = None
59
+ self._project_id = None
60
+ self.discriminator = None
61
+ if deployment_id is not None:
62
+ self.deployment_id = deployment_id
63
+ if id is not None:
64
+ self.id = id
65
+ if project_id is not None:
66
+ self.project_id = project_id
67
+
68
+ @property
69
+ def deployment_id(self) -> 'str':
70
+ """Gets the deployment_id of this V1DeleteDeploymentAlertingPolicyResponse. # noqa: E501
71
+
72
+
73
+ :return: The deployment_id of this V1DeleteDeploymentAlertingPolicyResponse. # noqa: E501
74
+ :rtype: str
75
+ """
76
+ return self._deployment_id
77
+
78
+ @deployment_id.setter
79
+ def deployment_id(self, deployment_id: 'str'):
80
+ """Sets the deployment_id of this V1DeleteDeploymentAlertingPolicyResponse.
81
+
82
+
83
+ :param deployment_id: The deployment_id of this V1DeleteDeploymentAlertingPolicyResponse. # noqa: E501
84
+ :type: str
85
+ """
86
+
87
+ self._deployment_id = deployment_id
88
+
89
+ @property
90
+ def id(self) -> 'str':
91
+ """Gets the id of this V1DeleteDeploymentAlertingPolicyResponse. # noqa: E501
92
+
93
+
94
+ :return: The id of this V1DeleteDeploymentAlertingPolicyResponse. # noqa: E501
95
+ :rtype: str
96
+ """
97
+ return self._id
98
+
99
+ @id.setter
100
+ def id(self, id: 'str'):
101
+ """Sets the id of this V1DeleteDeploymentAlertingPolicyResponse.
102
+
103
+
104
+ :param id: The id of this V1DeleteDeploymentAlertingPolicyResponse. # noqa: E501
105
+ :type: str
106
+ """
107
+
108
+ self._id = id
109
+
110
+ @property
111
+ def project_id(self) -> 'str':
112
+ """Gets the project_id of this V1DeleteDeploymentAlertingPolicyResponse. # noqa: E501
113
+
114
+
115
+ :return: The project_id of this V1DeleteDeploymentAlertingPolicyResponse. # noqa: E501
116
+ :rtype: str
117
+ """
118
+ return self._project_id
119
+
120
+ @project_id.setter
121
+ def project_id(self, project_id: 'str'):
122
+ """Sets the project_id of this V1DeleteDeploymentAlertingPolicyResponse.
123
+
124
+
125
+ :param project_id: The project_id of this V1DeleteDeploymentAlertingPolicyResponse. # noqa: E501
126
+ :type: str
127
+ """
128
+
129
+ self._project_id = project_id
130
+
131
+ def to_dict(self) -> dict:
132
+ """Returns the model properties as a dict"""
133
+ result = {}
134
+
135
+ for attr, _ in six.iteritems(self.swagger_types):
136
+ value = getattr(self, attr)
137
+ if isinstance(value, list):
138
+ result[attr] = list(map(
139
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
140
+ value
141
+ ))
142
+ elif hasattr(value, "to_dict"):
143
+ result[attr] = value.to_dict()
144
+ elif isinstance(value, dict):
145
+ result[attr] = dict(map(
146
+ lambda item: (item[0], item[1].to_dict())
147
+ if hasattr(item[1], "to_dict") else item,
148
+ value.items()
149
+ ))
150
+ else:
151
+ result[attr] = value
152
+ if issubclass(V1DeleteDeploymentAlertingPolicyResponse, dict):
153
+ for key, value in self.items():
154
+ result[key] = value
155
+
156
+ return result
157
+
158
+ def to_str(self) -> str:
159
+ """Returns the string representation of the model"""
160
+ return pprint.pformat(self.to_dict())
161
+
162
+ def __repr__(self) -> str:
163
+ """For `print` and `pprint`"""
164
+ return self.to_str()
165
+
166
+ def __eq__(self, other: 'V1DeleteDeploymentAlertingPolicyResponse') -> bool:
167
+ """Returns true if both objects are equal"""
168
+ if not isinstance(other, V1DeleteDeploymentAlertingPolicyResponse):
169
+ return False
170
+
171
+ return self.__dict__ == other.__dict__
172
+
173
+ def __ne__(self, other: 'V1DeleteDeploymentAlertingPolicyResponse') -> bool:
174
+ """Returns true if both objects are not equal"""
175
+ return not self == other
@@ -53,11 +53,14 @@ class V1Deployment(object):
53
53
  'endpoint': 'V1Endpoint',
54
54
  'id': 'str',
55
55
  'is_published': 'bool',
56
+ 'managed': 'bool',
56
57
  'managed_endpoint_id': 'str',
57
58
  'name': 'str',
59
+ 'oncall_notification': 'bool',
58
60
  'parameter_spec': 'V1ParameterizationSpec',
59
61
  'pipeline_id': 'str',
60
62
  'project_id': 'str',
63
+ 'recipients': 'V1DeploymentAlertingRecipients',
61
64
  'release_id': 'str',
62
65
  'replicas': 'int',
63
66
  'spec': 'V1JobSpec',
@@ -83,11 +86,14 @@ class V1Deployment(object):
83
86
  'endpoint': 'endpoint',
84
87
  'id': 'id',
85
88
  'is_published': 'isPublished',
89
+ 'managed': 'managed',
86
90
  'managed_endpoint_id': 'managedEndpointId',
87
91
  'name': 'name',
92
+ 'oncall_notification': 'oncallNotification',
88
93
  'parameter_spec': 'parameterSpec',
89
94
  'pipeline_id': 'pipelineId',
90
95
  'project_id': 'projectId',
96
+ 'recipients': 'recipients',
91
97
  'release_id': 'releaseId',
92
98
  'replicas': 'replicas',
93
99
  'spec': 'spec',
@@ -100,7 +106,7 @@ class V1Deployment(object):
100
106
  'visibility': 'visibility'
101
107
  }
102
108
 
103
- def __init__(self, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, assistant_id: 'str' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, current_state: 'V1DeploymentState' =None, debug: 'bool' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, id: 'str' =None, is_published: 'bool' =None, managed_endpoint_id: 'str' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, pipeline_id: 'str' =None, project_id: 'str' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, template_id: 'str' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None, visibility: 'V1ResourceVisibility' =None): # noqa: E501
109
+ def __init__(self, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, assistant_id: 'str' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, current_state: 'V1DeploymentState' =None, debug: 'bool' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, id: 'str' =None, is_published: 'bool' =None, managed: 'bool' =None, managed_endpoint_id: 'str' =None, name: 'str' =None, oncall_notification: 'bool' =None, parameter_spec: 'V1ParameterizationSpec' =None, pipeline_id: 'str' =None, project_id: 'str' =None, recipients: 'V1DeploymentAlertingRecipients' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, template_id: 'str' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None, visibility: 'V1ResourceVisibility' =None): # noqa: E501
104
110
  """V1Deployment - a model defined in Swagger""" # noqa: E501
105
111
  self._api_standard = None
106
112
  self._apis = None
@@ -114,11 +120,14 @@ class V1Deployment(object):
114
120
  self._endpoint = None
115
121
  self._id = None
116
122
  self._is_published = None
123
+ self._managed = None
117
124
  self._managed_endpoint_id = None
118
125
  self._name = None
126
+ self._oncall_notification = None
119
127
  self._parameter_spec = None
120
128
  self._pipeline_id = None
121
129
  self._project_id = None
130
+ self._recipients = None
122
131
  self._release_id = None
123
132
  self._replicas = None
124
133
  self._spec = None
@@ -154,16 +163,22 @@ class V1Deployment(object):
154
163
  self.id = id
155
164
  if is_published is not None:
156
165
  self.is_published = is_published
166
+ if managed is not None:
167
+ self.managed = managed
157
168
  if managed_endpoint_id is not None:
158
169
  self.managed_endpoint_id = managed_endpoint_id
159
170
  if name is not None:
160
171
  self.name = name
172
+ if oncall_notification is not None:
173
+ self.oncall_notification = oncall_notification
161
174
  if parameter_spec is not None:
162
175
  self.parameter_spec = parameter_spec
163
176
  if pipeline_id is not None:
164
177
  self.pipeline_id = pipeline_id
165
178
  if project_id is not None:
166
179
  self.project_id = project_id
180
+ if recipients is not None:
181
+ self.recipients = recipients
167
182
  if release_id is not None:
168
183
  self.release_id = release_id
169
184
  if replicas is not None:
@@ -437,6 +452,27 @@ class V1Deployment(object):
437
452
 
438
453
  self._is_published = is_published
439
454
 
455
+ @property
456
+ def managed(self) -> 'bool':
457
+ """Gets the managed of this V1Deployment. # noqa: E501
458
+
459
+
460
+ :return: The managed of this V1Deployment. # noqa: E501
461
+ :rtype: bool
462
+ """
463
+ return self._managed
464
+
465
+ @managed.setter
466
+ def managed(self, managed: 'bool'):
467
+ """Sets the managed of this V1Deployment.
468
+
469
+
470
+ :param managed: The managed of this V1Deployment. # noqa: E501
471
+ :type: bool
472
+ """
473
+
474
+ self._managed = managed
475
+
440
476
  @property
441
477
  def managed_endpoint_id(self) -> 'str':
442
478
  """Gets the managed_endpoint_id of this V1Deployment. # noqa: E501
@@ -479,6 +515,27 @@ class V1Deployment(object):
479
515
 
480
516
  self._name = name
481
517
 
518
+ @property
519
+ def oncall_notification(self) -> 'bool':
520
+ """Gets the oncall_notification of this V1Deployment. # noqa: E501
521
+
522
+
523
+ :return: The oncall_notification of this V1Deployment. # noqa: E501
524
+ :rtype: bool
525
+ """
526
+ return self._oncall_notification
527
+
528
+ @oncall_notification.setter
529
+ def oncall_notification(self, oncall_notification: 'bool'):
530
+ """Sets the oncall_notification of this V1Deployment.
531
+
532
+
533
+ :param oncall_notification: The oncall_notification of this V1Deployment. # noqa: E501
534
+ :type: bool
535
+ """
536
+
537
+ self._oncall_notification = oncall_notification
538
+
482
539
  @property
483
540
  def parameter_spec(self) -> 'V1ParameterizationSpec':
484
541
  """Gets the parameter_spec of this V1Deployment. # noqa: E501
@@ -542,6 +599,27 @@ class V1Deployment(object):
542
599
 
543
600
  self._project_id = project_id
544
601
 
602
+ @property
603
+ def recipients(self) -> 'V1DeploymentAlertingRecipients':
604
+ """Gets the recipients of this V1Deployment. # noqa: E501
605
+
606
+
607
+ :return: The recipients of this V1Deployment. # noqa: E501
608
+ :rtype: V1DeploymentAlertingRecipients
609
+ """
610
+ return self._recipients
611
+
612
+ @recipients.setter
613
+ def recipients(self, recipients: 'V1DeploymentAlertingRecipients'):
614
+ """Sets the recipients of this V1Deployment.
615
+
616
+
617
+ :param recipients: The recipients of this V1Deployment. # noqa: E501
618
+ :type: V1DeploymentAlertingRecipients
619
+ """
620
+
621
+ self._recipients = recipients
622
+
545
623
  @property
546
624
  def release_id(self) -> 'str':
547
625
  """Gets the release_id of this V1Deployment. # noqa: E501