atomicshop 2.18.20__py3-none-any.whl → 2.18.22__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.18.20'
4
+ __version__ = '2.18.22'
@@ -1,5 +1,6 @@
1
1
  import os
2
2
  import ctypes
3
+ import pefile
3
4
 
4
5
 
5
6
  def get_file_properties(file_path: str) -> dict:
@@ -40,4 +41,27 @@ def get_file_properties(file_path: str) -> dict:
40
41
  properties["ProductName"] = query_value("ProductName")
41
42
  properties["ProductVersion"] = query_value("ProductVersion")
42
43
 
44
+ # Fallback to pefile if ctypes fails or returns, pefile is much slower but more reliable, so we only use it as a fallback.
45
+ if properties["FileDescription"] == "N/A" or properties["FileVersion"] == "N/A":
46
+ pe = pefile.PE(file_path)
47
+ version_info = pe.VS_FIXEDFILEINFO
48
+ if version_info:
49
+ # If version_info is a list, take the first valid entry
50
+ if isinstance(version_info, list):
51
+ version_info = version_info[0]
52
+
53
+ properties["FileVersion"] = f"{version_info.FileVersionMS >> 16}.{version_info.FileVersionMS & 0xFFFF}.{version_info.FileVersionLS >> 16}.{version_info.FileVersionLS & 0xFFFF}"
54
+ # Attempt to get additional metadata
55
+ for entry in pe.FileInfo or []:
56
+ for structure in entry:
57
+ if hasattr(structure, "StringTable"):
58
+ for string_table in structure.StringTable:
59
+ for key, value in string_table.entries.items():
60
+ if key == b"FileDescription":
61
+ properties["FileDescription"] = value.decode("utf-8", errors="ignore")
62
+ elif key == b"ProductName":
63
+ properties["ProductName"] = value.decode("utf-8", errors="ignore")
64
+ elif key == b"ProductVersion":
65
+ properties["ProductVersion"] = value.decode("utf-8", errors="ignore")
66
+
43
67
  return properties
@@ -35,7 +35,7 @@ def install_mongodb(version):
35
35
  # Step 1: Import the MongoDB public GPG key
36
36
  print_api.print_api("Step 1: Importing the MongoDB public GPG key...")
37
37
  run_command(f"curl -fsSL https://pgp.mongodb.com/server-{version}.asc | "
38
- f"sudo gpg --dearmor -o /usr/share/keyrings/mongodb-server-{version}.gpg")
38
+ f"sudo gpg --dearmor --yes -o /usr/share/keyrings/mongodb-server-{version}.gpg")
39
39
 
40
40
  # Step 2: Create the MongoDB list file for APT
41
41
  print_api.print_api("Step 2: Creating MongoDB APT list file...")
@@ -71,7 +71,7 @@ def install_main(
71
71
  # Ensure the user provides a MongoDB major version as an argument.
72
72
  if len(sys.argv) != 2:
73
73
  message: str = ("Usage: python install_mongodb.py <mongo_major_version>\n"
74
- "Example: python install_mongodb.py 7")
74
+ "Example: python install_mongodb.py 8")
75
75
  print_api.print_api(message, color='red')
76
76
  return 1
77
77
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.18.20
3
+ Version: 2.18.22
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -38,6 +38,7 @@ Requires-Dist: cryptography
38
38
  Requires-Dist: dnslib
39
39
  Requires-Dist: dnspython
40
40
  Requires-Dist: docker
41
+ Requires-Dist: flask-socketio
41
42
  Requires-Dist: google-api-python-client
42
43
  Requires-Dist: google-generativeai
43
44
  Requires-Dist: numpy
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=uwLxkkVfIxDg6tPaRg8xQcuyedduOPlKx9znwRLYLkY,124
1
+ atomicshop/__init__.py,sha256=Sr8CPcZQl9qNCWb21lvXNQ_4aKz52aIEFVfSD1NgHvI,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
@@ -199,7 +199,7 @@ atomicshop/wrappers/wslw.py,sha256=2Z7X0j5M2hoRZjbHfm_vqwNXZeptsdkNCdhdcM_S9vo,6
199
199
  atomicshop/wrappers/certauthw/certauth.py,sha256=hKedW0DOWlEigSNm8wu4SqHkCQsGJ1tJfH7s4nr3Bk0,12223
