kleinkram 0.37.0.dev20241118070559__py3-none-any.whl → 0.37.0.dev20241118113347__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 kleinkram might be problematic. Click here for more details.

@@ -13,6 +13,7 @@ from typing import Tuple
13
13
  from uuid import UUID
14
14
 
15
15
  import boto3.s3.transfer
16
+ import botocore.config
16
17
  import httpx
17
18
  from kleinkram.api.client import AuthenticatedClient
18
19
  from kleinkram.config import Config
@@ -32,6 +33,9 @@ UPLOAD_CANCEL = "/file/cancelUpload"
32
33
  DOWNLOAD_CHUNK_SIZE = 1024 * 1024 * 16
33
34
  DOWNLOAD_URL = "/file/download"
34
35
 
36
+ S3_MAX_RETRIES = 60 # same as frontend
37
+ S3_READ_TIMEOUT = 60 * 5 # 5 minutes
38
+
35
39
 
36
40
  class UploadCredentials(NamedTuple):
37
41
  access_key: str
@@ -155,12 +159,17 @@ def _s3_upload(
155
159
  ) -> bool:
156
160
  # configure boto3
157
161
  try:
162
+ config = botocore.config.Config(
163
+ retries={"max_attempts": S3_MAX_RETRIES},
164
+ read_timeout=S3_READ_TIMEOUT,
165
+ )
158
166
  client = boto3.client(
159
167
  "s3",
160
168
  endpoint_url=endpoint,
161
169
  aws_access_key_id=credentials.access_key,
162
170
  aws_secret_access_key=credentials.secret_key,
163
171
  aws_session_token=credentials.session_token,
172
+ config=config,
164
173
  )
165
174
  client.upload_file(
166
175
  str(local_path),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kleinkram
3
- Version: 0.37.0.dev20241118070559
3
+ Version: 0.37.0.dev20241118113347
4
4
  Summary: give me your bags
5
5
  Author: Cyrill Püntener, Dominique Garmier, Johann Schwabe
6
6
  Classifier: Programming Language :: Python :: 3
@@ -13,7 +13,7 @@ kleinkram/models.py,sha256=dOrvK-H6cW8tPbZUbBeE6MROp17c5hp5FeULKZRpZ3s,4329
13
13
  kleinkram/utils.py,sha256=72PuaARDOlrxTjh5sHS6llvZng2q78j4IpiUP1RG1qA,5335
14
14
  kleinkram/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  kleinkram/api/client.py,sha256=b1mUwpu7zrXVTNjTDfW8aA0hgmsisRIlMOqQTSbd7bg,2142
16
- kleinkram/api/file_transfer.py,sha256=qUnJMv7fNgyCvP3czHrytMdW33kvW2FGbAXf7eDtDZc,8934
16
+ kleinkram/api/file_transfer.py,sha256=LdXHsFkvNnZrpCYAEi17iQINAHFs4k3FeCrWzThiQJQ,9210
17
17
  kleinkram/api/routes.py,sha256=ojAB5Kfnofw6oyeAe_9VS__-YahpWGsiBWl4jjbQO10,12537
18
18
  kleinkram/commands/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
19
19
  kleinkram/commands/download.py,sha256=393n9kaJJJmsAJGdPTrkd-H2giNsJuihr1JD1mdF6rk,3415
@@ -25,9 +25,9 @@ kleinkram/commands/upload.py,sha256=Wc3OkmdtbrloTA4FaE2i1BD2gBcsjkR4T8G9qlIqe-M,
25
25
  kleinkram/commands/verify.py,sha256=CGndDooBIdnYGPpaaBRNvs-3SWoBUquzAJc-3YB6_Yo,3692
26
26
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  tests/test_utils.py,sha256=1OOimNDLfLU5IWSwCtJRrXLw4SCbEe5rV4Z2XA7wCiU,4611
28
- kleinkram-0.37.0.dev20241118070559.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
29
- kleinkram-0.37.0.dev20241118070559.dist-info/METADATA,sha256=dfS6nk0AIra-fJQMVOgCc1kW93rLjRuCeobXbqtdYAk,2335
30
- kleinkram-0.37.0.dev20241118070559.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
31
- kleinkram-0.37.0.dev20241118070559.dist-info/entry_points.txt,sha256=SaB2l5aqhSr8gmaMw2kvQU90a8Bnl7PedU8cWYxkfYo,46
32
- kleinkram-0.37.0.dev20241118070559.dist-info/top_level.txt,sha256=G1Lj9vHAtZn402Ukkrfll-6BCmnDNy_HVtWeNvXzdDA,16
33
- kleinkram-0.37.0.dev20241118070559.dist-info/RECORD,,
28
+ kleinkram-0.37.0.dev20241118113347.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
29
+ kleinkram-0.37.0.dev20241118113347.dist-info/METADATA,sha256=yx6jAxZ0HbqTl09cmOPiGhh8NRBRlsOt0jF2Dep-fZc,2335
30
+ kleinkram-0.37.0.dev20241118113347.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
31
+ kleinkram-0.37.0.dev20241118113347.dist-info/entry_points.txt,sha256=SaB2l5aqhSr8gmaMw2kvQU90a8Bnl7PedU8cWYxkfYo,46
32
+ kleinkram-0.37.0.dev20241118113347.dist-info/top_level.txt,sha256=G1Lj9vHAtZn402Ukkrfll-6BCmnDNy_HVtWeNvXzdDA,16
33
+ kleinkram-0.37.0.dev20241118113347.dist-info/RECORD,,