ddi-fw 0.0.20__py3-none-any.whl → 0.0.21__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.
@@ -15,15 +15,15 @@ class ZipHelper:
15
15
  with z.ZipFile(f'{output_path}/{name}.zip', 'w', compression=z.ZIP_LZMA, compresslevel=z.ZIP_LZMA) as zipObj:
16
16
  zipObj.write(file_path, basename(file_path))
17
17
 
18
- def zip_as_multipart(self, name, file_path,output_path, chunk_size):
19
- self.zip_single_file(name,file_path, output_path+"/parts")
18
+ def zip_as_multipart(self, name, folder, file_name, output_path, chunk_size):
19
+ self.zip_single_file(name, folder+'/'+file_name, output_path)
20
20
  with open(file_path, 'rb') as f:
21
21
  chunk_number = 1
22
22
  while True:
23
23
  chunk = f.read(chunk_size)
24
24
  if not chunk:
25
25
  break
26
- with open(f"{file_path}.part{chunk_number:03}", 'wb') as chunk_file:
26
+ with open(f"{folder}/path/{file_name}.part{chunk_number:03}", 'wb') as chunk_file:
27
27
  chunk_file.write(chunk)
28
28
  chunk_number += 1
29
29
 
@@ -68,8 +68,7 @@ class ZipHelper:
68
68
  for part in input_parts:
69
69
  with open(part, 'rb') as infile:
70
70
  outfile.write(infile.read())
71
- self.extract(parts_path,output_path)
72
-
71
+ self.extract(parts_path, output_path)
73
72
 
74
73
 
75
74
  # if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ddi_fw
3
- Version: 0.0.20
3
+ Version: 0.0.21
4
4
  Summary: Do not use :)
5
5
  Author-email: Kıvanç Bayraktar <bayraktarkivanc@gmail.com>
6
6
  Maintainer-email: Kıvanç Bayraktar <bayraktarkivanc@gmail.com>
@@ -78,8 +78,8 @@ ddi_fw/test/type_guarding_test.py,sha256=KxjyBxohDu7lwpejalCj-REjtJ-k1S1wQbOB6TG
78
78
  ddi_fw/utils/__init__.py,sha256=nhNU_sEp55xsZ5VtvhozjKg6r4GWP6SJI13v8F_jbCg,217
79
79
  ddi_fw/utils/enums.py,sha256=19eJ3fX5eRK_xPvkYcukmug144jXPH4X9zQqtsFBj5A,671
80
80
  ddi_fw/utils/utils.py,sha256=Na6Y8mY-CFbQjrgd9xC8agcrjVvTj_7KIXqFm1H_3qU,3549
81
- ddi_fw/utils/zip_helper.py,sha256=Rwpgslpea8HKCr6Q9yML9t6HbiyUcX5VlWnyBGMWcCQ,3528
82
- ddi_fw-0.0.20.dist-info/METADATA,sha256=hKr40hLqVDLM3Tvn-Y0_0gLSphtCH3PW3Q0Aeho5ShM,1541
83
- ddi_fw-0.0.20.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
84
- ddi_fw-0.0.20.dist-info/top_level.txt,sha256=PMwHICFZTZtcpzQNPV4UQnfNXYIeLR_Ste-Wfc1h810,7
85
- ddi_fw-0.0.20.dist-info/RECORD,,
81
+ ddi_fw/utils/zip_helper.py,sha256=1YJmsSlY1bCaQkDFLgtZ7w2xViHSEZaL0B0ZoohdOIY,3545
82
+ ddi_fw-0.0.21.dist-info/METADATA,sha256=_seeyh1D-dtArgpdDEB-IinRJZw_y7tNklrnqaUt5u4,1541
83
+ ddi_fw-0.0.21.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
84
+ ddi_fw-0.0.21.dist-info/top_level.txt,sha256=PMwHICFZTZtcpzQNPV4UQnfNXYIeLR_Ste-Wfc1h810,7
85
+ ddi_fw-0.0.21.dist-info/RECORD,,