lightning-sdk 2025.10.14__py3-none-any.whl → 2025.10.23__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 (76) hide show
  1. lightning_sdk/__init__.py +6 -3
  2. lightning_sdk/api/base_studio_api.py +13 -9
  3. lightning_sdk/api/job_api.py +4 -1
  4. lightning_sdk/api/license_api.py +26 -59
  5. lightning_sdk/api/studio_api.py +7 -2
  6. lightning_sdk/base_studio.py +30 -17
  7. lightning_sdk/cli/base_studio/list.py +1 -3
  8. lightning_sdk/cli/entrypoint.py +11 -34
  9. lightning_sdk/cli/groups.py +7 -0
  10. lightning_sdk/cli/license/__init__.py +14 -0
  11. lightning_sdk/cli/license/get.py +15 -0
  12. lightning_sdk/cli/license/list.py +45 -0
  13. lightning_sdk/cli/license/set.py +13 -0
  14. lightning_sdk/cli/studio/connect.py +42 -92
  15. lightning_sdk/cli/studio/create.py +23 -1
  16. lightning_sdk/cli/studio/start.py +12 -2
  17. lightning_sdk/cli/utils/get_base_studio.py +24 -0
  18. lightning_sdk/cli/utils/handle_machine_and_gpus_args.py +69 -0
  19. lightning_sdk/cli/utils/logging.py +121 -0
  20. lightning_sdk/cli/utils/ssh_connection.py +1 -1
  21. lightning_sdk/constants.py +1 -0
  22. lightning_sdk/helpers.py +53 -34
  23. lightning_sdk/job/base.py +7 -0
  24. lightning_sdk/job/job.py +8 -0
  25. lightning_sdk/job/v1.py +3 -0
  26. lightning_sdk/job/v2.py +4 -0
  27. lightning_sdk/lightning_cloud/login.py +260 -10
  28. lightning_sdk/lightning_cloud/openapi/__init__.py +16 -3
  29. lightning_sdk/lightning_cloud/openapi/api/auth_service_api.py +279 -0
  30. lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +117 -0
  31. lightning_sdk/lightning_cloud/openapi/api/product_license_service_api.py +108 -108
  32. lightning_sdk/lightning_cloud/openapi/models/__init__.py +16 -3
  33. lightning_sdk/lightning_cloud/openapi/models/create_machine_request_represents_the_request_to_create_a_machine.py +27 -1
  34. lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
  35. lightning_sdk/lightning_cloud/openapi/models/id_fork_body1.py +27 -1
  36. lightning_sdk/lightning_cloud/openapi/models/license_key_validate_body.py +123 -0
  37. lightning_sdk/lightning_cloud/openapi/models/update1.py +27 -1
  38. lightning_sdk/lightning_cloud/openapi/models/v1_create_license_request.py +175 -0
  39. lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
  40. lightning_sdk/lightning_cloud/openapi/models/v1_delete_license_response.py +97 -0
  41. lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -1
  42. lightning_sdk/lightning_cloud/openapi/models/v1_external_search_user.py +27 -1
  43. lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_metric.py +201 -0
  44. lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_transfer_estimate_response.py +29 -3
  45. lightning_sdk/lightning_cloud/openapi/models/v1_incident.py +27 -1
  46. lightning_sdk/lightning_cloud/openapi/models/v1_incident_detail.py +149 -0
  47. lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py +27 -1
  48. lightning_sdk/lightning_cloud/openapi/models/v1_license.py +227 -0
  49. lightning_sdk/lightning_cloud/openapi/models/v1_list_filesystem_metrics_response.py +123 -0
  50. lightning_sdk/lightning_cloud/openapi/models/{v1_list_product_licenses_response.py → v1_list_license_response.py} +16 -16
  51. lightning_sdk/lightning_cloud/openapi/models/v1_list_platform_notifications_response.py +123 -0
  52. lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +27 -1
  53. lightning_sdk/lightning_cloud/openapi/models/v1_platform_notification.py +279 -0
  54. lightning_sdk/lightning_cloud/openapi/models/v1_reset_api_key_request.py +97 -0
  55. lightning_sdk/lightning_cloud/openapi/models/v1_reset_api_key_response.py +123 -0
  56. lightning_sdk/lightning_cloud/openapi/models/v1_slack_notifier.py +53 -1
  57. lightning_sdk/lightning_cloud/openapi/models/v1_token_login_request.py +123 -0
  58. lightning_sdk/lightning_cloud/openapi/models/v1_token_login_response.py +123 -0
  59. lightning_sdk/lightning_cloud/openapi/models/v1_token_owner_type.py +104 -0
  60. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +139 -191
  61. lightning_sdk/lightning_cloud/openapi/models/{v1_product_license_check_response.py → v1_validate_license_response.py} +21 -21
  62. lightning_sdk/lightning_cloud/rest_client.py +48 -45
  63. lightning_sdk/machine.py +5 -0
  64. lightning_sdk/pipeline/steps.py +1 -0
  65. lightning_sdk/studio.py +55 -13
  66. lightning_sdk/utils/config.py +18 -3
  67. lightning_sdk/utils/license.py +13 -0
  68. lightning_sdk/utils/resolve.py +6 -1
  69. {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/METADATA +1 -1
  70. {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/RECORD +74 -54
  71. lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +0 -435
  72. lightning_sdk/services/license.py +0 -363
  73. {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/LICENSE +0 -0
  74. {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/WHEEL +0 -0
  75. {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/entry_points.txt +0 -0
  76. {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/top_level.txt +0 -0
@@ -41,25 +41,77 @@ class V1SlackNotifier(object):
41
41
  and the value is json key in definition.
42
42
  """
43
43
  swagger_types = {
44
+ 'api_key': 'str',
45
+ 'channel_id': 'str',
44
46
  'type': 'V1SlackNotifierType',
45
47
  'url': 'str'
46
48
  }
47
49
 
48
50
  attribute_map = {
51
+ 'api_key': 'apiKey',
52
+ 'channel_id': 'channelId',
49
53
  'type': 'type',
50
54
  'url': 'url'
51
55
  }
52
56
 
53
- def __init__(self, type: 'V1SlackNotifierType' =None, url: 'str' =None): # noqa: E501
57
+ def __init__(self, api_key: 'str' =None, channel_id: 'str' =None, type: 'V1SlackNotifierType' =None, url: 'str' =None): # noqa: E501
54
58
  """V1SlackNotifier - a model defined in Swagger""" # noqa: E501
59
+ self._api_key = None
60
+ self._channel_id = None
55
61
  self._type = None
56
62
  self._url = None
57
63
  self.discriminator = None
64
+ if api_key is not None:
65
+ self.api_key = api_key
66
+ if channel_id is not None:
67
+ self.channel_id = channel_id
58
68
  if type is not None:
59
69
  self.type = type
60
70
  if url is not None:
61
71
  self.url = url
62
72
 
73
+ @property
74
+ def api_key(self) -> 'str':
75
+ """Gets the api_key of this V1SlackNotifier. # noqa: E501
76
+
77
+
78
+ :return: The api_key of this V1SlackNotifier. # noqa: E501
79
+ :rtype: str
80
+ """
81
+ return self._api_key
82
+
83
+ @api_key.setter
84
+ def api_key(self, api_key: 'str'):
85
+ """Sets the api_key of this V1SlackNotifier.
86
+
87
+
88
+ :param api_key: The api_key of this V1SlackNotifier. # noqa: E501
89
+ :type: str
90
+ """
91
+
92
+ self._api_key = api_key
93
+
94
+ @property
95
+ def channel_id(self) -> 'str':
96
+ """Gets the channel_id of this V1SlackNotifier. # noqa: E501
97
+
98
+
99
+ :return: The channel_id of this V1SlackNotifier. # noqa: E501
100
+ :rtype: str
101
+ """
102
+ return self._channel_id
103
+
104
+ @channel_id.setter
105
+ def channel_id(self, channel_id: 'str'):
106
+ """Sets the channel_id of this V1SlackNotifier.
107
+
108
+
109
+ :param channel_id: The channel_id of this V1SlackNotifier. # noqa: E501
110
+ :type: str
111
+ """
112
+
113
+ self._channel_id = channel_id
114
+
63
115
  @property
64
116
  def type(self) -> 'V1SlackNotifierType':
65
117
  """Gets the type of this V1SlackNotifier. # noqa: E501
@@ -0,0 +1,123 @@
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 V1TokenLoginRequest(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
+ 'token_key': 'str'
45
+ }
46
+
47
+ attribute_map = {
48
+ 'token_key': 'tokenKey'
49
+ }
50
+
51
+ def __init__(self, token_key: 'str' =None): # noqa: E501
52
+ """V1TokenLoginRequest - a model defined in Swagger""" # noqa: E501
53
+ self._token_key = None
54
+ self.discriminator = None
55
+ if token_key is not None:
56
+ self.token_key = token_key
57
+
58
+ @property
59
+ def token_key(self) -> 'str':
60
+ """Gets the token_key of this V1TokenLoginRequest. # noqa: E501
61
+
62
+
63
+ :return: The token_key of this V1TokenLoginRequest. # noqa: E501
64
+ :rtype: str
65
+ """
66
+ return self._token_key
67
+
68
+ @token_key.setter
69
+ def token_key(self, token_key: 'str'):
70
+ """Sets the token_key of this V1TokenLoginRequest.
71
+
72
+
73
+ :param token_key: The token_key of this V1TokenLoginRequest. # noqa: E501
74
+ :type: str
75
+ """
76
+
77
+ self._token_key = token_key
78
+
79
+ def to_dict(self) -> dict:
80
+ """Returns the model properties as a dict"""
81
+ result = {}
82
+
83
+ for attr, _ in six.iteritems(self.swagger_types):
84
+ value = getattr(self, attr)
85
+ if isinstance(value, list):
86
+ result[attr] = list(map(
87
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
88
+ value
89
+ ))
90
+ elif hasattr(value, "to_dict"):
91
+ result[attr] = value.to_dict()
92
+ elif isinstance(value, dict):
93
+ result[attr] = dict(map(
94
+ lambda item: (item[0], item[1].to_dict())
95
+ if hasattr(item[1], "to_dict") else item,
96
+ value.items()
97
+ ))
98
+ else:
99
+ result[attr] = value
100
+ if issubclass(V1TokenLoginRequest, dict):
101
+ for key, value in self.items():
102
+ result[key] = value
103
+
104
+ return result
105
+
106
+ def to_str(self) -> str:
107
+ """Returns the string representation of the model"""
108
+ return pprint.pformat(self.to_dict())
109
+
110
+ def __repr__(self) -> str:
111
+ """For `print` and `pprint`"""
112
+ return self.to_str()
113
+
114
+ def __eq__(self, other: 'V1TokenLoginRequest') -> bool:
115
+ """Returns true if both objects are equal"""
116
+ if not isinstance(other, V1TokenLoginRequest):
117
+ return False
118
+
119
+ return self.__dict__ == other.__dict__
120
+
121
+ def __ne__(self, other: 'V1TokenLoginRequest') -> bool:
122
+ """Returns true if both objects are not equal"""
123
+ return not self == other
@@ -0,0 +1,123 @@
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 V1TokenLoginResponse(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
+ 'token': 'str'
45
+ }
46
+
47
+ attribute_map = {
48
+ 'token': 'token'
49
+ }
50
+
51
+ def __init__(self, token: 'str' =None): # noqa: E501
52
+ """V1TokenLoginResponse - a model defined in Swagger""" # noqa: E501
53
+ self._token = None
54
+ self.discriminator = None
55
+ if token is not None:
56
+ self.token = token
57
+
58
+ @property
59
+ def token(self) -> 'str':
60
+ """Gets the token of this V1TokenLoginResponse. # noqa: E501
61
+
62
+
63
+ :return: The token of this V1TokenLoginResponse. # noqa: E501
64
+ :rtype: str
65
+ """
66
+ return self._token
67
+
68
+ @token.setter
69
+ def token(self, token: 'str'):
70
+ """Sets the token of this V1TokenLoginResponse.
71
+
72
+
73
+ :param token: The token of this V1TokenLoginResponse. # noqa: E501
74
+ :type: str
75
+ """
76
+
77
+ self._token = token
78
+
79
+ def to_dict(self) -> dict:
80
+ """Returns the model properties as a dict"""
81
+ result = {}
82
+
83
+ for attr, _ in six.iteritems(self.swagger_types):
84
+ value = getattr(self, attr)
85
+ if isinstance(value, list):
86
+ result[attr] = list(map(
87
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
88
+ value
89
+ ))
90
+ elif hasattr(value, "to_dict"):
91
+ result[attr] = value.to_dict()
92
+ elif isinstance(value, dict):
93
+ result[attr] = dict(map(
94
+ lambda item: (item[0], item[1].to_dict())
95
+ if hasattr(item[1], "to_dict") else item,
96
+ value.items()
97
+ ))
98
+ else:
99
+ result[attr] = value
100
+ if issubclass(V1TokenLoginResponse, dict):
101
+ for key, value in self.items():
102
+ result[key] = value
103
+
104
+ return result
105
+
106
+ def to_str(self) -> str:
107
+ """Returns the string representation of the model"""
108
+ return pprint.pformat(self.to_dict())
109
+
110
+ def __repr__(self) -> str:
111
+ """For `print` and `pprint`"""
112
+ return self.to_str()
113
+
114
+ def __eq__(self, other: 'V1TokenLoginResponse') -> bool:
115
+ """Returns true if both objects are equal"""
116
+ if not isinstance(other, V1TokenLoginResponse):
117
+ return False
118
+
119
+ return self.__dict__ == other.__dict__
120
+
121
+ def __ne__(self, other: 'V1TokenLoginResponse') -> bool:
122
+ """Returns true if both objects are not equal"""
123
+ return not self == other
@@ -0,0 +1,104 @@
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 V1TokenOwnerType(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
+ """
38
+ allowed enum values
39
+ """
40
+ UNSPECIFIEDOWNERTYPE = "unspecifiedOwnerType"
41
+ USER = "user"
42
+ ORGANIZATION = "organization"
43
+ """
44
+ Attributes:
45
+ swagger_types (dict): The key is attribute name
46
+ and the value is attribute type.
47
+ attribute_map (dict): The key is attribute name
48
+ and the value is json key in definition.
49
+ """
50
+ swagger_types = {
51
+ }
52
+
53
+ attribute_map = {
54
+ }
55
+
56
+ def __init__(self): # noqa: E501
57
+ """V1TokenOwnerType - a model defined in Swagger""" # noqa: E501
58
+ self.discriminator = None
59
+
60
+ def to_dict(self) -> dict:
61
+ """Returns the model properties as a dict"""
62
+ result = {}
63
+
64
+ for attr, _ in six.iteritems(self.swagger_types):
65
+ value = getattr(self, attr)
66
+ if isinstance(value, list):
67
+ result[attr] = list(map(
68
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
69
+ value
70
+ ))
71
+ elif hasattr(value, "to_dict"):
72
+ result[attr] = value.to_dict()
73
+ elif isinstance(value, dict):
74
+ result[attr] = dict(map(
75
+ lambda item: (item[0], item[1].to_dict())
76
+ if hasattr(item[1], "to_dict") else item,
77
+ value.items()
78
+ ))
79
+ else:
80
+ result[attr] = value
81
+ if issubclass(V1TokenOwnerType, dict):
82
+ for key, value in self.items():
83
+ result[key] = value
84
+
85
+ return result
86
+
87
+ def to_str(self) -> str:
88
+ """Returns the string representation of the model"""
89
+ return pprint.pformat(self.to_dict())
90
+
91
+ def __repr__(self) -> str:
92
+ """For `print` and `pprint`"""
93
+ return self.to_str()
94
+
95
+ def __eq__(self, other: 'V1TokenOwnerType') -> bool:
96
+ """Returns true if both objects are equal"""
97
+ if not isinstance(other, V1TokenOwnerType):
98
+ return False
99
+
100
+ return self.__dict__ == other.__dict__
101
+
102
+ def __ne__(self, other: 'V1TokenOwnerType') -> bool:
103
+ """Returns true if both objects are not equal"""
104
+ return not self == other