200
200
  atomicshop/wrappers/certauthw/certauthw.py,sha256=4WvhjANI7Kzqrr_nKmtA8Kf7B6rute_5wfP65gwQrjw,8082
201
201
  atomicshop/wrappers/ctyping/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
202
- atomicshop/wrappers/ctyping/file_details_winapi.py,sha256=p2BdQy-UNwL8h-4IRzVBV6tQMzywXeSbAnm62fjdEvM,1318
202
+ atomicshop/wrappers/ctyping/file_details_winapi.py,sha256=dmdnCMwx4GgVEctiUIyniVShAoXmv_bZu_o81C450PY,2810
203
203
  atomicshop/wrappers/ctyping/process_winapi.py,sha256=QcXL-ETtlSSkoT8F7pYle97ubGWsjYp8cx8HxkVMgAc,2762
204
204
  atomicshop/wrappers/ctyping/win_console.py,sha256=uTtjkz9rY559AaV0dhyZYUSSEe9cn6Du2DgurdMtX-M,1158
205
205
  atomicshop/wrappers/ctyping/etw_winapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -260,7 +260,7 @@ atomicshop/wrappers/loggingw/loggers.py,sha256=mmM__XR3W4QC82wbsDRG_M4_0JYGGEP0Q
260
260
  atomicshop/wrappers/loggingw/loggingw.py,sha256=uLY7DJS-3xIYQBRvI--9eFvdcnvsWSXmtJKS-gTRfjM,20863
261
261
  atomicshop/wrappers/loggingw/reading.py,sha256=sCNlgqLNH5XdKqOOjjEox7CvViMHzs6h7-hwCnx4NKk,17566
262
262
  atomicshop/wrappers/mongodbw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
263
- atomicshop/wrappers/mongodbw/install_mongodb_ubuntu.py,sha256=pmI9AwWJ2cv5h8GionSpSJkllg6kfp0M381pk6y4Y5U,4015
263
+ atomicshop/wrappers/mongodbw/install_mongodb_ubuntu.py,sha256=2eEOb35T259lhn5koynfTIm1hanxD02zN97ExGSBM2o,4021
264
264
  atomicshop/wrappers/mongodbw/install_mongodb_win.py,sha256=64EUQYx7VuMC3ndO2x3nSErh5NZ_BsqMwGvPcybfC-Q,8499
265
265
  atomicshop/wrappers/mongodbw/mongo_infra.py,sha256=IjEF0jPzQz866MpTm7rnksnyyWQeUT_B2h2DA9ryAio,2034
266
266
  atomicshop/wrappers/mongodbw/mongodbw.py,sha256=ih3Gd45rg_70y4sGeu0eEJ3sJd9tEN4I5IqHZelRZJw,52854
@@ -321,8 +321,8 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=fgMzDXI0cybwUEqAxprRmY3lqbh
321
321
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
322
322
  atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
323
323
  atomicshop/wrappers/winregw/winreg_network.py,sha256=AENV88H1qDidrcpyM9OwEZxX5svfi-Jb4N6FkS1xtqA,8851
324
- atomicshop-2.18.20.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
325
- atomicshop-2.18.20.dist-info/METADATA,sha256=mFke9TkxM3nnlgifV26iz_D6ZEzqpdOLySttjkInSV0,10577
326
- atomicshop-2.18.20.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
327
- atomicshop-2.18.20.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
328
- atomicshop-2.18.20.dist-info/RECORD,,
324
+ atomicshop-2.18.22.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
325
+ atomicshop-2.18.22.dist-info/METADATA,sha256=KFiXe-3Ldsg--Quz9ELqNGlsKZSBn20BlxFz1EQ40VE,10608
326
+ atomicshop-2.18.22.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
327
+ atomicshop-2.18.22.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
328
+ atomicshop-2.18.22.dist-info/RECORD,,