atomicshop 3.1.5__py3-none-any.whl → 3.1.6__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__ = '3.1.5'
4
+ __version__ = '3.1.6'
atomicshop/web.py CHANGED
@@ -157,6 +157,7 @@ def download(
157
157
  target_directory: str = None,
158
158
  file_name: str = None,
159
159
  headers: dict = None,
160
+ use_certifi_ca_repository: bool = False,
160
161
  **kwargs
161
162
  ) -> str:
162
163
  """
@@ -168,6 +169,8 @@ def download(
168
169
  :param file_name: string, file name (example: file.zip) that you want the downloaded file to be saved as.
169
170
  If not specified, the default filename from 'file_url' will be used.
170
171
  :param headers: dictionary, HTTP headers to use when downloading the file.
172
+ :param use_certifi_ca_repository: boolean, if True, the certifi CA store will be used for SSL context
173
+ instead of the system's default CA store.
171
174
  :return: string, full file path of downloaded file. If download failed, 'None' will be returned.
172
175
  """
173
176
 
@@ -196,8 +199,15 @@ def download(
196
199
  print_api.print_api(f'Downloading: {file_url}', **kwargs)
197
200
  print_api.print_api(f'To: {file_path}', **kwargs)
198
201
 
199
- # Open the URL for data gathering with SSL context with default CA store of the system.
200
- ssl_context = ssl.create_default_context()
202
+ # Open the URL for data gathering with SSL context.
203
+ if not use_certifi_ca_repository:
204
+ # Create a default SSL context using the system's CA store.
205
+ ssl_context = ssl.create_default_context()
206
+ else:
207
+ # Create a default SSL context using the certifi CA store.
208
+ # This is useful for environments where the system's CA store is not available or not trusted.
209
+ # 'certifi.where()' returns the path to the certifi CA bundle.
210
+ ssl_context = ssl.create_default_context(cafile=certifi.where())
201
211
 
202
212
  # In order to use 'urllib.request', it is not enough to 'import urllib', you need to 'import urllib.request'.
203
213
  # Build a Request object with headers if provided.
@@ -62,7 +62,7 @@ def download_install_main():
62
62
  print_api("Starting the download...")
63
63
  file_name = "pycharm-latest.exe"
64
64
  # download_file(download_url, file_name)
65
- installer_path = web.download(file_url=download_url, file_name=file_name)
65
+ installer_path = web.download(file_url=download_url, file_name=file_name, use_certifi_ca_repository=True)
66
66
  print_api(f"Downloaded the latest version of PyCharm to {file_name}", color='green')
67
67
  except Exception as e:
68
68
  print_api(f"An error occurred: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 3.1.5
3
+ Version: 3.1.6
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=3G5h8j3jqnhX7IVXqhpP6otC6Me-EEHzhq3ijShiqaU,122
1
+ atomicshop/__init__.py,sha256=lgJ4Y2cZjapTRcmtqh6h2LaQj-h7MwBqzq-fHO09skc,122
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
@@ -47,7 +47,7 @@ atomicshop/uuids.py,sha256=JSQdm3ZTJiwPQ1gYe6kU0TKS_7suwVrHc8JZDGYlydM,2214
47
47
  atomicshop/venvs.py,sha256=D9lwOoObkYoRx-weuoAmbvN-RdSHhVm4DE9TVl-utAs,903
48
48
  atomicshop/versioning.py,sha256=e5W6m9AF3__M5nntqI9CqNAeHqkwY9JhlnpYeZ1CEus,970
49
49
  atomicshop/virtualization.py,sha256=LPP4vjE0Vr10R6DA4lqhfX_WaNdDGRAZUW0Am6VeGco,494
50
- atomicshop/web.py,sha256=gqlDdv7_uYdsbhUdwmrgz_l_S_8_N2fCMdxmfpukHyE,12411
50
+ atomicshop/web.py,sha256=hkAS0MeMW_mGgxhFCX1xckT3yslCJ2cMP2nx9ADpe3o,13024
51
51
  atomicshop/websocket_parse.py,sha256=aLHWyKqaYqEn_MRBWm2L6rIl6QPmqbVrjEXE_rBzwCw,16711
52
52
  atomicshop/a_installs/ubuntu/docker_rootless.py,sha256=9IPNtGZYjfy1_n6ZRt7gWz9KZgR6XCgevjqq02xk-o0,281
53
53
  atomicshop/a_installs/ubuntu/docker_sudo.py,sha256=JzayxeyKDtiuT4Icp2L2LyFRbx4wvpyN_bHLfZ-yX5E,281
@@ -300,7 +300,7 @@ atomicshop/wrappers/psutilw/psutilw.py,sha256=q3EwgprqyrR4zLCjl4l5DHFOQoukEvQMIP
300
300
  atomicshop/wrappers/psycopgw/psycopgw.py,sha256=XJvVf0oAUjCHkrYfKeFuGCpfn0Oxj3u4SbKMKA1508E,7118
301
301
  atomicshop/wrappers/pycharmw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
302
302
  atomicshop/wrappers/pycharmw/ubuntu.py,sha256=m9MpgqvIYygulhPxo9g2zlGGXrihBpiY3GNLNyT-B7U,1290
303
- atomicshop/wrappers/pycharmw/win.py,sha256=jdnTkUqZX_BrMW8AmW-xGtxdV-wmmNr_NMA2jB6JHsQ,2725
303
+ atomicshop/wrappers/pycharmw/win.py,sha256=hNP-d95z1zhcCpYqhHE5HZVYxaAlt8JJCNXh65jZsHc,2757
304
304
  atomicshop/wrappers/pywin32w/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
305
305
  atomicshop/wrappers/pywin32w/cert_store.py,sha256=dV1XyoKTFKZ-HCIVqU2Nd6CTZ8HANqjAXv26rsNzO6s,4365
306
306
  atomicshop/wrappers/pywin32w/console.py,sha256=LstHajPLgXp9qQxFNR44QfH10nOnNp3bCJquxaTquns,1175
@@ -336,8 +336,8 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=WcNyaqEZ82S5-f3kzqi1nllNT2N
336
336
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
337
337
  atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
338
338
  atomicshop/wrappers/winregw/winreg_network.py,sha256=3Ts1sVqSUiCDsHRHwJCbiZ9EYvv2ELGxF0Y_pibGU4k,9596
339
- atomicshop-3.1.5.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
340
- atomicshop-3.1.5.dist-info/METADATA,sha256=8lGudQYkq9i-g4r-658XFe5RJmIY1ebxXKbGav0XSrc,10653
341
- atomicshop-3.1.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
342
- atomicshop-3.1.5.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
343
- atomicshop-3.1.5.dist-info/RECORD,,
339
+ atomicshop-3.1.6.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
340
+ atomicshop-3.1.6.dist-info/METADATA,sha256=nOFaTyw74lY191rFSACO5nChQHK6jRcTq4yPfbvOj2A,10653
341
+ atomicshop-3.1.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
342
+ atomicshop-3.1.6.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
343
+ atomicshop-3.1.6.dist-info/RECORD,,