dsw-storage 4.20.1__py2.py3-none-any.whl → 4.22.0__py2.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.
- dsw/storage/build_info.py +4 -4
- dsw/storage/s3storage.py +49 -1
- {dsw_storage-4.20.1.dist-info → dsw_storage-4.22.0.dist-info}/METADATA +4 -4
- dsw_storage-4.22.0.dist-info/RECORD +8 -0
- dsw_storage-4.20.1.dist-info/RECORD +0 -8
- {dsw_storage-4.20.1.dist-info → dsw_storage-4.22.0.dist-info}/WHEEL +0 -0
- {dsw_storage-4.20.1.dist-info → dsw_storage-4.22.0.dist-info}/licenses/LICENSE +0 -0
- {dsw_storage-4.20.1.dist-info → dsw_storage-4.22.0.dist-info}/top_level.txt +0 -0
dsw/storage/build_info.py
CHANGED
|
@@ -9,9 +9,9 @@ BuildInfo = namedtuple(
|
|
|
9
9
|
)
|
|
10
10
|
|
|
11
11
|
BUILD_INFO = BuildInfo(
|
|
12
|
-
version='v4.
|
|
13
|
-
built_at='2025-
|
|
14
|
-
sha='
|
|
12
|
+
version='v4.22.0~dffe6c1',
|
|
13
|
+
built_at='2025-09-02 13:01:16Z',
|
|
14
|
+
sha='dffe6c10e47b8795a0d27d495d1c0c0a5d4a76fb',
|
|
15
15
|
branch='HEAD',
|
|
16
|
-
tag='v4.
|
|
16
|
+
tag='v4.22.0',
|
|
17
17
|
)
|
dsw/storage/s3storage.py
CHANGED
|
@@ -91,7 +91,55 @@ class S3Storage:
|
|
|
91
91
|
before=tenacity.before_log(LOG, logging.DEBUG),
|
|
92
92
|
after=tenacity.after_log(LOG, logging.DEBUG),
|
|
93
93
|
)
|
|
94
|
-
def
|
|
94
|
+
def download_questionnaire_file(self, *, tenant_uuid: str, questionnaire_uuid: str,
|
|
95
|
+
file_uuid: str, target_path: pathlib.Path) -> bool:
|
|
96
|
+
return self._download_file(
|
|
97
|
+
tenant_uuid=tenant_uuid,
|
|
98
|
+
file_name=f'questionnaire-files/{questionnaire_uuid}/{file_uuid}',
|
|
99
|
+
target_path=target_path,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
@tenacity.retry(
|
|
103
|
+
reraise=True,
|
|
104
|
+
wait=tenacity.wait_exponential(multiplier=RETRY_S3_MULTIPLIER),
|
|
105
|
+
stop=tenacity.stop_after_attempt(RETRY_S3_TRIES),
|
|
106
|
+
before=tenacity.before_log(LOG, logging.DEBUG),
|
|
107
|
+
after=tenacity.after_log(LOG, logging.DEBUG),
|
|
108
|
+
)
|
|
109
|
+
def download_template_asset(self, *, tenant_uuid: str, template_id: str,
|
|
110
|
+
file_name: str, target_path: pathlib.Path) -> bool:
|
|
111
|
+
return self._download_file(
|
|
112
|
+
tenant_uuid=tenant_uuid,
|
|
113
|
+
file_name=f'templates/{template_id}/{file_name}',
|
|
114
|
+
target_path=target_path,
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
@tenacity.retry(
|
|
118
|
+
reraise=True,
|
|
119
|
+
wait=tenacity.wait_exponential(multiplier=RETRY_S3_MULTIPLIER),
|
|
120
|
+
stop=tenacity.stop_after_attempt(RETRY_S3_TRIES),
|
|
121
|
+
before=tenacity.before_log(LOG, logging.DEBUG),
|
|
122
|
+
after=tenacity.after_log(LOG, logging.DEBUG),
|
|
123
|
+
)
|
|
124
|
+
def download_locale(self, *, tenant_uuid: str, locale_id: str,
|
|
125
|
+
file_name: str, target_path: pathlib.Path) -> bool:
|
|
126
|
+
return self._download_file(
|
|
127
|
+
tenant_uuid=tenant_uuid,
|
|
128
|
+
file_name=f'locales/{locale_id}/{file_name}',
|
|
129
|
+
target_path=target_path,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
@tenacity.retry(
|
|
133
|
+
reraise=True,
|
|
134
|
+
wait=tenacity.wait_exponential(multiplier=RETRY_S3_MULTIPLIER),
|
|
135
|
+
stop=tenacity.stop_after_attempt(RETRY_S3_TRIES),
|
|
136
|
+
before=tenacity.before_log(LOG, logging.DEBUG),
|
|
137
|
+
after=tenacity.after_log(LOG, logging.DEBUG),
|
|
138
|
+
)
|
|
139
|
+
def _download_file(self, *, tenant_uuid: str, file_name: str,
|
|
140
|
+
target_path: pathlib.Path) -> bool:
|
|
141
|
+
if self.multi_tenant:
|
|
142
|
+
file_name = f'{tenant_uuid}/{file_name}'
|
|
95
143
|
try:
|
|
96
144
|
self.client.fget_object(
|
|
97
145
|
bucket_name=self.cfg.bucket,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dsw-storage
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.22.0
|
|
4
4
|
Summary: Library for managing DSW S3 storage
|
|
5
5
|
Author-email: Marek Suchánek <marek.suchanek@ds-wizard.org>
|
|
6
6
|
License: Apache License 2.0
|
|
@@ -11,16 +11,16 @@ Keywords: dsw,s3,bucket,storage
|
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
16
|
Classifier: Topic :: Communications :: File Sharing
|
|
17
17
|
Classifier: Topic :: Utilities
|
|
18
|
-
Requires-Python: <4,>=3.
|
|
18
|
+
Requires-Python: <4,>=3.12
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
Requires-Dist: minio
|
|
22
22
|
Requires-Dist: tenacity
|
|
23
|
-
Requires-Dist: dsw-config==4.
|
|
23
|
+
Requires-Dist: dsw-config==4.22.0
|
|
24
24
|
Dynamic: license-file
|
|
25
25
|
|
|
26
26
|
# Data Stewardship Wizard: Storage
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
dsw/storage/__init__.py,sha256=okElJ2yrAceGuwqdX_N6Gcv8btAiXX9OQqyQMZQnfSk,58
|
|
2
|
+
dsw/storage/build_info.py,sha256=5-HRmmUD6N63p2gVKWbjq-6x-V9gpeqhbQuwCNAFkXY,381
|
|
3
|
+
dsw/storage/s3storage.py,sha256=MIDq4Hl6VoNYEHITiG9uAtGJ4PdTEVmF2yPiJ100Ugw,6328
|
|
4
|
+
dsw_storage-4.22.0.dist-info/licenses/LICENSE,sha256=rDtJ4LdsXvf_euOpGD0Q86P78K4JyM5m4yfYz9wZ750,11346
|
|
5
|
+
dsw_storage-4.22.0.dist-info/METADATA,sha256=NaPLbHR8RzCj68-7ONnhDznnY9rahAV-wvRJLU0Jkv8,1871
|
|
6
|
+
dsw_storage-4.22.0.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
|
|
7
|
+
dsw_storage-4.22.0.dist-info/top_level.txt,sha256=7SfbsHFoJ_vlAgG6C-xzETETwYO71dBrGnod8uMFnjw,4
|
|
8
|
+
dsw_storage-4.22.0.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
dsw/storage/__init__.py,sha256=okElJ2yrAceGuwqdX_N6Gcv8btAiXX9OQqyQMZQnfSk,58
|
|
2
|
-
dsw/storage/build_info.py,sha256=ZPEl_TE1xRrecv0DidwcjMbWKR5jnVrzoo-ZMOoF_Z0,381
|
|
3
|
-
dsw/storage/s3storage.py,sha256=yu2y-ABGfxxepNMExHnOp0xazLgPqiibS4w115vVrE0,4294
|
|
4
|
-
dsw_storage-4.20.1.dist-info/licenses/LICENSE,sha256=rDtJ4LdsXvf_euOpGD0Q86P78K4JyM5m4yfYz9wZ750,11346
|
|
5
|
-
dsw_storage-4.20.1.dist-info/METADATA,sha256=mkoLmY_0_odeClQiG_QXpUA35qqLV2IbMXKA4zx8JI8,1871
|
|
6
|
-
dsw_storage-4.20.1.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
|
|
7
|
-
dsw_storage-4.20.1.dist-info/top_level.txt,sha256=7SfbsHFoJ_vlAgG6C-xzETETwYO71dBrGnod8uMFnjw,4
|
|
8
|
-
dsw_storage-4.20.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|