lightning-sdk 2025.11.21__py3-none-any.whl → 2025.12.1__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 +14 -0
- lightning_sdk/cli/studio/cp.py +1 -1
- lightning_sdk/studio.py +25 -0
- {lightning_sdk-2025.11.21.dist-info → lightning_sdk-2025.12.1.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.11.21.dist-info → lightning_sdk-2025.12.1.dist-info}/RECORD +10 -10
- {lightning_sdk-2025.11.21.dist-info → lightning_sdk-2025.12.1.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.11.21.dist-info → lightning_sdk-2025.12.1.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.11.21.dist-info → lightning_sdk-2025.12.1.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.11.21.dist-info → lightning_sdk-2025.12.1.dist-info}/top_level.txt +0 -0
lightning_sdk/__version__.py
CHANGED
lightning_sdk/api/studio_api.py
CHANGED
|
@@ -645,6 +645,20 @@ class StudioApi:
|
|
|
645
645
|
self.stop_keeping_alive(teamspace_id=teamspace_id, studio_id=studio_id)
|
|
646
646
|
self._client.cloud_space_service_delete_cloud_space(project_id=teamspace_id, id=studio_id)
|
|
647
647
|
|
|
648
|
+
def get_tree(self, studio_id: str, teamspace_id: str, path: str) -> None:
|
|
649
|
+
auth = Auth()
|
|
650
|
+
auth.authenticate()
|
|
651
|
+
token = self._client.auth_service_login(V1LoginRequest(auth.api_key)).token
|
|
652
|
+
|
|
653
|
+
query_params = {
|
|
654
|
+
"token": token,
|
|
655
|
+
}
|
|
656
|
+
r = requests.get(
|
|
657
|
+
f"{self._client.api_client.configuration.host}/v1/projects/{teamspace_id}/artifacts/cloudspaces/{studio_id}/trees/{path}",
|
|
658
|
+
params=query_params,
|
|
659
|
+
)
|
|
660
|
+
return r.json()
|
|
661
|
+
|
|
648
662
|
def upload_file(
|
|
649
663
|
self,
|
|
650
664
|
studio_id: str,
|
lightning_sdk/cli/studio/cp.py
CHANGED
|
@@ -106,7 +106,7 @@ def cp_upload(
|
|
|
106
106
|
)
|
|
107
107
|
console.print(f"Uploading to {selected_studio.teamspace.name}/{selected_studio.name}")
|
|
108
108
|
|
|
109
|
-
selected_studio.upload_file(local_file_path,
|
|
109
|
+
selected_studio.upload_file(local_file_path, studio_path_result["destination"])
|
|
110
110
|
|
|
111
111
|
studio_url = (
|
|
112
112
|
_get_cloud_url().replace(":443", "")
|
lightning_sdk/studio.py
CHANGED
|
@@ -570,6 +570,31 @@ class Studio(metaclass=TrackCallsMeta):
|
|
|
570
570
|
raise RuntimeError(output)
|
|
571
571
|
return output
|
|
572
572
|
|
|
573
|
+
def get_path_info(self, path: str = "") -> dict:
|
|
574
|
+
path = path.strip("/")
|
|
575
|
+
|
|
576
|
+
if "/" in path:
|
|
577
|
+
parent_path = path.rsplit("/", 1)[0]
|
|
578
|
+
target_name = path.rsplit("/", 1)[1]
|
|
579
|
+
else:
|
|
580
|
+
parent_path = ""
|
|
581
|
+
target_name = path
|
|
582
|
+
|
|
583
|
+
tree = self._studio_api.get_tree(self._studio.id, self._teamspace.id, path=parent_path)
|
|
584
|
+
tree_items = tree.get("tree", [])
|
|
585
|
+
for item in tree_items:
|
|
586
|
+
item_name = item.get("path", "")
|
|
587
|
+
if item_name == target_name:
|
|
588
|
+
item_type = item.get("type")
|
|
589
|
+
# if type == "blob" it's a file, if "tree" it's a directory
|
|
590
|
+
return {
|
|
591
|
+
"exists": True,
|
|
592
|
+
"type": "file" if item_type == "blob" else "directory",
|
|
593
|
+
"size": item.get("size", 0) if item_type == "blob" else None,
|
|
594
|
+
}
|
|
595
|
+
warnings.warn(f"If '{path}' is a directory, it may be empty and thus not detected.")
|
|
596
|
+
return {"exists": False, "type": None, "size": None}
|
|
597
|
+
|
|
573
598
|
def upload_file(self, file_path: str, remote_path: Optional[str] = None, progress_bar: bool = True) -> None:
|
|
574
599
|
"""Uploads a given file to a remote path on the Studio."""
|
|
575
600
|
if remote_path is None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
docs/source/conf.py,sha256=r8yX20eC-4mHhMTd0SbQb5TlSWHhO6wnJ0VJ_FBFpag,13249
|
|
2
2
|
lightning_sdk/__init__.py,sha256=ym1mOWljHxiO4oijOrmtcjf-eIcwYJVFXkDvLduL4FA,1368
|
|
3
|
-
lightning_sdk/__version__.py,sha256=
|
|
3
|
+
lightning_sdk/__version__.py,sha256=zdvYNGqKWtSI3YmWyIquULLdGllW491fyQ4wWDLEMD0,73
|
|
4
4
|
lightning_sdk/agents.py,sha256=Uqsdu4PgswhpeXZzDSbp3hu30MMOhSlCnp8D56MaS_c,1658
|
|
5
5
|
lightning_sdk/ai_hub.py,sha256=QzCfmX0h2CLn7r0DQyjWg6RnNw26Ey6akiP2Wffl9Ls,7006
|
|
6
6
|
lightning_sdk/base_studio.py,sha256=yMvZ1dDq_avW3iu98CLEo9W9UL54mx4C6FC43IKLWAE,4691
|
|
@@ -17,7 +17,7 @@ lightning_sdk/plugin.py,sha256=yaQrIx2Tt18R0CoarJQAtB_AwaVa436f-eC5rb9yWe4,15579
|
|
|
17
17
|
lightning_sdk/sandbox.py,sha256=_NvnWotEXW2rBiVFZZ4krKXxVjuAqfNh04qELSM0-Pg,5786
|
|
18
18
|
lightning_sdk/serve.py,sha256=XbllHwmOAOHjQJ0AQukwYe3OtspEwhmf5-_HXhL-mpc,11908
|
|
19
19
|
lightning_sdk/status.py,sha256=lLGAuSvXBoXQFEEsEYwdCi0RcSNatUn5OPjJVjDtoM0,386
|
|
20
|
-
lightning_sdk/studio.py,sha256=
|
|
20
|
+
lightning_sdk/studio.py,sha256=yQY2q7zjqYKVCohYeWg96dDfWD1rJ-NEDUwgPZNDpi8,38660
|
|
21
21
|
lightning_sdk/teamspace.py,sha256=pskDJWe3OGKFeXCKr-QZbzgor2AOQwdzgxqlS8Ahj_o,27558
|
|
22
22
|
lightning_sdk/user.py,sha256=TSYh38rxoi7qKOfrK2JYh_Nknya2Kbz2ngDIY85fFOY,1778
|
|
23
23
|
lightning_sdk/api/__init__.py,sha256=8boDRZ0LMl7G_IbpqHS2q3efeX_Y897_gsJ3iBF58M4,538
|
|
@@ -34,7 +34,7 @@ lightning_sdk/api/llm_api.py,sha256=8ouowlX-Ld0hRvueIS6fQqaEJLQMYskvhKV5-Z_A6gE,
|
|
|
34
34
|
lightning_sdk/api/mmt_api.py,sha256=yI_iFtxGd1g0pW82xQWY80jSYVmF_xU-eT1-LgUA-KI,10815
|
|
35
35
|
lightning_sdk/api/org_api.py,sha256=Ze3z_ATVrukobujV5YdC42DKj45Vuwl7X52q_Vr-o3U,803
|
|
36
36
|
lightning_sdk/api/pipeline_api.py,sha256=rJYp_FN7uUjC5xbc6K67l2eRSmVuOkijd5i8Nm5BF7I,4621
|
|
37
|
-
lightning_sdk/api/studio_api.py,sha256=
|
|
37
|
+
lightning_sdk/api/studio_api.py,sha256=WH1wihS3FPfjsvXFdWrN893TOypprERAVdVQ9cnhMuI,41281
|
|
38
38
|
lightning_sdk/api/teamspace_api.py,sha256=wuwW4YbhloFqI9rS_5mbgsS6Dk3zYONLv9M6OoqyDg8,19980
|
|
39
39
|
lightning_sdk/api/user_api.py,sha256=o9gZmtvqNfj4kdSpo2fyyRuFAP7bM5w7mx0Oj9__Ads,4702
|
|
40
40
|
lightning_sdk/api/utils.py,sha256=mB8ZPjxj8jjXMWRBtG-g0ZvR7NayZnGhMtEZfQMHtqA,29734
|
|
@@ -84,7 +84,7 @@ lightning_sdk/cli/license/set.py,sha256=uGjFgq-3jkMF0IstMIIRjKn8GDzg9TIe1OZcRkDT
|
|
|
84
84
|
lightning_sdk/cli/mmt/__init__.py,sha256=CLgr-ZHHLS6Db_JGqpxbn4G2pYrKi4Qn-uhi8e0kFNc,145
|
|
85
85
|
lightning_sdk/cli/studio/__init__.py,sha256=wREPAmPJdN4b51r6RRD1o4aE212KN7xI88Z0O6HTzEU,1022
|
|
86
86
|
lightning_sdk/cli/studio/connect.py,sha256=RLi5VumsVlVDlyiGbST7lDuHAntOj_-99KsNr8J3knE,5057
|
|
87
|
-
lightning_sdk/cli/studio/cp.py,sha256=
|
|
87
|
+
lightning_sdk/cli/studio/cp.py,sha256=qQn803KmK6AR4dIjLgLuOKU8VbC8_FW7eMxAB_lwgno,4765
|
|
88
88
|
lightning_sdk/cli/studio/create.py,sha256=eVkuP1qg1aQSe2jyDgbIg-si5xPl8CwDIPcyvkUEFnQ,3179
|
|
89
89
|
lightning_sdk/cli/studio/delete.py,sha256=Gi1KLCrSgjTiyoQe9NRvF4ZpsNyeM07KHnBxfdJg2FE,1483
|
|
90
90
|
lightning_sdk/cli/studio/list.py,sha256=ieLiHRIfAb7E5e_r48BeTC03ib8RY6maeF7nkmrqaek,3301
|
|
@@ -1281,9 +1281,9 @@ lightning_sdk/utils/logging.py,sha256=WPyOx7KAn8OpRKqoDDlB7MkORtLDryJsj1WVXLYNqy
|
|
|
1281
1281
|
lightning_sdk/utils/names.py,sha256=1EuXbIh7wldkDp1FG10oz9vIOyWrpGWeFFVy-DQBgzA,18162
|
|
1282
1282
|
lightning_sdk/utils/progress.py,sha256=bLWw39fzq29PMWoFXaPIVfoS3Ug245950oWOFJ2ZaiU,12596
|
|
1283
1283
|
lightning_sdk/utils/resolve.py,sha256=ukC-Zn35gNZV-fQ-ZyUgZkRPFb8nwsFh_aN7YcJ0sl8,10613
|
|
1284
|
-
lightning_sdk-2025.
|
|
1285
|
-
lightning_sdk-2025.
|
|
1286
|
-
lightning_sdk-2025.
|
|
1287
|
-
lightning_sdk-2025.
|
|
1288
|
-
lightning_sdk-2025.
|
|
1289
|
-
lightning_sdk-2025.
|
|
1284
|
+
lightning_sdk-2025.12.1.dist-info/LICENSE,sha256=uFIuZwj5z-4TeF2UuacPZ1o17HkvKObT8fY50qN84sg,1064
|
|
1285
|
+
lightning_sdk-2025.12.1.dist-info/METADATA,sha256=PsDUWvnj0fJm-PE18cVr4cxzyQC1vboZY4Z_Z_KfENc,4152
|
|
1286
|
+
lightning_sdk-2025.12.1.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
1287
|
+
lightning_sdk-2025.12.1.dist-info/entry_points.txt,sha256=OoZa4Fc8NMs6GSN0cdA1J8e6couzAcL82CbM1yo4f_M,122
|
|
1288
|
+
lightning_sdk-2025.12.1.dist-info/top_level.txt,sha256=ps8doKILFXmN7F1mHncShmnQoTxKBRPIcchC8TpoBw4,19
|
|
1289
|
+
lightning_sdk-2025.12.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|