atomicshop 3.1.1__py3-none-any.whl → 3.1.2__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.1'
4
+ __version__ = '3.1.2'
@@ -341,7 +341,7 @@ def thread_worker_main(
341
341
  client_message = client_connection_message
342
342
 
343
343
  bytes_to_send_list: list[bytes] = create_responder_response(client_message)
344
- print_api(f"Got responses from responder, count: [{len(bytes_to_send_list)}]", logger=network_logger,
344
+ print_api(f"Got responses from connect responder, count: [{len(bytes_to_send_list)}]", logger=network_logger,
345
345
  logger_method='info')
346
346
  else:
347
347
  client_message.reinitialize_dynamic_vars()
@@ -867,7 +867,7 @@ def find(
867
867
  entries[entry_index]['_id'] = str(entry['_id'])
868
868
 
869
869
  if key_convert_to_dict and entries:
870
- entries = _convert_key_values_to_objects(keys_convert_to_dict=key_convert_to_dict, returned_data=entries)
870
+ entries = convert_key_values_to_objects(keys_convert_to_dict=key_convert_to_dict, returned_data=entries)
871
871
 
872
872
  if close_client:
873
873
  mongo_client.close()
@@ -1398,7 +1398,7 @@ def get_stats_db_size(
1398
1398
  return stats['dataSize']
1399
1399
 
1400
1400
 
1401
- def _convert_key_values_to_objects(
1401
+ def convert_key_values_to_objects(
1402
1402
  keys_convert_to_dict: list[str],
1403
1403
  returned_data: Union[dict, list]
1404
1404
  ) -> Union[dict, list]:
@@ -1424,9 +1424,9 @@ def _convert_key_values_to_objects(
1424
1424
  # This is needed only to know the possible exception types.
1425
1425
  raise
1426
1426
  else:
1427
- _convert_key_values_to_objects(keys_convert_to_dict, value)
1427
+ convert_key_values_to_objects(keys_convert_to_dict, value)
1428
1428
  elif isinstance(returned_data, list):
1429
1429
  for i, item in enumerate(returned_data):
1430
- returned_data[i] = _convert_key_values_to_objects(keys_convert_to_dict, item)
1430
+ returned_data[i] = convert_key_values_to_objects(keys_convert_to_dict, item)
1431
1431
 
1432
1432
  return returned_data
@@ -539,10 +539,15 @@ class SocketWrapper:
539
539
  process_name = get_command_instance.get_process_name(print_kwargs={'logger': self.logger})
540
540
 
541
541
  source_ip: str = client_address[0]
542
- source_hostname: str = socket.gethostbyaddr(source_ip)[0]
543
542
  engine_name: str = get_engine_name(domain_from_engine, self.engines_list)
544
543
  dest_port: int = listening_socket_object.getsockname()[1]
545
544
 
545
+ # Not always there will be a hostname resolved by the IP address, so we will leave it empty if it fails.
546
+ try:
547
+ source_hostname: str = socket.gethostbyaddr(source_ip)[0]
548
+ except socket.herror:
549
+ source_hostname = ''
550
+
546
551
  # If 'accept()' function worked well, SSL worked well, then 'client_socket' won't be empty.
547
552
  if client_socket:
548
553
  # Get the protocol type from the socket.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 3.1.1
3
+ Version: 3.1.2
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=xTnJCkq3gj1NeN0vpvfRoCBltskMb4tZN_7g3G8Sg28,122
1
+ atomicshop/__init__.py,sha256=9FkiqXkoIc84EfZfIhFK47xqfKhRhJsieqicu4tjeJE,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
@@ -136,7 +136,7 @@ atomicshop/file_io/xmls.py,sha256=zh3SuK-dNaFq2NDNhx6ivcf4GYCfGM8M10PcEwDSpxk,21
136
136
  atomicshop/mitm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
137
  atomicshop/mitm/config_static.py,sha256=N3D06C_wUytwm80PQCL90ZGHLMHeQlCcI2XQQU2FZ1I,8145
138
138
  atomicshop/mitm/config_toml_editor.py,sha256=2p1CMcktWRR_NW-SmyDwylu63ad5e0-w1QPMa8ZLDBw,1635
139
- atomicshop/mitm/connection_thread_worker.py,sha256=ulE5x3hxWyd6gSyahSE-wpnF6VYl_wsJNBbNC0DzKU4,28499
139
+ atomicshop/mitm/connection_thread_worker.py,sha256=Iea2XszWwqcvIq1eyRDBkIuW1uUQHVaAxfdA9EZolac,28507
140
140
  atomicshop/mitm/import_config.py,sha256=gCH1hV-CxBAdwjeFJu1I5ntbm5hqzcB0y0vzRPkzra0,16936
141
141
  atomicshop/mitm/initialize_engines.py,sha256=Pj9k3iLdoE0KAl3QWG1Z10LHUHY8WQivSPFnQLhCWrc,7385
142
142
  atomicshop/mitm/message.py,sha256=CDhhm4BTuZE7oNZCjvIZ4BuPOW4MuIzQLOg91hJaxDI,3065
@@ -275,7 +275,7 @@ atomicshop/wrappers/mongodbw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
275
275
  atomicshop/wrappers/mongodbw/install_mongodb_ubuntu.py,sha256=2eEOb35T259lhn5koynfTIm1hanxD02zN97ExGSBM2o,4021
276
276
  atomicshop/wrappers/mongodbw/install_mongodb_win.py,sha256=64EUQYx7VuMC3ndO2x3nSErh5NZ_BsqMwGvPcybfC-Q,8499
277
277
  atomicshop/wrappers/mongodbw/mongo_infra.py,sha256=IjEF0jPzQz866MpTm7rnksnyyWQeUT_B2h2DA9ryAio,2034
278
- atomicshop/wrappers/mongodbw/mongodbw.py,sha256=_C-v0ZKM7SRThZOnpOtUKmy3fvcvdiGQNvLCo3Drgls,56053
278
+ atomicshop/wrappers/mongodbw/mongodbw.py,sha256=CHbDfW9CXzXUs3V97DYQpt-dYlt_gB60JhwqG2tVFQY,56049
279
279
  atomicshop/wrappers/nodejsw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
280
280
  atomicshop/wrappers/nodejsw/install_nodejs_ubuntu.py,sha256=wjpJdfAaY92RYl_L9esDIWuBMGeYH35RHJ5BVgMof8Y,6260
281
281
  atomicshop/wrappers/nodejsw/install_nodejs_windows.py,sha256=WvXIcEVnKcQYD-KNwhVP094s__1tt0Ir2Y87MABl8Nc,6283
@@ -330,14 +330,14 @@ atomicshop/wrappers/socketw/sender.py,sha256=aX_K8l_rHjd5AWb8bi5mt8-YTkMYVRDB6Dn
330
330
  atomicshop/wrappers/socketw/sni.py,sha256=q-F-R1KtE94g8WGrR3QHgi-otXZJUPBprEwQqnY80_A,17639
331
331
  atomicshop/wrappers/socketw/socket_client.py,sha256=AQKjm_GZLH2PO7gkFbwzIbXzUXxRFvBTc6onrgapFqs,22048
332
332
  atomicshop/wrappers/socketw/socket_server_tester.py,sha256=Qobmh4XV8ZxLUaw-eW4ESKAbeSLecCKn2OWFzMhadk0,6420
333
- atomicshop/wrappers/socketw/socket_wrapper.py,sha256=hOOEpA-QNtCGroBzFDpOeD8z2KJWMVTiWaoUvtB1qvU,40886
333
+ atomicshop/wrappers/socketw/socket_wrapper.py,sha256=3sEz1VUar1JJU8KxocrOT09-vIh5hLpE29aTZH9TNC8,41117
334
334
  atomicshop/wrappers/socketw/ssl_base.py,sha256=kmiif84kMhBr5yjQW17p935sfjR5JKG0LxIwBA4iVvU,2275
335
335
  atomicshop/wrappers/socketw/statistics_csv.py,sha256=WcNyaqEZ82S5-f3kzqi1nllNT2Nd2P_zg8HqCc7vW4s,4120
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.1.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
340
- atomicshop-3.1.1.dist-info/METADATA,sha256=NGjnb2e0ON4vpeuBk4ELqQCNXm9SwV1o9L1js94ufRY,10653
341
- atomicshop-3.1.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
342
- atomicshop-3.1.1.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
343
- atomicshop-3.1.1.dist-info/RECORD,,
339
+ atomicshop-3.1.2.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
340
+ atomicshop-3.1.2.dist-info/METADATA,sha256=3K-v2aK-rRo1shq8oR83WC2o6im2elEruEBAgdXDjb4,10653
341
+ atomicshop-3.1.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
342
+ atomicshop-3.1.2.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
343
+ atomicshop-3.1.2.dist-info/RECORD,,