lightning-sdk 2026.1.22__py3-none-any.whl → 2026.1.27__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/__version__.py +1 -1
- lightning_sdk/api/studio_api.py +7 -14
- lightning_sdk/api/teamspace_api.py +155 -48
- lightning_sdk/api/utils.py +8 -0
- lightning_sdk/cli/cp/__init__.py +14 -11
- lightning_sdk/cli/cp/teamspace_uploads.py +93 -0
- lightning_sdk/cli/legacy/download.py +29 -98
- lightning_sdk/cli/legacy/upload.py +24 -31
- lightning_sdk/cli/studio/cp.py +8 -5
- lightning_sdk/cli/studio/ls.py +1 -1
- lightning_sdk/cli/studio/rm.py +1 -1
- lightning_sdk/cli/utils/{studio_filesystem.py → filesystem.py} +43 -5
- lightning_sdk/exceptions.py +27 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +14 -12
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +163 -466
- lightning_sdk/lightning_cloud/openapi/api/container_registry_service_api.py +456 -0
- lightning_sdk/lightning_cloud/openapi/api/data_connection_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/file_system_service_api.py +11 -11
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +113 -0
- lightning_sdk/lightning_cloud/openapi/api/organizations_service_api.py +113 -0
- lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +13 -12
- lightning_sdk/lightning_cloud/openapi/models/{v1_container_registry_integration.py → container_registry_config_ecr.py} +49 -23
- lightning_sdk/lightning_cloud/openapi/models/{v1_container_registry_status.py → container_registry_provider.py} +14 -10
- lightning_sdk/lightning_cloud/openapi/models/container_registry_service_create_container_registry_body.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_ecr_registry_config_input.py → container_registry_service_refresh_container_registry_credentials_body.py} +21 -21
- lightning_sdk/lightning_cloud/openapi/models/jobs_service_duplicate_deployment_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/organizations_service_update_org_role_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_capacity_reservation.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_container_registry.py +63 -89
- lightning_sdk/lightning_cloud/openapi/models/{cluster_service_add_container_registry_body.py → v1_container_registry_config.py} +16 -16
- lightning_sdk/lightning_cloud/openapi/models/{v1_validate_container_registry_response.py → v1_container_registry_scopes.py} +39 -39
- lightning_sdk/lightning_cloud/openapi/models/{cluster_service_validate_container_registry_body.py → v1_create_container_registry_response.py} +6 -6
- lightning_sdk/lightning_cloud/openapi/models/{cluster_service_refresh_container_registry_credentials_body.py → v1_delete_org_cluster_capacity_reservation_response.py} +6 -6
- lightning_sdk/lightning_cloud/openapi/models/v1_describe_org_cluster_capacity_reservation_response.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_generic_job_spec.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_job.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_v1.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_list_container_registries_response.py +6 -6
- lightning_sdk/lightning_cloud/openapi/models/{v1_ecr_registry_config.py → v1_mithril_direct_v1.py} +51 -51
- lightning_sdk/lightning_cloud/openapi/models/v1_refresh_container_registry_credentials_response.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -53
- lightning_sdk/lightning_cloud/openapi/rest.py +2 -2
- lightning_sdk/teamspace.py +28 -7
- {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/METADATA +1 -1
- {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/RECORD +55 -52
- lightning_sdk/lightning_cloud/openapi/models/v1_add_container_registry_response.py +0 -123
- lightning_sdk/lightning_cloud/openapi/models/v1_container_registry_info.py +0 -281
- lightning_sdk/lightning_cloud/openapi/models/v1_ecr_registry_details.py +0 -201
- /lightning_sdk/lightning_cloud/openapi/models/{v1_list_filesystem_mmts_response.py → v1_list_filesystem_mm_ts_response.py} +0 -0
- {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/LICENSE +0 -0
- {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/WHEEL +0 -0
- {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/top_level.txt +0 -0
lightning_sdk/lightning_cloud/openapi/models/{v1_ecr_registry_config.py → v1_mithril_direct_v1.py}
RENAMED
|
@@ -28,7 +28,7 @@ if TYPE_CHECKING:
|
|
|
28
28
|
from datetime import datetime
|
|
29
29
|
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
30
|
|
|
31
|
-
class
|
|
31
|
+
class V1MithrilDirectV1(object):
|
|
32
32
|
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
33
|
|
|
34
34
|
Do not edit the class manually.
|
|
@@ -41,92 +41,92 @@ class V1ECRRegistryConfig(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
44
|
+
'primary_region': 'str',
|
|
45
|
+
'project_id': 'str',
|
|
46
|
+
'regions': 'list[str]'
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
attribute_map = {
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
50
|
+
'primary_region': 'primaryRegion',
|
|
51
|
+
'project_id': 'projectId',
|
|
52
|
+
'regions': 'regions'
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
def __init__(self,
|
|
56
|
-
"""
|
|
57
|
-
self.
|
|
58
|
-
self.
|
|
59
|
-
self.
|
|
55
|
+
def __init__(self, primary_region: 'str' =None, project_id: 'str' =None, regions: 'list[str]' =None): # noqa: E501
|
|
56
|
+
"""V1MithrilDirectV1 - a model defined in Swagger""" # noqa: E501
|
|
57
|
+
self._primary_region = None
|
|
58
|
+
self._project_id = None
|
|
59
|
+
self._regions = None
|
|
60
60
|
self.discriminator = None
|
|
61
|
-
if
|
|
62
|
-
self.
|
|
63
|
-
if
|
|
64
|
-
self.
|
|
65
|
-
if
|
|
66
|
-
self.
|
|
61
|
+
if primary_region is not None:
|
|
62
|
+
self.primary_region = primary_region
|
|
63
|
+
if project_id is not None:
|
|
64
|
+
self.project_id = project_id
|
|
65
|
+
if regions is not None:
|
|
66
|
+
self.regions = regions
|
|
67
67
|
|
|
68
68
|
@property
|
|
69
|
-
def
|
|
70
|
-
"""Gets the
|
|
69
|
+
def primary_region(self) -> 'str':
|
|
70
|
+
"""Gets the primary_region of this V1MithrilDirectV1. # noqa: E501
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
:return: The
|
|
73
|
+
:return: The primary_region of this V1MithrilDirectV1. # noqa: E501
|
|
74
74
|
:rtype: str
|
|
75
75
|
"""
|
|
76
|
-
return self.
|
|
76
|
+
return self._primary_region
|
|
77
77
|
|
|
78
|
-
@
|
|
79
|
-
def
|
|
80
|
-
"""Sets the
|
|
78
|
+
@primary_region.setter
|
|
79
|
+
def primary_region(self, primary_region: 'str'):
|
|
80
|
+
"""Sets the primary_region of this V1MithrilDirectV1.
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
:param
|
|
83
|
+
:param primary_region: The primary_region of this V1MithrilDirectV1. # noqa: E501
|
|
84
84
|
:type: str
|
|
85
85
|
"""
|
|
86
86
|
|
|
87
|
-
self.
|
|
87
|
+
self._primary_region = primary_region
|
|
88
88
|
|
|
89
89
|
@property
|
|
90
|
-
def
|
|
91
|
-
"""Gets the
|
|
90
|
+
def project_id(self) -> 'str':
|
|
91
|
+
"""Gets the project_id of this V1MithrilDirectV1. # noqa: E501
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
:return: The
|
|
94
|
+
:return: The project_id of this V1MithrilDirectV1. # noqa: E501
|
|
95
95
|
:rtype: str
|
|
96
96
|
"""
|
|
97
|
-
return self.
|
|
97
|
+
return self._project_id
|
|
98
98
|
|
|
99
|
-
@
|
|
100
|
-
def
|
|
101
|
-
"""Sets the
|
|
99
|
+
@project_id.setter
|
|
100
|
+
def project_id(self, project_id: 'str'):
|
|
101
|
+
"""Sets the project_id of this V1MithrilDirectV1.
|
|
102
102
|
|
|
103
103
|
|
|
104
|
-
:param
|
|
104
|
+
:param project_id: The project_id of this V1MithrilDirectV1. # noqa: E501
|
|
105
105
|
:type: str
|
|
106
106
|
"""
|
|
107
107
|
|
|
108
|
-
self.
|
|
108
|
+
self._project_id = project_id
|
|
109
109
|
|
|
110
110
|
@property
|
|
111
|
-
def
|
|
112
|
-
"""Gets the
|
|
111
|
+
def regions(self) -> 'list[str]':
|
|
112
|
+
"""Gets the regions of this V1MithrilDirectV1. # noqa: E501
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
:return: The
|
|
116
|
-
:rtype: str
|
|
115
|
+
:return: The regions of this V1MithrilDirectV1. # noqa: E501
|
|
116
|
+
:rtype: list[str]
|
|
117
117
|
"""
|
|
118
|
-
return self.
|
|
118
|
+
return self._regions
|
|
119
119
|
|
|
120
|
-
@
|
|
121
|
-
def
|
|
122
|
-
"""Sets the
|
|
120
|
+
@regions.setter
|
|
121
|
+
def regions(self, regions: 'list[str]'):
|
|
122
|
+
"""Sets the regions of this V1MithrilDirectV1.
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
:param
|
|
126
|
-
:type: str
|
|
125
|
+
:param regions: The regions of this V1MithrilDirectV1. # noqa: E501
|
|
126
|
+
:type: list[str]
|
|
127
127
|
"""
|
|
128
128
|
|
|
129
|
-
self.
|
|
129
|
+
self._regions = regions
|
|
130
130
|
|
|
131
131
|
def to_dict(self) -> dict:
|
|
132
132
|
"""Returns the model properties as a dict"""
|
|
@@ -149,7 +149,7 @@ class V1ECRRegistryConfig(object):
|
|
|
149
149
|
))
|
|
150
150
|
else:
|
|
151
151
|
result[attr] = value
|
|
152
|
-
if issubclass(
|
|
152
|
+
if issubclass(V1MithrilDirectV1, dict):
|
|
153
153
|
for key, value in self.items():
|
|
154
154
|
result[key] = value
|
|
155
155
|
|
|
@@ -163,13 +163,13 @@ class V1ECRRegistryConfig(object):
|
|
|
163
163
|
"""For `print` and `pprint`"""
|
|
164
164
|
return self.to_str()
|
|
165
165
|
|
|
166
|
-
def __eq__(self, other: '
|
|
166
|
+
def __eq__(self, other: 'V1MithrilDirectV1') -> bool:
|
|
167
167
|
"""Returns true if both objects are equal"""
|
|
168
|
-
if not isinstance(other,
|
|
168
|
+
if not isinstance(other, V1MithrilDirectV1):
|
|
169
169
|
return False
|
|
170
170
|
|
|
171
171
|
return self.__dict__ == other.__dict__
|
|
172
172
|
|
|
173
|
-
def __ne__(self, other: '
|
|
173
|
+
def __ne__(self, other: 'V1MithrilDirectV1') -> bool:
|
|
174
174
|
"""Returns true if both objects are not equal"""
|
|
175
175
|
return not self == other
|
lightning_sdk/lightning_cloud/openapi/models/v1_refresh_container_registry_credentials_response.py
CHANGED
|
@@ -41,40 +41,14 @@ class V1RefreshContainerRegistryCredentialsResponse(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
-
'refreshed_at': 'datetime'
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
attribute_map = {
|
|
48
|
-
'refreshed_at': 'refreshedAt'
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
def __init__(self
|
|
49
|
+
def __init__(self): # noqa: E501
|
|
52
50
|
"""V1RefreshContainerRegistryCredentialsResponse - a model defined in Swagger""" # noqa: E501
|
|
53
|
-
self._refreshed_at = None
|
|
54
51
|
self.discriminator = None
|
|
55
|
-
if refreshed_at is not None:
|
|
56
|
-
self.refreshed_at = refreshed_at
|
|
57
|
-
|
|
58
|
-
@property
|
|
59
|
-
def refreshed_at(self) -> 'datetime':
|
|
60
|
-
"""Gets the refreshed_at of this V1RefreshContainerRegistryCredentialsResponse. # noqa: E501
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
:return: The refreshed_at of this V1RefreshContainerRegistryCredentialsResponse. # noqa: E501
|
|
64
|
-
:rtype: datetime
|
|
65
|
-
"""
|
|
66
|
-
return self._refreshed_at
|
|
67
|
-
|
|
68
|
-
@refreshed_at.setter
|
|
69
|
-
def refreshed_at(self, refreshed_at: 'datetime'):
|
|
70
|
-
"""Sets the refreshed_at of this V1RefreshContainerRegistryCredentialsResponse.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
:param refreshed_at: The refreshed_at of this V1RefreshContainerRegistryCredentialsResponse. # noqa: E501
|
|
74
|
-
:type: datetime
|
|
75
|
-
"""
|
|
76
|
-
|
|
77
|
-
self._refreshed_at = refreshed_at
|
|
78
52
|
|
|
79
53
|
def to_dict(self) -> dict:
|
|
80
54
|
"""Returns the model properties as a dict"""
|
|
@@ -74,7 +74,6 @@ class V1UserFeatures(object):
|
|
|
74
74
|
'f254': 'bool',
|
|
75
75
|
'f258': 'bool',
|
|
76
76
|
'f259': 'bool',
|
|
77
|
-
'f265': 'bool',
|
|
78
77
|
'f266': 'bool',
|
|
79
78
|
'f268': 'bool',
|
|
80
79
|
'f270': 'bool',
|
|
@@ -92,11 +91,12 @@ class V1UserFeatures(object):
|
|
|
92
91
|
'f288': 'bool',
|
|
93
92
|
'f289': 'bool',
|
|
94
93
|
'f290': 'bool',
|
|
95
|
-
'f291': 'bool',
|
|
96
94
|
'f292': 'bool',
|
|
97
95
|
'f293': 'bool',
|
|
98
96
|
'f294': 'bool',
|
|
99
97
|
'f295': 'bool',
|
|
98
|
+
'f296': 'bool',
|
|
99
|
+
'f297': 'bool',
|
|
100
100
|
'fair_share': 'bool',
|
|
101
101
|
'featured_studios_admin': 'bool',
|
|
102
102
|
'job_artifacts_v2': 'bool',
|
|
@@ -169,7 +169,6 @@ class V1UserFeatures(object):
|
|
|
169
169
|
'f254': 'f254',
|
|
170
170
|
'f258': 'f258',
|
|
171
171
|
'f259': 'f259',
|
|
172
|
-
'f265': 'f265',
|
|
173
172
|
'f266': 'f266',
|
|
174
173
|
'f268': 'f268',
|
|
175
174
|
'f270': 'f270',
|
|
@@ -187,11 +186,12 @@ class V1UserFeatures(object):
|
|
|
187
186
|
'f288': 'f288',
|
|
188
187
|
'f289': 'f289',
|
|
189
188
|
'f290': 'f290',
|
|
190
|
-
'f291': 'f291',
|
|
191
189
|
'f292': 'f292',
|
|
192
190
|
'f293': 'f293',
|
|
193
191
|
'f294': 'f294',
|
|
194
192
|
'f295': 'f295',
|
|
193
|
+
'f296': 'f296',
|
|
194
|
+
'f297': 'f297',
|
|
195
195
|
'fair_share': 'fairShare',
|
|
196
196
|
'featured_studios_admin': 'featuredStudiosAdmin',
|
|
197
197
|
'job_artifacts_v2': 'jobArtifactsV2',
|
|
@@ -230,7 +230,7 @@ class V1UserFeatures(object):
|
|
|
230
230
|
'weka': 'weka'
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
def __init__(self, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, b2c_experience: 'bool' =None, byo_machine_type: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, chat_models: 'bool' =None, cloudspace_schedules: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, control_center_monitoring: 'bool' =None, cost_attribution_settings: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, f234: 'bool' =None, f236: 'bool' =None, f240: 'bool' =None, f241: 'bool' =None, f243: 'bool' =None, f245: 'bool' =None, f247: 'bool' =None, f250: 'bool' =None, f252: 'bool' =None, f253: 'bool' =None, f254: 'bool' =None, f258: 'bool' =None, f259: 'bool' =None,
|
|
233
|
+
def __init__(self, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, b2c_experience: 'bool' =None, byo_machine_type: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, chat_models: 'bool' =None, cloudspace_schedules: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, control_center_monitoring: 'bool' =None, cost_attribution_settings: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, f234: 'bool' =None, f236: 'bool' =None, f240: 'bool' =None, f241: 'bool' =None, f243: 'bool' =None, f245: 'bool' =None, f247: 'bool' =None, f250: 'bool' =None, f252: 'bool' =None, f253: 'bool' =None, f254: 'bool' =None, f258: 'bool' =None, f259: 'bool' =None, f266: 'bool' =None, f268: 'bool' =None, f270: 'bool' =None, f271: 'bool' =None, f272: 'bool' =None, f273: 'bool' =None, f275: 'bool' =None, f276: 'bool' =None, f279: 'bool' =None, f280: 'bool' =None, f281: 'bool' =None, f283: 'bool' =None, f285: 'bool' =None, f287: 'bool' =None, f288: 'bool' =None, f289: 'bool' =None, f290: 'bool' =None, f292: 'bool' =None, f293: 'bool' =None, f294: 'bool' =None, f295: 'bool' =None, f296: 'bool' =None, f297: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, job_artifacts_v2: 'bool' =None, kubernetes_cluster_ui: 'bool' =None, kubernetes_clusters: 'bool' =None, landing_studios: 'bool' =None, marketplace: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, multiple_studio_versions: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, persistent_disk: 'bool' =None, plugin_distributed: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_sweeps: 'bool' =None, product_generator: 'bool' =None, product_license: 'bool' =None, project_selector: 'bool' =None, publish_pipelines: 'bool' =None, reserved_machines_tab: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, show_dev_admin: 'bool' =None, slurm: 'bool' =None, specialised_studios: 'bool' =None, storage_overuse_deletion: 'bool' =None, studio_config: 'bool' =None, studio_version_visibility: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None): # noqa: E501
|
|
234
234
|
"""V1UserFeatures - a model defined in Swagger""" # noqa: E501
|
|
235
235
|
self._affiliate_links = None
|
|
236
236
|
self._agents_v2 = None
|
|
@@ -265,7 +265,6 @@ class V1UserFeatures(object):
|
|
|
265
265
|
self._f254 = None
|
|
266
266
|
self._f258 = None
|
|
267
267
|
self._f259 = None
|
|
268
|
-
self._f265 = None
|
|
269
268
|
self._f266 = None
|
|
270
269
|
self._f268 = None
|
|
271
270
|
self._f270 = None
|
|
@@ -283,11 +282,12 @@ class V1UserFeatures(object):
|
|
|
283
282
|
self._f288 = None
|
|
284
283
|
self._f289 = None
|
|
285
284
|
self._f290 = None
|
|
286
|
-
self._f291 = None
|
|
287
285
|
self._f292 = None
|
|
288
286
|
self._f293 = None
|
|
289
287
|
self._f294 = None
|
|
290
288
|
self._f295 = None
|
|
289
|
+
self._f296 = None
|
|
290
|
+
self._f297 = None
|
|
291
291
|
self._fair_share = None
|
|
292
292
|
self._featured_studios_admin = None
|
|
293
293
|
self._job_artifacts_v2 = None
|
|
@@ -391,8 +391,6 @@ class V1UserFeatures(object):
|
|
|
391
391
|
self.f258 = f258
|
|
392
392
|
if f259 is not None:
|
|
393
393
|
self.f259 = f259
|
|
394
|
-
if f265 is not None:
|
|
395
|
-
self.f265 = f265
|
|
396
394
|
if f266 is not None:
|
|
397
395
|
self.f266 = f266
|
|
398
396
|
if f268 is not None:
|
|
@@ -427,8 +425,6 @@ class V1UserFeatures(object):
|
|
|
427
425
|
self.f289 = f289
|
|
428
426
|
if f290 is not None:
|
|
429
427
|
self.f290 = f290
|
|
430
|
-
if f291 is not None:
|
|
431
|
-
self.f291 = f291
|
|
432
428
|
if f292 is not None:
|
|
433
429
|
self.f292 = f292
|
|
434
430
|
if f293 is not None:
|
|
@@ -437,6 +433,10 @@ class V1UserFeatures(object):
|
|
|
437
433
|
self.f294 = f294
|
|
438
434
|
if f295 is not None:
|
|
439
435
|
self.f295 = f295
|
|
436
|
+
if f296 is not None:
|
|
437
|
+
self.f296 = f296
|
|
438
|
+
if f297 is not None:
|
|
439
|
+
self.f297 = f297
|
|
440
440
|
if fair_share is not None:
|
|
441
441
|
self.fair_share = fair_share
|
|
442
442
|
if featured_studios_admin is not None:
|
|
@@ -1203,27 +1203,6 @@ class V1UserFeatures(object):
|
|
|
1203
1203
|
|
|
1204
1204
|
self._f259 = f259
|
|
1205
1205
|
|
|
1206
|
-
@property
|
|
1207
|
-
def f265(self) -> 'bool':
|
|
1208
|
-
"""Gets the f265 of this V1UserFeatures. # noqa: E501
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
:return: The f265 of this V1UserFeatures. # noqa: E501
|
|
1212
|
-
:rtype: bool
|
|
1213
|
-
"""
|
|
1214
|
-
return self._f265
|
|
1215
|
-
|
|
1216
|
-
@f265.setter
|
|
1217
|
-
def f265(self, f265: 'bool'):
|
|
1218
|
-
"""Sets the f265 of this V1UserFeatures.
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
:param f265: The f265 of this V1UserFeatures. # noqa: E501
|
|
1222
|
-
:type: bool
|
|
1223
|
-
"""
|
|
1224
|
-
|
|
1225
|
-
self._f265 = f265
|
|
1226
|
-
|
|
1227
1206
|
@property
|
|
1228
1207
|
def f266(self) -> 'bool':
|
|
1229
1208
|
"""Gets the f266 of this V1UserFeatures. # noqa: E501
|
|
@@ -1581,27 +1560,6 @@ class V1UserFeatures(object):
|
|
|
1581
1560
|
|
|
1582
1561
|
self._f290 = f290
|
|
1583
1562
|
|
|
1584
|
-
@property
|
|
1585
|
-
def f291(self) -> 'bool':
|
|
1586
|
-
"""Gets the f291 of this V1UserFeatures. # noqa: E501
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
:return: The f291 of this V1UserFeatures. # noqa: E501
|
|
1590
|
-
:rtype: bool
|
|
1591
|
-
"""
|
|
1592
|
-
return self._f291
|
|
1593
|
-
|
|
1594
|
-
@f291.setter
|
|
1595
|
-
def f291(self, f291: 'bool'):
|
|
1596
|
-
"""Sets the f291 of this V1UserFeatures.
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
:param f291: The f291 of this V1UserFeatures. # noqa: E501
|
|
1600
|
-
:type: bool
|
|
1601
|
-
"""
|
|
1602
|
-
|
|
1603
|
-
self._f291 = f291
|
|
1604
|
-
|
|
1605
1563
|
@property
|
|
1606
1564
|
def f292(self) -> 'bool':
|
|
1607
1565
|
"""Gets the f292 of this V1UserFeatures. # noqa: E501
|
|
@@ -1686,6 +1644,48 @@ class V1UserFeatures(object):
|
|
|
1686
1644
|
|
|
1687
1645
|
self._f295 = f295
|
|
1688
1646
|
|
|
1647
|
+
@property
|
|
1648
|
+
def f296(self) -> 'bool':
|
|
1649
|
+
"""Gets the f296 of this V1UserFeatures. # noqa: E501
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
:return: The f296 of this V1UserFeatures. # noqa: E501
|
|
1653
|
+
:rtype: bool
|
|
1654
|
+
"""
|
|
1655
|
+
return self._f296
|
|
1656
|
+
|
|
1657
|
+
@f296.setter
|
|
1658
|
+
def f296(self, f296: 'bool'):
|
|
1659
|
+
"""Sets the f296 of this V1UserFeatures.
|
|
1660
|
+
|
|
1661
|
+
|
|
1662
|
+
:param f296: The f296 of this V1UserFeatures. # noqa: E501
|
|
1663
|
+
:type: bool
|
|
1664
|
+
"""
|
|
1665
|
+
|
|
1666
|
+
self._f296 = f296
|
|
1667
|
+
|
|
1668
|
+
@property
|
|
1669
|
+
def f297(self) -> 'bool':
|
|
1670
|
+
"""Gets the f297 of this V1UserFeatures. # noqa: E501
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
:return: The f297 of this V1UserFeatures. # noqa: E501
|
|
1674
|
+
:rtype: bool
|
|
1675
|
+
"""
|
|
1676
|
+
return self._f297
|
|
1677
|
+
|
|
1678
|
+
@f297.setter
|
|
1679
|
+
def f297(self, f297: 'bool'):
|
|
1680
|
+
"""Sets the f297 of this V1UserFeatures.
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
:param f297: The f297 of this V1UserFeatures. # noqa: E501
|
|
1684
|
+
:type: bool
|
|
1685
|
+
"""
|
|
1686
|
+
|
|
1687
|
+
self._f297 = f297
|
|
1688
|
+
|
|
1689
1689
|
@property
|
|
1690
1690
|
def fair_share(self) -> 'bool':
|
|
1691
1691
|
"""Gets the fair_share of this V1UserFeatures. # noqa: E501
|
|
@@ -49,11 +49,11 @@ class RESTResponse(io.IOBase):
|
|
|
49
49
|
|
|
50
50
|
def getheaders(self):
|
|
51
51
|
"""Returns a dictionary of the response headers."""
|
|
52
|
-
return self.urllib3_response.
|
|
52
|
+
return self.urllib3_response.getheaders()
|
|
53
53
|
|
|
54
54
|
def getheader(self, name, default=None):
|
|
55
55
|
"""Returns a given response header."""
|
|
56
|
-
return self.urllib3_response.
|
|
56
|
+
return self.urllib3_response.getheader(name, default)
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
class RESTClientObject(object):
|
lightning_sdk/teamspace.py
CHANGED
|
@@ -539,21 +539,37 @@ class Teamspace(metaclass=TrackCallsMeta):
|
|
|
539
539
|
return self._teamspace_api.list_model_versions(teamspace_id=self.id, model_name=name)
|
|
540
540
|
|
|
541
541
|
def upload_file(
|
|
542
|
-
self,
|
|
542
|
+
self,
|
|
543
|
+
file_path: Union[Path, str],
|
|
544
|
+
remote_path: Optional[str] = None,
|
|
545
|
+
progress_bar: bool = True,
|
|
546
|
+
cloud_account: Optional[str] = None,
|
|
543
547
|
) -> None:
|
|
544
548
|
"""Uploads file to given remote path in the Teamspace drive."""
|
|
545
549
|
if remote_path is None:
|
|
546
550
|
remote_path = os.path.split(file_path)[1]
|
|
547
551
|
|
|
552
|
+
if cloud_account is None:
|
|
553
|
+
warnings.warn(
|
|
554
|
+
f"No cloud account specified. Using teamspace default cloud account: {self.default_cloud_account}."
|
|
555
|
+
)
|
|
556
|
+
cloud_account = self.default_cloud_account
|
|
557
|
+
|
|
548
558
|
self._teamspace_api.upload_file(
|
|
549
559
|
teamspace_id=self._teamspace.id,
|
|
550
|
-
cloud_account=
|
|
560
|
+
cloud_account=cloud_account,
|
|
551
561
|
file_path=file_path,
|
|
552
562
|
remote_path=os.path.normpath(remote_path),
|
|
553
563
|
progress_bar=progress_bar,
|
|
554
564
|
)
|
|
555
565
|
|
|
556
|
-
def upload_folder(
|
|
566
|
+
def upload_folder(
|
|
567
|
+
self,
|
|
568
|
+
folder_path: str,
|
|
569
|
+
remote_path: Optional[str] = None,
|
|
570
|
+
progress_bar: bool = True,
|
|
571
|
+
cloud_account: Optional[str] = None,
|
|
572
|
+
) -> None:
|
|
557
573
|
"""Uploads a given folder to a remote path in the Teamspace drive."""
|
|
558
574
|
if folder_path is None:
|
|
559
575
|
raise ValueError("Cannot upload a folder that is None.")
|
|
@@ -575,13 +591,15 @@ class Teamspace(metaclass=TrackCallsMeta):
|
|
|
575
591
|
for local_file, remote_path in sorted(all_files, key=lambda p: p[1]):
|
|
576
592
|
if progress_bar:
|
|
577
593
|
progress_bar.set_description(f"Uploading {local_file}")
|
|
578
|
-
self.upload_file(local_file, remote_path=remote_path, progress_bar=False)
|
|
594
|
+
self.upload_file(local_file, remote_path=remote_path, progress_bar=False, cloud_account=cloud_account)
|
|
579
595
|
if progress_bar:
|
|
580
596
|
progress_bar.update(1)
|
|
581
597
|
if progress_bar:
|
|
582
598
|
progress_bar.close()
|
|
583
599
|
|
|
584
|
-
def download_file(
|
|
600
|
+
def download_file(
|
|
601
|
+
self, remote_path: str, file_path: Optional[str] = None, cloud_account: Optional[str] = None
|
|
602
|
+
) -> None:
|
|
585
603
|
"""Downloads a given file in Teamspace drive to a target location."""
|
|
586
604
|
if file_path is None:
|
|
587
605
|
file_path = remote_path
|
|
@@ -590,9 +608,12 @@ class Teamspace(metaclass=TrackCallsMeta):
|
|
|
590
608
|
path=remote_path,
|
|
591
609
|
target_path=file_path,
|
|
592
610
|
teamspace_id=self._teamspace.id,
|
|
611
|
+
cloud_account=cloud_account,
|
|
593
612
|
)
|
|
594
613
|
|
|
595
|
-
def download_folder(
|
|
614
|
+
def download_folder(
|
|
615
|
+
self, remote_path: str, target_path: Optional[str] = None, cloud_account: Optional[str] = None
|
|
616
|
+
) -> None:
|
|
596
617
|
"""Downloads a folder in the Teamspace drive to a given target path."""
|
|
597
618
|
if target_path is None:
|
|
598
619
|
target_path = remote_path
|
|
@@ -601,7 +622,7 @@ class Teamspace(metaclass=TrackCallsMeta):
|
|
|
601
622
|
path=remote_path,
|
|
602
623
|
target_path=target_path,
|
|
603
624
|
teamspace_id=self._teamspace.id,
|
|
604
|
-
cloud_account=
|
|
625
|
+
cloud_account=cloud_account,
|
|
605
626
|
)
|
|
606
627
|
|
|
607
628
|
def new_folder(
|