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.
Files changed (58) hide show
  1. lightning_sdk/__version__.py +1 -1
  2. lightning_sdk/api/studio_api.py +7 -14
  3. lightning_sdk/api/teamspace_api.py +155 -48
  4. lightning_sdk/api/utils.py +8 -0
  5. lightning_sdk/cli/cp/__init__.py +14 -11
  6. lightning_sdk/cli/cp/teamspace_uploads.py +93 -0
  7. lightning_sdk/cli/legacy/download.py +29 -98
  8. lightning_sdk/cli/legacy/upload.py +24 -31
  9. lightning_sdk/cli/studio/cp.py +8 -5
  10. lightning_sdk/cli/studio/ls.py +1 -1
  11. lightning_sdk/cli/studio/rm.py +1 -1
  12. lightning_sdk/cli/utils/{studio_filesystem.py → filesystem.py} +43 -5
  13. lightning_sdk/exceptions.py +27 -0
  14. lightning_sdk/lightning_cloud/openapi/__init__.py +14 -12
  15. lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
  16. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +5 -1
  17. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +163 -466
  18. lightning_sdk/lightning_cloud/openapi/api/container_registry_service_api.py +456 -0
  19. lightning_sdk/lightning_cloud/openapi/api/data_connection_service_api.py +5 -1
  20. lightning_sdk/lightning_cloud/openapi/api/file_system_service_api.py +11 -11
  21. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +113 -0
  22. lightning_sdk/lightning_cloud/openapi/api/organizations_service_api.py +113 -0
  23. lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +5 -1
  24. lightning_sdk/lightning_cloud/openapi/models/__init__.py +13 -12
  25. lightning_sdk/lightning_cloud/openapi/models/{v1_container_registry_integration.py → container_registry_config_ecr.py} +49 -23
  26. lightning_sdk/lightning_cloud/openapi/models/{v1_container_registry_status.py → container_registry_provider.py} +14 -10
  27. lightning_sdk/lightning_cloud/openapi/models/container_registry_service_create_container_registry_body.py +201 -0
  28. lightning_sdk/lightning_cloud/openapi/models/{v1_ecr_registry_config_input.py → container_registry_service_refresh_container_registry_credentials_body.py} +21 -21
  29. lightning_sdk/lightning_cloud/openapi/models/jobs_service_duplicate_deployment_body.py +175 -0
  30. lightning_sdk/lightning_cloud/openapi/models/organizations_service_update_org_role_body.py +175 -0
  31. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +1 -0
  32. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_capacity_reservation.py +27 -1
  33. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +27 -1
  34. lightning_sdk/lightning_cloud/openapi/models/v1_container_registry.py +63 -89
  35. lightning_sdk/lightning_cloud/openapi/models/{cluster_service_add_container_registry_body.py → v1_container_registry_config.py} +16 -16
  36. lightning_sdk/lightning_cloud/openapi/models/{v1_validate_container_registry_response.py → v1_container_registry_scopes.py} +39 -39
  37. lightning_sdk/lightning_cloud/openapi/models/{cluster_service_validate_container_registry_body.py → v1_create_container_registry_response.py} +6 -6
  38. lightning_sdk/lightning_cloud/openapi/models/{cluster_service_refresh_container_registry_credentials_body.py → v1_delete_org_cluster_capacity_reservation_response.py} +6 -6
  39. lightning_sdk/lightning_cloud/openapi/models/v1_describe_org_cluster_capacity_reservation_response.py +201 -0
  40. lightning_sdk/lightning_cloud/openapi/models/v1_generic_job_spec.py +79 -1
  41. lightning_sdk/lightning_cloud/openapi/models/v1_job.py +27 -1
  42. lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_v1.py +1 -27
  43. lightning_sdk/lightning_cloud/openapi/models/v1_list_container_registries_response.py +6 -6
  44. lightning_sdk/lightning_cloud/openapi/models/{v1_ecr_registry_config.py → v1_mithril_direct_v1.py} +51 -51
  45. lightning_sdk/lightning_cloud/openapi/models/v1_refresh_container_registry_credentials_response.py +1 -27
  46. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -53
  47. lightning_sdk/lightning_cloud/openapi/rest.py +2 -2
  48. lightning_sdk/teamspace.py +28 -7
  49. {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/METADATA +1 -1
  50. {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/RECORD +55 -52
  51. lightning_sdk/lightning_cloud/openapi/models/v1_add_container_registry_response.py +0 -123
  52. lightning_sdk/lightning_cloud/openapi/models/v1_container_registry_info.py +0 -281
  53. lightning_sdk/lightning_cloud/openapi/models/v1_ecr_registry_details.py +0 -201
  54. /lightning_sdk/lightning_cloud/openapi/models/{v1_list_filesystem_mmts_response.py → v1_list_filesystem_mm_ts_response.py} +0 -0
  55. {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/LICENSE +0 -0
  56. {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/WHEEL +0 -0
  57. {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/entry_points.txt +0 -0
  58. {lightning_sdk-2026.1.22.dist-info → lightning_sdk-2026.1.27.dist-info}/top_level.txt +0 -0
@@ -12,6 +12,7 @@ from lightning_sdk.api.lit_container_api import LitContainerApi
12
12
  from lightning_sdk.cli.legacy.exceptions import StudioCliError
13
13
  from lightning_sdk.cli.legacy.studios_menu import _StudiosMenu
14
14
  from lightning_sdk.cli.utils.teamspace_selection import TeamspacesMenu
15
+ from lightning_sdk.exceptions import DeprecatedCommand, DeprecatedError
15
16
  from lightning_sdk.models import download_model
16
17
  from lightning_sdk.studio import Studio
17
18
  from lightning_sdk.utils.resolve import _get_authed_user
@@ -63,134 +64,64 @@ def model(name: str, download_dir: str = ".") -> None:
63
64
  )
64
65
 
65
66
 
66
- @download.command(name="folder")
67
- @click.argument("path")
67
+ @download.command(
68
+ name="folder",
69
+ cls=DeprecatedCommand,
70
+ message="Studio downloads via 'lightning download folder' are deprecated. Use 'lightning studio cp -r' instead.",
71
+ )
72
+ @click.argument("path", required=False, nargs=-1)
68
73
  @click.option(
69
74
  "--studio",
70
75
  default=None,
71
- help=(
72
- "The name of the studio to download from. "
73
- "Will show a menu with user's owned studios for selection if not specified. "
74
- "If provided, should be in the form of <TEAMSPACE-NAME>/<STUDIO-NAME> where the names are case-sensitive. "
75
- "The teamspace and studio names can be regular expressions to match, "
76
- "a menu filtered studios will be shown for final selection."
77
- ),
76
+ hidden=True,
78
77
  )
79
78
  @click.option(
80
79
  "--teamspace",
81
80
  default=None,
82
- help="The teamspace the drive folder is part of. Should be of format <OWNER>/<TEAMSPACE_NAME>.",
81
+ hidden=True,
83
82
  )
84
83
  @click.option(
85
84
  "--local-path",
86
85
  "--local_path",
87
- default=".",
88
- type=click.Path(file_okay=False, dir_okay=True),
89
- help="The path to the directory you want to download the folder to.",
86
+ default=None,
87
+ hidden=True,
90
88
  )
91
89
  def folder(
92
90
  path: str = "", studio: Optional[str] = None, teamspace: Optional[str] = None, local_path: str = "."
93
91
  ) -> None:
94
- """Download a folder from a Studio or a Teamspace drive folder.
95
-
96
- Example:
97
- lightning download folder PATH
98
-
99
- PATH: The relative path within the Studio or drive folder you want to download.
100
- Defaults to the entire Studio or drive folder.
101
- """
102
- local_path = Path(local_path)
103
- if not local_path.is_dir():
104
- raise NotADirectoryError(f"'{local_path}' is not a directory")
105
-
106
- if studio and teamspace:
107
- raise ValueError("Either --studio or --teamspace must be provided, not both")
108
-
109
- if studio:
110
- path = _expand_remote_path(path)
111
- resolved_downloader = _resolve_studio(studio)
112
- elif teamspace:
113
- menu = TeamspacesMenu()
114
- resolved_downloader = menu(teamspace)
115
- else:
116
- raise ValueError("Either --studio or --teamspace must be provided")
117
-
118
- if not path:
119
- local_path /= resolved_downloader.name
120
- path = ""
121
-
122
- try:
123
- if not path and teamspace:
124
- raise FileNotFoundError()
125
- resolved_downloader.download_folder(remote_path=path, target_path=str(local_path))
126
- except Exception as e:
127
- raise StudioCliError(
128
- f"Could not download the folder from the given Studio {studio} or Teamspace {teamspace}. "
129
- "Please contact Lightning AI directly to resolve this issue."
130
- ) from e
92
+ """[DEPRECATED] Use 'lightning studio cp -r' instead."""
93
+ raise DeprecatedError(
94
+ "Studio downloads via 'lightning download folder' are deprecated. Use 'lightning studio cp -r' instead."
95
+ )
131
96
 
132
97
 
133
- @download.command(name="file")
134
- @click.argument("path")
98
+ @download.command(
99
+ name="file",
100
+ cls=DeprecatedCommand,
101
+ message="Studio downloads via 'lightning download file' are deprecated. Use 'lightning studio cp' instead.",
102
+ )
103
+ @click.argument("path", required=False, nargs=-1)
135
104
  @click.option(
136
105
  "--studio",
137
106
  default=None,
138
- help=(
139
- "The name of the studio to download from. "
140
- "Will show a menu with user's owned studios for selection if not specified. "
141
- "If provided, should be in the form of <TEAMSPACE-NAME>/<STUDIO-NAME> where the names are case-sensitive. "
142
- "The teamspace and studio names can be regular expressions to match, "
143
- "a menu filtered studios will be shown for final selection."
144
- ),
107
+ hidden=True,
145
108
  )
146
109
  @click.option(
147
110
  "--teamspace",
148
111
  default=None,
149
- help="The teamspace the file is part of. Should be of format <OWNER>/<TEAMSPACE_NAME>.",
112
+ hidden=True,
150
113
  )
151
114
  @click.option(
152
115
  "--local-path",
153
116
  "--local_path",
154
- default=".",
155
- type=click.Path(file_okay=False, dir_okay=True),
156
- help="The path to the directory you want to download the file to.",
117
+ default=None,
118
+ hidden=True,
157
119
  )
158
120
  def file(path: str = "", studio: Optional[str] = None, teamspace: Optional[str] = None, local_path: str = ".") -> None:
159
- """Download a file from a Studio or Teamspace drive file.
160
-
161
- Example:
162
- lightning download file PATH
163
-
164
- PATH: The relative path to the file within the Studio or Teamspace drive file you want to download.
165
- """
166
- local_path = Path(local_path)
167
- if not local_path.is_dir():
168
- raise NotADirectoryError(f"'{local_path}' is not a directory")
169
-
170
- if studio and teamspace:
171
- raise ValueError("Either --studio or --teamspace must be provided, not both")
172
-
173
- if studio:
174
- resolved_downloader = _resolve_studio(studio)
175
- elif teamspace:
176
- menu = TeamspacesMenu()
177
- resolved_downloader = menu(teamspace)
178
- else:
179
- raise ValueError("Either --studio or --teamspace must be provided")
180
-
181
- if not path:
182
- local_path /= resolved_downloader.name
183
- path = ""
184
-
185
- try:
186
- if not path:
187
- raise FileNotFoundError()
188
- resolved_downloader.download_file(remote_path=path, file_path=str(local_path / os.path.basename(path)))
189
- except Exception as e:
190
- raise StudioCliError(
191
- f"Could not download the file from the given Studio {studio} or Teamspace {teamspace}. "
192
- "Please contact Lightning AI directly to resolve this issue."
193
- ) from e
121
+ """[DEPRECATED] Use 'lightning studio cp' instead."""
122
+ raise DeprecatedError(
123
+ "Studio downloads via 'lightning download file' are deprecated. Use 'lightning studio cp' instead."
124
+ )
194
125
 
195
126
 
196
127
  @download.command(name="container")
@@ -18,6 +18,7 @@ from lightning_sdk.cli.legacy.exceptions import StudioCliError
18
18
  from lightning_sdk.cli.legacy.studios_menu import _StudiosMenu
19
19
  from lightning_sdk.cli.utils.teamspace_selection import TeamspacesMenu
20
20
  from lightning_sdk.constants import _LIGHTNING_DEBUG
21
+ from lightning_sdk.exceptions import DeprecatedCommand, DeprecatedError
21
22
  from lightning_sdk.models import upload_model as _upload_model
22
23
  from lightning_sdk.studio import Studio
23
24
  from lightning_sdk.utils.resolve import _get_authed_user
@@ -54,56 +55,48 @@ def model(name: str, path: str = ".", cloud_account: Optional[str] = None) -> No
54
55
  _upload_model(name, path, cloud_account=cloud_account)
55
56
 
56
57
 
57
- @upload.command("folder")
58
- @click.argument("path", type=click.Path(exists=True))
59
- @click.option(
60
- "--studio",
61
- default=None,
62
- help=(
63
- "The name of the studio to upload to. "
64
- "Will show a menu for selection if not specified. "
65
- "If provided, should be in the form of <TEAMSPACE-NAME>/<STUDIO-NAME>"
66
- ),
58
+ @upload.command(
59
+ name="folder",
60
+ cls=DeprecatedCommand,
61
+ message="Studio uploads via 'lightning upload folder' are deprecated. Use 'lightning studio cp -r' instead.",
67
62
  )
63
+ @click.argument("path", type=click.Path(), required=False, nargs=-1)
64
+ @click.option("--studio", default=None, hidden=True)
68
65
  @click.option(
69
66
  "--remote-path",
70
67
  "--remote_path",
71
68
  default=None,
72
- help=(
73
- "The path where the uploaded file should appear on your Studio. "
74
- "Has to be within your Studio's home directory and will be relative to that. "
75
- "If not specified, will use the name of the folder you want to upload and place it in your home directory."
76
- ),
69
+ hidden=True,
77
70
  )
78
71
  def folder(path: str, studio: Optional[str], remote_path: Optional[str]) -> None:
79
- """Upload a folder to a Studio."""
80
- _folder(path=path, studio=studio, remote_path=remote_path)
72
+ """[DEPRECATED] Use 'lightning studio cp -r' instead."""
73
+ raise DeprecatedError(
74
+ "Studio uploads via 'lightning upload folder' are deprecated. Use 'lightning studio cp -r' instead."
75
+ )
81
76
 
82
77
 
83
- @upload.command("file")
84
- @click.argument("path", type=click.Path(exists=True))
78
+ @upload.command(
79
+ name="file",
80
+ cls=DeprecatedCommand,
81
+ message="Studio uploads via 'lightning upload file' are deprecated. Use 'lightning studio cp' instead.",
82
+ )
83
+ @click.argument("path", type=click.Path(), required=False, nargs=-1)
85
84
  @click.option(
86
85
  "--studio",
87
86
  default=None,
88
- help=(
89
- "The name of the studio to upload to. "
90
- "Will show a menu for selection if not specified. "
91
- "If provided, should be in the form of <TEAMSPACE-NAME>/<STUDIO-NAME>"
92
- ),
87
+ hidden=True,
93
88
  )
94
89
  @click.option(
95
90
  "--remote-path",
96
91
  "--remote_path",
97
92
  default=None,
98
- help=(
99
- "The path where the uploaded file should appear on your Studio. "
100
- "Has to be within your Studio's home directory and will be relative to that. "
101
- "If not specified, will use the name of the file you want to upload and place it in your home directory."
102
- ),
93
+ hidden=True,
103
94
  )
104
95
  def file(path: str, studio: Optional[str] = None, remote_path: Optional[str] = None) -> None:
105
- """Upload a file to a Studio."""
106
- _file(path=path, studio=studio, remote_path=remote_path)
96
+ """[DEPRECATED] Use 'lightning studio cp' instead."""
97
+ raise DeprecatedError(
98
+ "Studio uploads via 'lightning upload file' are deprecated. Use 'lightning studio cp' instead."
99
+ )
107
100
 
108
101
 
109
102
  @upload.command("container")
@@ -8,7 +8,7 @@ import click
8
8
  from rich.console import Console
9
9
 
10
10
  from lightning_sdk.api.utils import _get_cloud_url
11
- from lightning_sdk.cli.utils.studio_filesystem import parse_studio_path, resolve_studio
11
+ from lightning_sdk.cli.utils.filesystem import parse_studio_path, resolve_studio
12
12
 
13
13
 
14
14
  @click.command("cp")
@@ -111,10 +111,13 @@ def cp_download(
111
111
  f"'{studio_path_result['destination']}' is a directory. Use -r flag to copy directories recursively."
112
112
  )
113
113
  folder_name = os.path.basename(studio_path_result["destination"].rstrip("/"))
114
- if folder_name == "" and local_path in ("./", "."):
115
- # handle root directory case (e.g. lit://lightning-ai/gpt-oss/studios/manual-lime-ylu2/)
116
- folder_name = selected_studio.name
117
- target_path = os.path.join(local_path, folder_name)
114
+ if local_path in ("./", "."):
115
+ if folder_name == "":
116
+ # handle root directory case (e.g. lit://lightning-ai/gpt-oss/studios/manual-lime-ylu2/)
117
+ folder_name = selected_studio.name
118
+ target_path = os.path.join(local_path, folder_name)
119
+ else:
120
+ target_path = local_path
118
121
 
119
122
  selected_studio.download_folder(studio_path_result["destination"], target_path)
120
123
  console.print(f"See your folder at {target_path}")
@@ -2,7 +2,7 @@
2
2
 
3
3
  import click
4
4
 
5
- from lightning_sdk.cli.utils.studio_filesystem import parse_studio_path, resolve_studio
5
+ from lightning_sdk.cli.utils.filesystem import parse_studio_path, resolve_studio
6
6
 
7
7
 
8
8
  @click.command("ls")
@@ -3,7 +3,7 @@
3
3
  import click
4
4
  from rich.console import Console
5
5
 
6
- from lightning_sdk.cli.utils.studio_filesystem import parse_studio_path, resolve_studio
6
+ from lightning_sdk.cli.utils.filesystem import parse_studio_path, resolve_studio
7
7
  from lightning_sdk.studio import Studio
8
8
 
9
9
 
@@ -4,21 +4,22 @@ from lightning_sdk.cli.utils.owner_selection import OwnerMenu
4
4
  from lightning_sdk.cli.utils.studio_selection import StudiosMenu
5
5
  from lightning_sdk.cli.utils.teamspace_selection import TeamspacesMenu
6
6
  from lightning_sdk.studio import Studio
7
+ from lightning_sdk.teamspace import Teamspace
7
8
 
8
9
 
9
- class StudioPathResult(TypedDict):
10
+ class PathResult(TypedDict):
10
11
  owner: Optional[str]
11
12
  teamspace: Optional[str]
12
13
  studio: Optional[str]
13
14
  destination: Optional[str]
14
15
 
15
16
 
16
- def parse_studio_path(studio_path: str) -> StudioPathResult:
17
+ def parse_studio_path(studio_path: str) -> PathResult:
17
18
  path_string = studio_path.removeprefix("lit://")
18
19
  if not path_string:
19
20
  raise ValueError("Studio path cannot be empty after prefix")
20
21
 
21
- result: StudioPathResult = {"owner": None, "teamspace": None, "studio": None, "destination": None}
22
+ result: PathResult = {"owner": None, "teamspace": None, "studio": None, "destination": None}
22
23
 
23
24
  if "/studios/" in path_string:
24
25
  prefix_part, suffix_part = path_string.split("/studios/", 1)
@@ -54,12 +55,49 @@ def parse_studio_path(studio_path: str) -> StudioPathResult:
54
55
  return result
55
56
 
56
57
 
57
- def resolve_studio(studio_name: Optional[str], teamspace: Optional[str], owner: Optional[str]) -> Studio:
58
+ def parse_teamspace_uploads_path(teamspace_path: str) -> PathResult:
59
+ path_string = teamspace_path.removeprefix("lit://")
60
+ if not path_string:
61
+ raise ValueError("Teamspace path cannot be empty after prefix")
62
+
63
+ result: PathResult = {"owner": None, "teamspace": None, "studio": None, "destination": None}
64
+
65
+ if "/uploads/" in path_string:
66
+ prefix_part, suffix_part = path_string.split("/uploads/", 1)
67
+
68
+ # org and teamspace
69
+ if prefix_part:
70
+ org_ts_components = prefix_part.split("/")
71
+ if len(org_ts_components) == 2:
72
+ result["owner"], result["teamspace"] = org_ts_components
73
+ elif len(org_ts_components) == 1:
74
+ result["teamspace"] = org_ts_components[0]
75
+ else:
76
+ raise ValueError(f"Invalid format: '{prefix_part}'")
77
+
78
+ # studio and destination
79
+ path_parts = suffix_part.split("/")
80
+
81
+ else:
82
+ raise ValueError("Invalid teamspace uploads path: missing '/uploads/' segment")
83
+
84
+ if not path_parts:
85
+ raise ValueError("Invalid: Missing teamspace name.")
86
+
87
+ result["destination"] = suffix_part
88
+
89
+ return result
90
+
91
+
92
+ def resolve_teamspace(teamspace: Optional[str], owner: Optional[str]) -> Teamspace:
58
93
  owner_menu = OwnerMenu()
59
94
  resolved_owner = owner_menu(owner=owner)
60
95
 
61
96
  teamspace_menu = TeamspacesMenu(resolved_owner)
62
- resolved_teamspace = teamspace_menu(teamspace=teamspace)
97
+ return teamspace_menu(teamspace=teamspace)
98
+
63
99
 
100
+ def resolve_studio(studio_name: Optional[str], teamspace: Optional[str], owner: Optional[str]) -> Studio:
101
+ resolved_teamspace = resolve_teamspace(teamspace, owner)
64
102
  studio_menu = StudiosMenu(resolved_teamspace)
65
103
  return studio_menu(studio=studio_name)
@@ -1,6 +1,33 @@
1
+ from typing import Any
2
+
3
+ import click
4
+
5
+
1
6
  class OutOfCapacityError(RuntimeError):
2
7
  """Raised when the requested machine is not available in the selected cloud account."""
3
8
 
4
9
 
5
10
  class NotSupportedError(RuntimeError):
6
11
  """Raised when the requested machine is not supported in the selected cloud account."""
12
+
13
+
14
+ class DeprecatedError(RuntimeError):
15
+ """Raised when a deprecated feature is used."""
16
+
17
+
18
+ class DeprecatedCommand(click.Command):
19
+ """Custom exception for deprecated commands."""
20
+
21
+ def __init__(self, *args: Any, message: str, **kwargs: Any) -> None:
22
+ super().__init__(*args, **kwargs)
23
+ self.deprecated_message = message
24
+
25
+ def get_help(self, ctx: click.Context) -> str:
26
+ if self.deprecated_message:
27
+ raise DeprecatedError(self.deprecated_message)
28
+ return super().get_help(ctx)
29
+
30
+ def invoke(self, ctx: click.Context) -> Any:
31
+ if self.deprecated_message:
32
+ raise DeprecatedError(self.deprecated_message)
33
+ return super().invoke(ctx)
@@ -32,6 +32,7 @@ from lightning_sdk.lightning_cloud.openapi.api.cloud_space_environment_template_
32
32
  from lightning_sdk.lightning_cloud.openapi.api.cloud_space_service_api import CloudSpaceServiceApi
33
33
  from lightning_sdk.lightning_cloud.openapi.api.cloudy_service_api import CloudyServiceApi
34
34
  from lightning_sdk.lightning_cloud.openapi.api.cluster_service_api import ClusterServiceApi
35
+ from lightning_sdk.lightning_cloud.openapi.api.container_registry_service_api import ContainerRegistryServiceApi
35
36
  from lightning_sdk.lightning_cloud.openapi.api.data_connection_service_api import DataConnectionServiceApi
36
37
  from lightning_sdk.lightning_cloud.openapi.api.dataset_service_api import DatasetServiceApi
37
38
  from lightning_sdk.lightning_cloud.openapi.api.deployment_templates_service_api import DeploymentTemplatesServiceApi
@@ -133,7 +134,6 @@ from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_clo
133
134
  from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_cloud_space_version_publication_body import CloudSpaceServiceUpdateCloudSpaceVersionPublicationBody
134
135
  from lightning_sdk.lightning_cloud.openapi.models.cloud_space_service_update_cloud_space_visibility_body import CloudSpaceServiceUpdateCloudSpaceVisibilityBody
135
136
  from lightning_sdk.lightning_cloud.openapi.models.cloudy_service_update_user_cloudy_settings_body import CloudyServiceUpdateUserCloudySettingsBody
136
- from lightning_sdk.lightning_cloud.openapi.models.cluster_service_add_container_registry_body import ClusterServiceAddContainerRegistryBody
137
137
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_create_cluster_capacity_reservation_body import ClusterServiceCreateClusterCapacityReservationBody
138
138
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_create_cluster_proxy_body import ClusterServiceCreateClusterProxyBody
139
139
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_create_cluster_usage_restriction_body import ClusterServiceCreateClusterUsageRestrictionBody
@@ -143,14 +143,16 @@ from lightning_sdk.lightning_cloud.openapi.models.cluster_service_create_project
143
143
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_create_server_alert_body import ClusterServiceCreateServerAlertBody
144
144
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_interrupt_server_body import ClusterServiceInterruptServerBody
145
145
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_purchase_capacity_block_body import ClusterServicePurchaseCapacityBlockBody
146
- from lightning_sdk.lightning_cloud.openapi.models.cluster_service_refresh_container_registry_credentials_body import ClusterServiceRefreshContainerRegistryCredentialsBody
147
146
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_report_machine_system_metrics_body import ClusterServiceReportMachineSystemMetricsBody
148
147
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_server_check_in_body import ClusterServiceServerCheckInBody
149
148
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_sleep_server_body import ClusterServiceSleepServerBody
150
149
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_cluster_body import ClusterServiceUpdateClusterBody
151
150
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_cluster_usage_restriction_body import ClusterServiceUpdateClusterUsageRestrictionBody
152
151
  from lightning_sdk.lightning_cloud.openapi.models.cluster_service_update_project_cluster_body import ClusterServiceUpdateProjectClusterBody
153
- from lightning_sdk.lightning_cloud.openapi.models.cluster_service_validate_container_registry_body import ClusterServiceValidateContainerRegistryBody
152
+ from lightning_sdk.lightning_cloud.openapi.models.container_registry_config_ecr import ContainerRegistryConfigECR
153
+ from lightning_sdk.lightning_cloud.openapi.models.container_registry_provider import ContainerRegistryProvider
154
+ from lightning_sdk.lightning_cloud.openapi.models.container_registry_service_create_container_registry_body import ContainerRegistryServiceCreateContainerRegistryBody
155
+ from lightning_sdk.lightning_cloud.openapi.models.container_registry_service_refresh_container_registry_credentials_body import ContainerRegistryServiceRefreshContainerRegistryCredentialsBody
154
156
  from lightning_sdk.lightning_cloud.openapi.models.create_checkout_session_request_wallet_type import CreateCheckoutSessionRequestWalletType
155
157
  from lightning_sdk.lightning_cloud.openapi.models.data_connection_mount_data_connection_mount_copy_status import DataConnectionMountDataConnectionMountCopyStatus
156
158
  from lightning_sdk.lightning_cloud.openapi.models.data_connection_service_create_data_connection_body import DataConnectionServiceCreateDataConnectionBody
@@ -178,6 +180,7 @@ from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_deployment
178
180
  from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_deployment_body import JobsServiceCreateDeploymentBody
179
181
  from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_job_body import JobsServiceCreateJobBody
180
182
  from lightning_sdk.lightning_cloud.openapi.models.jobs_service_create_multi_machine_job_body import JobsServiceCreateMultiMachineJobBody
183
+ from lightning_sdk.lightning_cloud.openapi.models.jobs_service_duplicate_deployment_body import JobsServiceDuplicateDeploymentBody
181
184
  from lightning_sdk.lightning_cloud.openapi.models.jobs_service_report_deployment_routing_telemetry_body import JobsServiceReportDeploymentRoutingTelemetryBody
182
185
  from lightning_sdk.lightning_cloud.openapi.models.jobs_service_report_job_system_metrics_body import JobsServiceReportJobSystemMetricsBody
183
186
  from lightning_sdk.lightning_cloud.openapi.models.jobs_service_report_logs_activity_body import JobsServiceReportLogsActivityBody
@@ -242,6 +245,7 @@ from lightning_sdk.lightning_cloud.openapi.models.organizations_service_auto_joi
242
245
  from lightning_sdk.lightning_cloud.openapi.models.organizations_service_create_org_membership_body import OrganizationsServiceCreateOrgMembershipBody
243
246
  from lightning_sdk.lightning_cloud.openapi.models.organizations_service_create_org_membership_role_binding_body import OrganizationsServiceCreateOrgMembershipRoleBindingBody
244
247
  from lightning_sdk.lightning_cloud.openapi.models.organizations_service_create_org_role_body import OrganizationsServiceCreateOrgRoleBody
248
+ from lightning_sdk.lightning_cloud.openapi.models.organizations_service_update_org_role_body import OrganizationsServiceUpdateOrgRoleBody
245
249
  from lightning_sdk.lightning_cloud.openapi.models.organizations_service_update_organization_body import OrganizationsServiceUpdateOrganizationBody
246
250
  from lightning_sdk.lightning_cloud.openapi.models.organizations_service_update_organization_credits_auto_replenish_body import OrganizationsServiceUpdateOrganizationCreditsAutoReplenishBody
247
251
  from lightning_sdk.lightning_cloud.openapi.models.organizations_service_validate_auto_join_domain_body import OrganizationsServiceValidateAutoJoinDomainBody
@@ -303,7 +307,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_aws_direct_v1_status import
303
307
  from lightning_sdk.lightning_cloud.openapi.models.v1_abort_storage_transfer_response import V1AbortStorageTransferResponse
304
308
  from lightning_sdk.lightning_cloud.openapi.models.v1_accelerator_quota_info import V1AcceleratorQuotaInfo
305
309
  from lightning_sdk.lightning_cloud.openapi.models.v1_ack_user_storage_violation_response import V1AckUserStorageViolationResponse
306
- from lightning_sdk.lightning_cloud.openapi.models.v1_add_container_registry_response import V1AddContainerRegistryResponse
307
310
  from lightning_sdk.lightning_cloud.openapi.models.v1_add_job_timing_response import V1AddJobTimingResponse
308
311
  from lightning_sdk.lightning_cloud.openapi.models.v1_affiliate_link import V1AffiliateLink
309
312
  from lightning_sdk.lightning_cloud.openapi.models.v1_agent_complete_part_response import V1AgentCompletePartResponse
@@ -422,9 +425,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_contact_assistant_owner_rea
422
425
  from lightning_sdk.lightning_cloud.openapi.models.v1_contact_assistant_owner_response import V1ContactAssistantOwnerResponse
423
426
  from lightning_sdk.lightning_cloud.openapi.models.v1_container_metrics import V1ContainerMetrics
424
427
  from lightning_sdk.lightning_cloud.openapi.models.v1_container_registry import V1ContainerRegistry
425
- from lightning_sdk.lightning_cloud.openapi.models.v1_container_registry_info import V1ContainerRegistryInfo
426
- from lightning_sdk.lightning_cloud.openapi.models.v1_container_registry_integration import V1ContainerRegistryIntegration
427
- from lightning_sdk.lightning_cloud.openapi.models.v1_container_registry_status import V1ContainerRegistryStatus
428
+ from lightning_sdk.lightning_cloud.openapi.models.v1_container_registry_config import V1ContainerRegistryConfig
429
+ from lightning_sdk.lightning_cloud.openapi.models.v1_container_registry_scopes import V1ContainerRegistryScopes
428
430
  from lightning_sdk.lightning_cloud.openapi.models.v1_conversation import V1Conversation
429
431
  from lightning_sdk.lightning_cloud.openapi.models.v1_conversation_response_chunk import V1ConversationResponseChunk
430
432
  from lightning_sdk.lightning_cloud.openapi.models.v1_count_metrics_streams_response import V1CountMetricsStreamsResponse
@@ -443,6 +445,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_create_cluster_encryption_k
443
445
  from lightning_sdk.lightning_cloud.openapi.models.v1_create_cluster_encryption_keys_response import V1CreateClusterEncryptionKeysResponse
444
446
  from lightning_sdk.lightning_cloud.openapi.models.v1_create_cluster_request import V1CreateClusterRequest
445
447
  from lightning_sdk.lightning_cloud.openapi.models.v1_create_cluster_response import V1CreateClusterResponse
448
+ from lightning_sdk.lightning_cloud.openapi.models.v1_create_container_registry_response import V1CreateContainerRegistryResponse
446
449
  from lightning_sdk.lightning_cloud.openapi.models.v1_create_deployment_request import V1CreateDeploymentRequest
447
450
  from lightning_sdk.lightning_cloud.openapi.models.v1_create_deployment_template_request import V1CreateDeploymentTemplateRequest
448
451
  from lightning_sdk.lightning_cloud.openapi.models.v1_create_git_credentials_request import V1CreateGitCredentialsRequest
@@ -529,6 +532,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_metrics_stream_respo
529
532
  from lightning_sdk.lightning_cloud.openapi.models.v1_delete_model_response import V1DeleteModelResponse
530
533
  from lightning_sdk.lightning_cloud.openapi.models.v1_delete_model_version_response import V1DeleteModelVersionResponse
531
534
  from lightning_sdk.lightning_cloud.openapi.models.v1_delete_multi_machine_job_response import V1DeleteMultiMachineJobResponse
535
+ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_org_cluster_capacity_reservation_response import V1DeleteOrgClusterCapacityReservationResponse
532
536
  from lightning_sdk.lightning_cloud.openapi.models.v1_delete_org_membership_response import V1DeleteOrgMembershipResponse
533
537
  from lightning_sdk.lightning_cloud.openapi.models.v1_delete_org_membership_role_binding_response import V1DeleteOrgMembershipRoleBindingResponse
534
538
  from lightning_sdk.lightning_cloud.openapi.models.v1_delete_org_role_response import V1DeleteOrgRoleResponse
@@ -578,6 +582,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_paramet
578
582
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_parameter_type import V1DeploymentTemplateParameterType
579
583
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_summary import V1DeploymentTemplateSummary
580
584
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_type import V1DeploymentTemplateType
585
+ from lightning_sdk.lightning_cloud.openapi.models.v1_describe_org_cluster_capacity_reservation_response import V1DescribeOrgClusterCapacityReservationResponse
581
586
  from lightning_sdk.lightning_cloud.openapi.models.v1_download_job_logs_response import V1DownloadJobLogsResponse
582
587
  from lightning_sdk.lightning_cloud.openapi.models.v1_download_lightningapp_instance_logs_response import V1DownloadLightningappInstanceLogsResponse
583
588
  from lightning_sdk.lightning_cloud.openapi.models.v1_drive import V1Drive
@@ -588,9 +593,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_drive_status import V1Drive
588
593
  from lightning_sdk.lightning_cloud.openapi.models.v1_drive_type import V1DriveType
589
594
  from lightning_sdk.lightning_cloud.openapi.models.v1_drive_type_spec import V1DriveTypeSpec
590
595
  from lightning_sdk.lightning_cloud.openapi.models.v1_drive_type_status import V1DriveTypeStatus
591
- from lightning_sdk.lightning_cloud.openapi.models.v1_ecr_registry_config import V1ECRRegistryConfig
592
- from lightning_sdk.lightning_cloud.openapi.models.v1_ecr_registry_config_input import V1ECRRegistryConfigInput
593
- from lightning_sdk.lightning_cloud.openapi.models.v1_ecr_registry_details import V1ECRRegistryDetails
594
596
  from lightning_sdk.lightning_cloud.openapi.models.v1_efs_config import V1EfsConfig
595
597
  from lightning_sdk.lightning_cloud.openapi.models.v1_endpoint import V1Endpoint
596
598
  from lightning_sdk.lightning_cloud.openapi.models.v1_endpoint_auth import V1EndpointAuth
@@ -811,7 +813,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_apps_respon
811
813
  from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_cloud_spaces_response import V1ListFilesystemCloudSpacesResponse
812
814
  from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_datasets_response import V1ListFilesystemDatasetsResponse
813
815
  from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_jobs_response import V1ListFilesystemJobsResponse
814
- from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_mmts_response import V1ListFilesystemMMTsResponse
816
+ from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_mm_ts_response import V1ListFilesystemMMTsResponse
815
817
  from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_metrics_response import V1ListFilesystemMetricsResponse
816
818
  from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_slurm_jobs_response import V1ListFilesystemSlurmJobsResponse
817
819
  from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_snowflake_response import V1ListFilesystemSnowflakeResponse
@@ -928,6 +930,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_metrics import V1Metrics
928
930
  from lightning_sdk.lightning_cloud.openapi.models.v1_metrics_stream import V1MetricsStream
929
931
  from lightning_sdk.lightning_cloud.openapi.models.v1_metrics_tags import V1MetricsTags
930
932
  from lightning_sdk.lightning_cloud.openapi.models.v1_metrics_tracker import V1MetricsTracker
933
+ from lightning_sdk.lightning_cloud.openapi.models.v1_mithril_direct_v1 import V1MithrilDirectV1
931
934
  from lightning_sdk.lightning_cloud.openapi.models.v1_model import V1Model
932
935
  from lightning_sdk.lightning_cloud.openapi.models.v1_model_file import V1ModelFile
933
936
  from lightning_sdk.lightning_cloud.openapi.models.v1_model_metrics import V1ModelMetrics
@@ -1178,7 +1181,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_user_requested_flow_compute
1178
1181
  from lightning_sdk.lightning_cloud.openapi.models.v1_user_slurm_job_action_response import V1UserSLURMJobActionResponse
1179
1182
  from lightning_sdk.lightning_cloud.openapi.models.v1_validate_assistant_status_response import V1ValidateAssistantStatusResponse
1180
1183
  from lightning_sdk.lightning_cloud.openapi.models.v1_validate_auto_join_domain_response import V1ValidateAutoJoinDomainResponse
1181
- from lightning_sdk.lightning_cloud.openapi.models.v1_validate_container_registry_response import V1ValidateContainerRegistryResponse
1182
1184
  from lightning_sdk.lightning_cloud.openapi.models.v1_validate_data_connection_response import V1ValidateDataConnectionResponse
1183
1185
  from lightning_sdk.lightning_cloud.openapi.models.v1_validate_deployment_image_request import V1ValidateDeploymentImageRequest
1184
1186
  from lightning_sdk.lightning_cloud.openapi.models.v1_validate_deployment_image_response import V1ValidateDeploymentImageResponse
@@ -13,6 +13,7 @@ from lightning_sdk.lightning_cloud.openapi.api.cloud_space_environment_template_
13
13
  from lightning_sdk.lightning_cloud.openapi.api.cloud_space_service_api import CloudSpaceServiceApi
14
14
  from lightning_sdk.lightning_cloud.openapi.api.cloudy_service_api import CloudyServiceApi
15
15
  from lightning_sdk.lightning_cloud.openapi.api.cluster_service_api import ClusterServiceApi
16
+ from lightning_sdk.lightning_cloud.openapi.api.container_registry_service_api import ContainerRegistryServiceApi
16
17
  from lightning_sdk.lightning_cloud.openapi.api.data_connection_service_api import DataConnectionServiceApi
17
18
  from lightning_sdk.lightning_cloud.openapi.api.dataset_service_api import DatasetServiceApi
18
19
  from lightning_sdk.lightning_cloud.openapi.api.deployment_templates_service_api import DeploymentTemplatesServiceApi
@@ -3074,6 +3074,7 @@ class CloudSpaceServiceApi(object):
3074
3074
  :param str cluster_id:
3075
3075
  :param bool local_index: if true, fetch from the local index
3076
3076
  :param bool include_folder_index: if true, include the folder index in the response
3077
+ :param bool only_direct_children: if true, only include direct children of the prefix
3077
3078
  :return: V1GetArtifactsPageResponse
3078
3079
  If the method is called asynchronously,
3079
3080
  returns the request thread.
@@ -3102,12 +3103,13 @@ class CloudSpaceServiceApi(object):
3102
3103
  :param str cluster_id:
3103
3104
  :param bool local_index: if true, fetch from the local index
3104
3105
  :param bool include_folder_index: if true, include the folder index in the response
3106
+ :param bool only_direct_children: if true, only include direct children of the prefix
3105
3107
  :return: V1GetArtifactsPageResponse
3106
3108
  If the method is called asynchronously,
3107
3109
  returns the request thread.
3108
3110
  """
3109
3111
 
3110
- all_params = ['project_id', 'id', 'page_number', 'prefix', 'include_download_url', 'cluster_id', 'local_index', 'include_folder_index'] # noqa: E501
3112
+ all_params = ['project_id', 'id', 'page_number', 'prefix', 'include_download_url', 'cluster_id', 'local_index', 'include_folder_index', 'only_direct_children'] # noqa: E501
3111
3113
  all_params.append('async_req')
3112
3114
  all_params.append('_return_http_data_only')
3113
3115
  all_params.append('_preload_content')
@@ -3152,6 +3154,8 @@ class CloudSpaceServiceApi(object):
3152
3154
  query_params.append(('localIndex', params['local_index'])) # noqa: E501
3153
3155
  if 'include_folder_index' in params:
3154
3156
  query_params.append(('includeFolderIndex', params['include_folder_index'])) # noqa: E501
3157
+ if 'only_direct_children' in params:
3158
+ query_params.append(('onlyDirectChildren', params['only_direct_children'])) # noqa: E501
3155
3159
 
3156
3160
  header_params = {}
3157
3161