pybiolib 1.1.1892__py3-none-any.whl → 1.1.1896__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.
- biolib/_internal/data_record/data_record.py +12 -0
- {pybiolib-1.1.1892.dist-info → pybiolib-1.1.1896.dist-info}/METADATA +1 -1
- {pybiolib-1.1.1892.dist-info → pybiolib-1.1.1896.dist-info}/RECORD +6 -6
- {pybiolib-1.1.1892.dist-info → pybiolib-1.1.1896.dist-info}/LICENSE +0 -0
- {pybiolib-1.1.1892.dist-info → pybiolib-1.1.1896.dist-info}/WHEEL +0 -0
- {pybiolib-1.1.1892.dist-info → pybiolib-1.1.1896.dist-info}/entry_points.txt +0 -0
@@ -1,4 +1,6 @@
|
|
1
1
|
import os
|
2
|
+
import shutil
|
3
|
+
import urllib.request
|
2
4
|
from collections import namedtuple
|
3
5
|
from datetime import datetime
|
4
6
|
from fnmatch import fnmatch
|
@@ -49,6 +51,16 @@ class DataRecord:
|
|
49
51
|
|
50
52
|
return self._get_filtered_files(files=files, path_filter=path_filter) if path_filter else files
|
51
53
|
|
54
|
+
def download_zip(self, output_path: str):
|
55
|
+
app_response: AppGetResponse = api_client.get(path='/app/', params={'uri': self._uri}).json()
|
56
|
+
remote_storage_endpoint = DataRecordRemoteStorageEndpoint(
|
57
|
+
resource_version_uuid=app_response['app_version']['public_id'],
|
58
|
+
)
|
59
|
+
with urllib.request.urlopen(remote_storage_endpoint.get_remote_url()) as response, open(
|
60
|
+
output_path, 'wb'
|
61
|
+
) as out_file:
|
62
|
+
shutil.copyfileobj(response, out_file)
|
63
|
+
|
52
64
|
def download_files(self, output_dir: str, path_filter: Optional[PathFilter] = None) -> None:
|
53
65
|
filtered_files = self.list_files(path_filter=path_filter)
|
54
66
|
|
@@ -3,7 +3,7 @@ README.md,sha256=_IH7pxFiqy2bIAmaVeA-iVTyUwWRjMIlfgtUbYTtmls,368
|
|
3
3
|
biolib/__init__.py,sha256=nfZvVkrHZLvjvvlAvFzhvem9NMfqgmw8NWaCH9HGzew,4045
|
4
4
|
biolib/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
biolib/_internal/data_record/__init__.py,sha256=1Bk303i3rFet9veS56fIsrBYtT5X3n9vcsYMA6T6c5o,36
|
6
|
-
biolib/_internal/data_record/data_record.py,sha256=
|
6
|
+
biolib/_internal/data_record/data_record.py,sha256=6ap6f4RMz6FbdHbEfuazvN9ipP2nr54kA-9-W448wts,7127
|
7
7
|
biolib/_internal/data_record/remote_storage_endpoint.py,sha256=LPq8Lr5FhKF9_o5K-bUdT7TeLe5XFUD0AAeTkNEVZug,1133
|
8
8
|
biolib/_internal/http_client.py,sha256=cSBIzh00x2HL3BmLxt_GvDI7bWQMNytv_wOy7EXg8kI,4064
|
9
9
|
biolib/_internal/push_application.py,sha256=H1PGNtVJ0vRC0li39gFMpPpjm6QeZ8Ob-7cLkLmxS_Y,10009
|
@@ -105,8 +105,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
|
|
105
105
|
biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
|
106
106
|
biolib/utils/seq_util.py,sha256=jC5WhH63FTD7SLFJbxQGA2hOt9NTwq9zHl_BEec1Z0c,4907
|
107
107
|
biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
|
108
|
-
pybiolib-1.1.
|
109
|
-
pybiolib-1.1.
|
110
|
-
pybiolib-1.1.
|
111
|
-
pybiolib-1.1.
|
112
|
-
pybiolib-1.1.
|
108
|
+
pybiolib-1.1.1896.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
|
109
|
+
pybiolib-1.1.1896.dist-info/METADATA,sha256=_yVGo6mNI1U75uCSkFegjMgTtSmymqhwh-VzZP1885M,1508
|
110
|
+
pybiolib-1.1.1896.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
111
|
+
pybiolib-1.1.1896.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
|
112
|
+
pybiolib-1.1.1896.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|