sl-shared-assets 1.1.0__py3-none-any.whl → 1.1.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.
Potentially problematic release.
This version of sl-shared-assets might be problematic. Click here for more details.
- sl_shared_assets/server/server.py +14 -0
- sl_shared_assets/server/server.pyi +7 -0
- {sl_shared_assets-1.1.0.dist-info → sl_shared_assets-1.1.1.dist-info}/METADATA +1 -1
- {sl_shared_assets-1.1.0.dist-info → sl_shared_assets-1.1.1.dist-info}/RECORD +7 -7
- {sl_shared_assets-1.1.0.dist-info → sl_shared_assets-1.1.1.dist-info}/WHEEL +0 -0
- {sl_shared_assets-1.1.0.dist-info → sl_shared_assets-1.1.1.dist-info}/entry_points.txt +0 -0
- {sl_shared_assets-1.1.0.dist-info → sl_shared_assets-1.1.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -226,6 +226,20 @@ class Server:
|
|
|
226
226
|
sftp.put(localpath=local_file_path, remotepath=str(remote_file_path))
|
|
227
227
|
sftp.close()
|
|
228
228
|
|
|
229
|
+
def remove(self, remote_path: Path, is_dir: bool) -> None:
|
|
230
|
+
"""Removes the specified file or directory from the remote server.
|
|
231
|
+
|
|
232
|
+
Args:
|
|
233
|
+
remote_path: The path to the file or directory on the remote server to be removed.
|
|
234
|
+
is_dir: Determines whether the input path represents a directory or a file.
|
|
235
|
+
"""
|
|
236
|
+
sftp = self._client.open_sftp()
|
|
237
|
+
if is_dir:
|
|
238
|
+
sftp.rmdir(path=str(remote_path))
|
|
239
|
+
else:
|
|
240
|
+
sftp.unlink(path=str(remote_path))
|
|
241
|
+
sftp.close()
|
|
242
|
+
|
|
229
243
|
def close(self) -> None:
|
|
230
244
|
"""Closes the SSH connection to the server.
|
|
231
245
|
|
|
@@ -102,6 +102,13 @@ class Server:
|
|
|
102
102
|
local_file_path: The path to the file that needs to be copied to the remote server.
|
|
103
103
|
remote_file_path: The path to the file on the remote server (where to copy the file).
|
|
104
104
|
"""
|
|
105
|
+
def remove(self, remote_path: Path, is_dir: bool) -> None:
|
|
106
|
+
"""Removes the specified file or directory from the remote server.
|
|
107
|
+
|
|
108
|
+
Args:
|
|
109
|
+
remote_path: The path to the file or directory on the remote server to be removed.
|
|
110
|
+
is_dir: Determines whether the input path represents a directory or a file.
|
|
111
|
+
"""
|
|
105
112
|
def close(self) -> None:
|
|
106
113
|
"""Closes the SSH connection to the server.
|
|
107
114
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sl-shared-assets
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: Stores assets shared between multiple Sun (NeuroAI) lab data pipelines.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Sun-Lab-NBB/sl-shared-assets
|
|
6
6
|
Project-URL: Documentation, https://sl-shared-assets-api-docs.netlify.app/
|
|
@@ -17,8 +17,8 @@ sl_shared_assets/server/__init__.py,sha256=nyX6-9ACcrQeRQOCNvBVrWSTHGjRPANIG_u0a
|
|
|
17
17
|
sl_shared_assets/server/__init__.pyi,sha256=7o99f8uf6NuBjMZjNAM1FX69Qbu5uBluRSAyaUWbXOU,263
|
|
18
18
|
sl_shared_assets/server/job.py,sha256=GB31yYPEqXR6MgwNmnQrSQuHRJqUHFXcd6p7hb38q_c,7928
|
|
19
19
|
sl_shared_assets/server/job.pyi,sha256=cxgHMpuwHsJGf_ZcTSSa2tZNzeR_GxqlICOsYGV_oy0,5655
|
|
20
|
-
sl_shared_assets/server/server.py,sha256=
|
|
21
|
-
sl_shared_assets/server/server.pyi,sha256=
|
|
20
|
+
sl_shared_assets/server/server.py,sha256=s2lOrOxcBGQsELKrWu9yCX4Ga5olyLNmWLSCOFyyC44,11002
|
|
21
|
+
sl_shared_assets/server/server.pyi,sha256=h8wI9rMcEuGLrJulndUjASM7E_nU4G6gXnjPge6mWHg,5263
|
|
22
22
|
sl_shared_assets/tools/__init__.py,sha256=N95ZPMz-_HdNPrbVieCFza-QSVS6BV2KRB4K1OLRttc,636
|
|
23
23
|
sl_shared_assets/tools/__init__.pyi,sha256=xeDF8itMc0JRgLrO_IN_9gW7cp_Ld-Gf-rjtrgWvQ2I,551
|
|
24
24
|
sl_shared_assets/tools/ascension_tools.py,sha256=kIqYGX9F8lRao_LaVOacIiT8J9SypTvarb9mgaI9ZPs,15387
|
|
@@ -29,8 +29,8 @@ sl_shared_assets/tools/project_management_tools.py,sha256=DgMKd6i3iLG4lwVgcCgQeO
|
|
|
29
29
|
sl_shared_assets/tools/project_management_tools.pyi,sha256=f_3O8UjnfHRMEe2iZpQxKK9Vb0_lJB2yI1WcJPUqGEU,3498
|
|
30
30
|
sl_shared_assets/tools/transfer_tools.py,sha256=J26kwOp_NpPSY0-xu5FTw9udte-rm_mW1FJyaTNoqQI,6606
|
|
31
31
|
sl_shared_assets/tools/transfer_tools.pyi,sha256=FoH7eYZe7guGHfPr0MK5ggO62uXKwD2aJ7h1Bu7PaEE,3294
|
|
32
|
-
sl_shared_assets-1.1.
|
|
33
|
-
sl_shared_assets-1.1.
|
|
34
|
-
sl_shared_assets-1.1.
|
|
35
|
-
sl_shared_assets-1.1.
|
|
36
|
-
sl_shared_assets-1.1.
|
|
32
|
+
sl_shared_assets-1.1.1.dist-info/METADATA,sha256=jVoN45NK064KTfK8vSFMYt8iv_4p2XH7kXM1dL2f94c,49077
|
|
33
|
+
sl_shared_assets-1.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
34
|
+
sl_shared_assets-1.1.1.dist-info/entry_points.txt,sha256=76c00fRS4IuXBP2xOBdvycT15Zen-lHiDg2FaSt-HB4,547
|
|
35
|
+
sl_shared_assets-1.1.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
36
|
+
sl_shared_assets-1.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|