atomicshop 2.12.10__py3-none-any.whl → 2.12.11__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 atomicshop might be problematic. Click here for more details.

atomicshop/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Atomic Basic functions and classes to make developer life easier"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '2.12.10'
4
+ __version__ = '2.12.11'
atomicshop/filesystem.py CHANGED
@@ -552,6 +552,34 @@ def copy_directory(source_directory: str, target_directory: str, overwrite: bool
552
552
  shutil.copytree(source_directory, target_directory)
553
553
 
554
554
 
555
+ def copy_files_from_folder_to_folder(source_directory: str, target_directory: str, overwrite: bool = False) -> None:
556
+ """
557
+ The function will copy all the files from source directory to target directory.
558
+
559
+ :param source_directory: string, full path to source directory.
560
+ :param target_directory: string, full path to target directory.
561
+ :param overwrite: boolean, if 'True', then the function will overwrite the files if they exist.
562
+ """
563
+ # Make sure the destination directory exists, if not create it
564
+ os.makedirs(target_directory, exist_ok=True)
565
+
566
+ # Copy contents of the source directory to the destination directory
567
+ for item in os.listdir(source_directory):
568
+ s = os.path.join(source_directory, item)
569
+ d = os.path.join(target_directory, item)
570
+
571
+ if os.path.isdir(s):
572
+ if os.path.exists(d) and not overwrite:
573
+ print(f"Directory {d} already exists. Skipping due to overwrite=False.")
574
+ else:
575
+ shutil.copytree(s, d, dirs_exist_ok=overwrite)
576
+ else:
577
+ if os.path.exists(d) and not overwrite:
578
+ print(f"File {d} already exists. Skipping due to overwrite=False.")
579
+ else:
580
+ shutil.copy2(s, d)
581
+
582
+
555
583
  def get_directory_paths_from_directory(
556
584
  directory_path: str,
557
585
  recursive: bool = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.12.10
3
+ Version: 2.12.11
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=7Vx_nxgUsmh8XnHp545Je0VoGYtduvu1AXK5YqXnoYc,124
1
+ atomicshop/__init__.py,sha256=FlWupiC5nz7Tolwg5ENxv-hkazzMkviH2VV-21o4tHQ,124
2
2
  atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
3
3
  atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
4
4
  atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
@@ -14,7 +14,7 @@ atomicshop/dns.py,sha256=bNZOo5jVPzq7OT2qCPukXoK3zb1oOsyaelUwQEyK1SA,2500
14
14
  atomicshop/domains.py,sha256=Rxu6JhhMqFZRcoFs69IoEd1PtYca0lMCG6F1AomP7z4,3197
15
15
  atomicshop/emails.py,sha256=I0KyODQpIMEsNRi9YWSOL8EUPBiWyon3HRdIuSj3AEU,1410
16
16
  atomicshop/file_types.py,sha256=-0jzQMRlmU1AP9DARjk-HJm1tVE22E6ngP2mRblyEjY,763
17
- atomicshop/filesystem.py,sha256=3LfLBXRwvdeK_qIBhIyGrDBO5l4OMpQ7Nev24yUfg0U,51606
17
+ atomicshop/filesystem.py,sha256=Gp-Pt13hJkuqMqcaxm-x2uJUcv22Drdaa8QuOCDWbms,52879
18
18
  atomicshop/functions.py,sha256=pK8hoCE9z61PtWCxQJsda7YAphrLH1wxU5x-1QJP-sY,499
19
19
  atomicshop/hashing.py,sha256=Le8qGFyt3_wX-zGTeQShz7L2HL_b6nVv9PnawjglyHo,3474
20
20
  atomicshop/http_parse.py,sha256=nrf2rZcprLqtW8HVrV7TCZ1iTBcWRRy-mXIlAOzcaJs,9703
@@ -251,8 +251,8 @@ atomicshop/wrappers/socketw/socket_server_tester.py,sha256=AhpurHJmP2kgzHaUbq5ey
251
251
  atomicshop/wrappers/socketw/socket_wrapper.py,sha256=aXBwlEIJhFT0-c4i8iNlFx2It9VpCEpsv--5Oqcpxao,11624
252
252
  atomicshop/wrappers/socketw/ssl_base.py,sha256=k4V3gwkbq10MvOH4btU4onLX2GNOsSfUAdcHmL1rpVE,2274
253
253
  atomicshop/wrappers/socketw/statistics_csv.py,sha256=t3dtDEfN47CfYVi0CW6Kc2QHTEeZVyYhc57IYYh5nmA,826
254
- atomicshop-2.12.10.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
255
- atomicshop-2.12.10.dist-info/METADATA,sha256=qeP1u3Xf--S_WBIEm2cilMZUhmBdQZMWS-COhqHhmKE,10479
256
- atomicshop-2.12.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
257
- atomicshop-2.12.10.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
258
- atomicshop-2.12.10.dist-info/RECORD,,
254
+ atomicshop-2.12.11.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
255
+ atomicshop-2.12.11.dist-info/METADATA,sha256=Pr00IaUDGCKqj4Nx-LPh-zTmnLNVryo2BMX-189flOg,10479
256
+ atomicshop-2.12.11.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
257
+ atomicshop-2.12.11.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
258
+ atomicshop-2.12.11.dist-info/RECORD,,