lightning-sdk 2025.10.8__py3-none-any.whl → 2025.10.22__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.
- lightning_sdk/__init__.py +6 -3
- lightning_sdk/api/base_studio_api.py +13 -9
- lightning_sdk/api/cloud_account_api.py +0 -2
- lightning_sdk/api/license_api.py +26 -59
- lightning_sdk/api/studio_api.py +15 -2
- lightning_sdk/base_studio.py +30 -17
- lightning_sdk/cli/base_studio/list.py +1 -3
- lightning_sdk/cli/entrypoint.py +8 -34
- lightning_sdk/cli/studio/connect.py +42 -92
- lightning_sdk/cli/studio/create.py +23 -1
- lightning_sdk/cli/studio/start.py +12 -2
- lightning_sdk/cli/utils/get_base_studio.py +24 -0
- lightning_sdk/cli/utils/handle_machine_and_gpus_args.py +71 -0
- lightning_sdk/cli/utils/logging.py +121 -0
- lightning_sdk/cli/utils/ssh_connection.py +1 -1
- lightning_sdk/constants.py +1 -0
- lightning_sdk/helpers.py +53 -34
- lightning_sdk/job/job.py +5 -0
- lightning_sdk/job/v1.py +8 -0
- lightning_sdk/job/v2.py +8 -0
- lightning_sdk/lightning_cloud/login.py +260 -10
- lightning_sdk/lightning_cloud/openapi/__init__.py +30 -3
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +19 -19
- lightning_sdk/lightning_cloud/openapi/api/auth_service_api.py +97 -0
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +1463 -240
- lightning_sdk/lightning_cloud/openapi/api/product_license_service_api.py +108 -108
- lightning_sdk/lightning_cloud/openapi/api/sdk_command_history_service_api.py +141 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/cloudspace_id_visibility_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_metrics_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/create_machine_request_represents_the_request_to_create_a_machine.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/id_fork_body1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/id_transfer_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/incident_id_messages_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/incidents_id_body.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/license_key_validate_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/messages_message_id_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/project_id_incidents_body.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/storage_complete_body.py +15 -15
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_transfer_metadata.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_license_request.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_request.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_incident_message_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_incident_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_license_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_transfer_estimate_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_group_pod_metrics.py +1241 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident.py +565 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_detail.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_message.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_job.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kai_scheduler_queue_metrics.py +627 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_license.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_group_pod_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_incident_messages_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_incidents_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_kai_scheduler_queues_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_list_product_licenses_response.py → v1_list_license_response.py} +16 -16
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_resource_visibility.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_sdk_command_history_severity.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_sdk_command_history_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_slack_notifier.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_request.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_owner_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +209 -131
- lightning_sdk/lightning_cloud/openapi/models/{v1_product_license_check_response.py → v1_validate_license_response.py} +21 -21
- lightning_sdk/lightning_cloud/rest_client.py +48 -45
- lightning_sdk/machine.py +2 -1
- lightning_sdk/studio.py +22 -2
- lightning_sdk/utils/license.py +13 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/RECORD +94 -64
- lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +0 -435
- lightning_sdk/services/license.py +0 -363
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.10.8.dist-info → lightning_sdk-2025.10.22.dist-info}/top_level.txt +0 -0
|
@@ -698,6 +698,103 @@ class AuthServiceApi(object):
|
|
|
698
698
|
_request_timeout=params.get('_request_timeout'),
|
|
699
699
|
collection_formats=collection_formats)
|
|
700
700
|
|
|
701
|
+
def auth_service_token_login(self, body: 'V1TokenLoginRequest', **kwargs) -> 'V1TokenLoginResponse': # noqa: E501
|
|
702
|
+
"""auth_service_token_login # noqa: E501
|
|
703
|
+
|
|
704
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
705
|
+
asynchronous HTTP request, please pass async_req=True
|
|
706
|
+
>>> thread = api.auth_service_token_login(body, async_req=True)
|
|
707
|
+
>>> result = thread.get()
|
|
708
|
+
|
|
709
|
+
:param async_req bool
|
|
710
|
+
:param V1TokenLoginRequest body: (required)
|
|
711
|
+
:return: V1TokenLoginResponse
|
|
712
|
+
If the method is called asynchronously,
|
|
713
|
+
returns the request thread.
|
|
714
|
+
"""
|
|
715
|
+
kwargs['_return_http_data_only'] = True
|
|
716
|
+
if kwargs.get('async_req'):
|
|
717
|
+
return self.auth_service_token_login_with_http_info(body, **kwargs) # noqa: E501
|
|
718
|
+
else:
|
|
719
|
+
(data) = self.auth_service_token_login_with_http_info(body, **kwargs) # noqa: E501
|
|
720
|
+
return data
|
|
721
|
+
|
|
722
|
+
def auth_service_token_login_with_http_info(self, body: 'V1TokenLoginRequest', **kwargs) -> 'V1TokenLoginResponse': # noqa: E501
|
|
723
|
+
"""auth_service_token_login # noqa: E501
|
|
724
|
+
|
|
725
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
726
|
+
asynchronous HTTP request, please pass async_req=True
|
|
727
|
+
>>> thread = api.auth_service_token_login_with_http_info(body, async_req=True)
|
|
728
|
+
>>> result = thread.get()
|
|
729
|
+
|
|
730
|
+
:param async_req bool
|
|
731
|
+
:param V1TokenLoginRequest body: (required)
|
|
732
|
+
:return: V1TokenLoginResponse
|
|
733
|
+
If the method is called asynchronously,
|
|
734
|
+
returns the request thread.
|
|
735
|
+
"""
|
|
736
|
+
|
|
737
|
+
all_params = ['body'] # noqa: E501
|
|
738
|
+
all_params.append('async_req')
|
|
739
|
+
all_params.append('_return_http_data_only')
|
|
740
|
+
all_params.append('_preload_content')
|
|
741
|
+
all_params.append('_request_timeout')
|
|
742
|
+
|
|
743
|
+
params = locals()
|
|
744
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
745
|
+
if key not in all_params:
|
|
746
|
+
raise TypeError(
|
|
747
|
+
"Got an unexpected keyword argument '%s'"
|
|
748
|
+
" to method auth_service_token_login" % key
|
|
749
|
+
)
|
|
750
|
+
params[key] = val
|
|
751
|
+
del params['kwargs']
|
|
752
|
+
# verify the required parameter 'body' is set
|
|
753
|
+
if ('body' not in params or
|
|
754
|
+
params['body'] is None):
|
|
755
|
+
raise ValueError("Missing the required parameter `body` when calling `auth_service_token_login`") # noqa: E501
|
|
756
|
+
|
|
757
|
+
collection_formats = {}
|
|
758
|
+
|
|
759
|
+
path_params = {}
|
|
760
|
+
|
|
761
|
+
query_params = []
|
|
762
|
+
|
|
763
|
+
header_params = {}
|
|
764
|
+
|
|
765
|
+
form_params = []
|
|
766
|
+
local_var_files = {}
|
|
767
|
+
|
|
768
|
+
body_params = None
|
|
769
|
+
if 'body' in params:
|
|
770
|
+
body_params = params['body']
|
|
771
|
+
# HTTP header `Accept`
|
|
772
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
773
|
+
['application/json']) # noqa: E501
|
|
774
|
+
|
|
775
|
+
# HTTP header `Content-Type`
|
|
776
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
777
|
+
['application/json']) # noqa: E501
|
|
778
|
+
|
|
779
|
+
# Authentication setting
|
|
780
|
+
auth_settings = [] # noqa: E501
|
|
781
|
+
|
|
782
|
+
return self.api_client.call_api(
|
|
783
|
+
'/v1/auth/token-login', 'POST',
|
|
784
|
+
path_params,
|
|
785
|
+
query_params,
|
|
786
|
+
header_params,
|
|
787
|
+
body=body_params,
|
|
788
|
+
post_params=form_params,
|
|
789
|
+
files=local_var_files,
|
|
790
|
+
response_type='V1TokenLoginResponse', # noqa: E501
|
|
791
|
+
auth_settings=auth_settings,
|
|
792
|
+
async_req=params.get('async_req'),
|
|
793
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
794
|
+
_preload_content=params.get('_preload_content', True),
|
|
795
|
+
_request_timeout=params.get('_request_timeout'),
|
|
796
|
+
collection_formats=collection_formats)
|
|
797
|
+
|
|
701
798
|
def auth_service_update_user(self, body: 'V1UpdateUserRequest', **kwargs) -> 'V1GetUserResponse': # noqa: E501
|
|
702
799
|
"""TODO: change `GetUserResponse` to `User` # noqa: E501
|
|
703
800
|
|
|
@@ -4192,6 +4192,111 @@ class CloudSpaceServiceApi(object):
|
|
|
4192
4192
|
_request_timeout=params.get('_request_timeout'),
|
|
4193
4193
|
collection_formats=collection_formats)
|
|
4194
4194
|
|
|
4195
|
+
def cloud_space_service_get_cloud_space_transfer_estimate(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetCloudSpaceTransferEstimateResponse': # noqa: E501
|
|
4196
|
+
"""cloud_space_service_get_cloud_space_transfer_estimate # noqa: E501
|
|
4197
|
+
|
|
4198
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
4199
|
+
asynchronous HTTP request, please pass async_req=True
|
|
4200
|
+
>>> thread = api.cloud_space_service_get_cloud_space_transfer_estimate(project_id, id, async_req=True)
|
|
4201
|
+
>>> result = thread.get()
|
|
4202
|
+
|
|
4203
|
+
:param async_req bool
|
|
4204
|
+
:param str project_id: (required)
|
|
4205
|
+
:param str id: (required)
|
|
4206
|
+
:param str target_cluster_id:
|
|
4207
|
+
:return: V1GetCloudSpaceTransferEstimateResponse
|
|
4208
|
+
If the method is called asynchronously,
|
|
4209
|
+
returns the request thread.
|
|
4210
|
+
"""
|
|
4211
|
+
kwargs['_return_http_data_only'] = True
|
|
4212
|
+
if kwargs.get('async_req'):
|
|
4213
|
+
return self.cloud_space_service_get_cloud_space_transfer_estimate_with_http_info(project_id, id, **kwargs) # noqa: E501
|
|
4214
|
+
else:
|
|
4215
|
+
(data) = self.cloud_space_service_get_cloud_space_transfer_estimate_with_http_info(project_id, id, **kwargs) # noqa: E501
|
|
4216
|
+
return data
|
|
4217
|
+
|
|
4218
|
+
def cloud_space_service_get_cloud_space_transfer_estimate_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetCloudSpaceTransferEstimateResponse': # noqa: E501
|
|
4219
|
+
"""cloud_space_service_get_cloud_space_transfer_estimate # noqa: E501
|
|
4220
|
+
|
|
4221
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
4222
|
+
asynchronous HTTP request, please pass async_req=True
|
|
4223
|
+
>>> thread = api.cloud_space_service_get_cloud_space_transfer_estimate_with_http_info(project_id, id, async_req=True)
|
|
4224
|
+
>>> result = thread.get()
|
|
4225
|
+
|
|
4226
|
+
:param async_req bool
|
|
4227
|
+
:param str project_id: (required)
|
|
4228
|
+
:param str id: (required)
|
|
4229
|
+
:param str target_cluster_id:
|
|
4230
|
+
:return: V1GetCloudSpaceTransferEstimateResponse
|
|
4231
|
+
If the method is called asynchronously,
|
|
4232
|
+
returns the request thread.
|
|
4233
|
+
"""
|
|
4234
|
+
|
|
4235
|
+
all_params = ['project_id', 'id', 'target_cluster_id'] # noqa: E501
|
|
4236
|
+
all_params.append('async_req')
|
|
4237
|
+
all_params.append('_return_http_data_only')
|
|
4238
|
+
all_params.append('_preload_content')
|
|
4239
|
+
all_params.append('_request_timeout')
|
|
4240
|
+
|
|
4241
|
+
params = locals()
|
|
4242
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
4243
|
+
if key not in all_params:
|
|
4244
|
+
raise TypeError(
|
|
4245
|
+
"Got an unexpected keyword argument '%s'"
|
|
4246
|
+
" to method cloud_space_service_get_cloud_space_transfer_estimate" % key
|
|
4247
|
+
)
|
|
4248
|
+
params[key] = val
|
|
4249
|
+
del params['kwargs']
|
|
4250
|
+
# verify the required parameter 'project_id' is set
|
|
4251
|
+
if ('project_id' not in params or
|
|
4252
|
+
params['project_id'] is None):
|
|
4253
|
+
raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_get_cloud_space_transfer_estimate`") # noqa: E501
|
|
4254
|
+
# verify the required parameter 'id' is set
|
|
4255
|
+
if ('id' not in params or
|
|
4256
|
+
params['id'] is None):
|
|
4257
|
+
raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_get_cloud_space_transfer_estimate`") # noqa: E501
|
|
4258
|
+
|
|
4259
|
+
collection_formats = {}
|
|
4260
|
+
|
|
4261
|
+
path_params = {}
|
|
4262
|
+
if 'project_id' in params:
|
|
4263
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
4264
|
+
if 'id' in params:
|
|
4265
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
4266
|
+
|
|
4267
|
+
query_params = []
|
|
4268
|
+
if 'target_cluster_id' in params:
|
|
4269
|
+
query_params.append(('targetClusterId', params['target_cluster_id'])) # noqa: E501
|
|
4270
|
+
|
|
4271
|
+
header_params = {}
|
|
4272
|
+
|
|
4273
|
+
form_params = []
|
|
4274
|
+
local_var_files = {}
|
|
4275
|
+
|
|
4276
|
+
body_params = None
|
|
4277
|
+
# HTTP header `Accept`
|
|
4278
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
4279
|
+
['application/json']) # noqa: E501
|
|
4280
|
+
|
|
4281
|
+
# Authentication setting
|
|
4282
|
+
auth_settings = [] # noqa: E501
|
|
4283
|
+
|
|
4284
|
+
return self.api_client.call_api(
|
|
4285
|
+
'/v1/projects/{projectId}/cloudspaces/{id}/transfer/duration', 'GET',
|
|
4286
|
+
path_params,
|
|
4287
|
+
query_params,
|
|
4288
|
+
header_params,
|
|
4289
|
+
body=body_params,
|
|
4290
|
+
post_params=form_params,
|
|
4291
|
+
files=local_var_files,
|
|
4292
|
+
response_type='V1GetCloudSpaceTransferEstimateResponse', # noqa: E501
|
|
4293
|
+
auth_settings=auth_settings,
|
|
4294
|
+
async_req=params.get('async_req'),
|
|
4295
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
4296
|
+
_preload_content=params.get('_preload_content', True),
|
|
4297
|
+
_request_timeout=params.get('_request_timeout'),
|
|
4298
|
+
collection_formats=collection_formats)
|
|
4299
|
+
|
|
4195
4300
|
def cloud_space_service_get_cloud_space_version(self, project_id: 'str', cloud_space_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceVersion': # noqa: E501
|
|
4196
4301
|
"""cloud_space_service_get_cloud_space_version # noqa: E501
|
|
4197
4302
|
|