atomicshop 2.17.0__py3-none-any.whl → 2.17.1__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.17.0'
4
+ __version__ = '2.17.1'
atomicshop/venvs.py ADDED
@@ -0,0 +1,28 @@
1
+ import sys
2
+ import os
3
+ from typing import Union
4
+
5
+
6
+ def is_running_venv() -> Union[str, None]:
7
+ """
8
+ Check if the script is running in a virtual environment.
9
+
10
+ :return: string of the virtual environment path if it is running in a virtual environment, None otherwise.
11
+ """
12
+ if hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix):
13
+ return sys.prefix
14
+ else:
15
+ return None
16
+
17
+
18
+ def add_venv_to_path():
19
+ """
20
+ Add the virtual environment to the PATH environment variable.
21
+ """
22
+
23
+ venv_environment = is_running_venv()
24
+ if venv_environment:
25
+ # We're in a virtual environment, so modify the PATH
26
+ venv_bin = os.path.join(venv_environment, 'bin')
27
+ # Prepend the virtual environment's bin directory to the existing PATH
28
+ os.environ['PATH'] = f"{venv_bin}:{os.environ['PATH']}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.17.0
3
+ Version: 2.17.1
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=JaX16ugkhtjjNo6Te9NZk6rsS2IsN9ETiFc6wSyNBes,123
1
+ atomicshop/__init__.py,sha256=I7R8Nw2aUKfq_pc9VPI60hWdzw8gFUOZ3lLeLYKWVoQ,123
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
@@ -43,6 +43,7 @@ atomicshop/tempfiles.py,sha256=uq1ve2WlWehZ3NOTXJnpBBMt6HyCdBufqedF0HyzA6k,2517
43
43
  atomicshop/timer.py,sha256=7Zw1KRV0acHCRATMnanyX2MLBb63Hc-6us3rCZ9dNlY,2345
44
44
  atomicshop/urls.py,sha256=aJ0NGS9qqaKeqjkkWBs80jaBBg6MYBiPuLIyPGxscVc,1557
45
45
  atomicshop/uuids.py,sha256=JSQdm3ZTJiwPQ1gYe6kU0TKS_7suwVrHc8JZDGYlydM,2214
46
+ atomicshop/venvs.py,sha256=D9lwOoObkYoRx-weuoAmbvN-RdSHhVm4DE9TVl-utAs,903
46
47
  atomicshop/virtualization.py,sha256=LPP4vjE0Vr10R6DA4lqhfX_WaNdDGRAZUW0Am6VeGco,494
47
48
  atomicshop/web.py,sha256=GLdTXgMxg1_0UQaXC4bOvARVyuFg7SPIeJdsCHV8rNE,11662
48
49
  atomicshop/websocket_parse.py,sha256=bkOwiXCNw5bQg1J4KOG7es5kUGysyX2NdfFFVBceSzg,16662
@@ -318,8 +319,8 @@ atomicshop/wrappers/socketw/ssl_base.py,sha256=kmiif84kMhBr5yjQW17p935sfjR5JKG0L
318
319
  atomicshop/wrappers/socketw/statistics_csv.py,sha256=SDYI1cN0oaapvPeLxSXiJrelTy6xbZl-bopR0jAjVGE,3149
319
320
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
320
321
  atomicshop/wrappers/winregw/winreg_network.py,sha256=zZQfps-CdODQaTUADbHAwKHr5RUg7BLafnKWBbKaLN4,8728
321
- atomicshop-2.17.0.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
322
- atomicshop-2.17.0.dist-info/METADATA,sha256=MG763mizxXrtHLWqgLymqhAomm0BYskwwRsHU-mvJpY,10499
323
- atomicshop-2.17.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
324
- atomicshop-2.17.0.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
325
- atomicshop-2.17.0.dist-info/RECORD,,
322
+ atomicshop-2.17.1.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
323
+ atomicshop-2.17.1.dist-info/METADATA,sha256=6ixQRnoqipGf1eN7uXYojUqZB5KZTsXICDaF3-5QcSY,10499
324
+ atomicshop-2.17.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
325
+ atomicshop-2.17.1.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
326
+ atomicshop-2.17.1.dist-info/RECORD,,