ka-uts-com 4.0.2.250519__tar.gz → 4.0.4.250522__tar.gz
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.
- {ka_uts_com-4.0.2.250519/ka_uts_com.egg-info → ka_uts_com-4.0.4.250522}/PKG-INFO +4 -4
- ka_uts_com-4.0.4.250522/dist/ka_uts_com-4.0.4.250522-py3-none-any.whl +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/ka_uts_com/__version__.py +2 -2
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/ka_uts_com/com.py +2 -4
- ka_uts_com-4.0.4.250522/ka_uts_com/dec.py +47 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522/ka_uts_com.egg-info}/PKG-INFO +4 -4
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/ka_uts_com.egg-info/SOURCES.txt +1 -1
- ka_uts_com-4.0.4.250522/ka_uts_com.egg-info/requires.txt +4 -0
- ka_uts_com-4.0.4.250522/requirements.txt +4 -0
- ka_uts_com-4.0.2.250519/dist/ka_uts_com-4.0.2.250519-py3-none-any.whl +0 -0
- ka_uts_com-4.0.2.250519/ka_uts_com/dec.py +0 -23
- ka_uts_com-4.0.2.250519/ka_uts_com.egg-info/requires.txt +0 -4
- ka_uts_com-4.0.2.250519/requirements.txt +0 -4
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/LICENSE.txt +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/MANIFEST.in +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/README.rst +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/classifiers.txt +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/ka_uts_com/__init__.py +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/ka_uts_com/py.typed +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/ka_uts_com/timer.py +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/ka_uts_com.egg-info/dependency_links.txt +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/ka_uts_com.egg-info/not-zip-safe +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/ka_uts_com.egg-info/top_level.txt +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/pyproject.toml +0 -0
- {ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ka_uts_com
|
3
|
-
Version: 4.0.
|
3
|
+
Version: 4.0.4.250522
|
4
4
|
Summary: Communication and CLI Utilities
|
5
5
|
Author: Bernd Stroehle
|
6
6
|
Author-email: bernd.stroehle@gmail.com
|
@@ -21,9 +21,9 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
21
|
Requires-Python: >=3.10
|
22
22
|
Description-Content-Type: text/x-rst
|
23
23
|
License-File: LICENSE.txt
|
24
|
-
Requires-Dist: ka_uts_arr>=4.0.
|
25
|
-
Requires-Dist: ka_uts_log>=4.0.
|
26
|
-
Requires-Dist: ka_uts_uts>=4.0.
|
24
|
+
Requires-Dist: ka_uts_arr>=4.0.2.250519
|
25
|
+
Requires-Dist: ka_uts_log>=4.0.6.250522
|
26
|
+
Requires-Dist: ka_uts_uts>=4.0.3.250519
|
27
27
|
Requires-Dist: numpy>=2.2.6
|
28
28
|
Dynamic: license-file
|
29
29
|
|
Binary file
|
@@ -1,10 +1,10 @@
|
|
1
1
|
__title__ = 'ka_uts_com'
|
2
2
|
__description__ = 'Communication and CLI Utilities.'
|
3
3
|
__url__ = 'https://ka-ut-com.readthedocs.io/en/latest'
|
4
|
-
__version__ = '4.0.
|
4
|
+
__version__ = '4.0.4.250522'
|
5
5
|
__build__ = 0x022200
|
6
6
|
__author__ = 'Bernd Stroehle'
|
7
7
|
__author_email__ = 'bernd.stroehle@gmail.com'
|
8
|
-
__license__ = '
|
8
|
+
__license__ = 'GPL-3.0-only WITH Classpath-Exception-2.0 OR BSD-3-Clause'
|
9
9
|
__copyright__ = 'Copyright 2025 Bernd Stroehle'
|
10
10
|
__cake__ = u'\u2728 \U0001f370 \u2728'
|
@@ -52,15 +52,13 @@ class Com:
|
|
52
52
|
"""
|
53
53
|
if cls.sw_init:
|
54
54
|
return
|
55
|
+
cls.sw_init = True
|
55
56
|
cls.cmd = kwargs.get('cmd')
|
56
|
-
_cls_app = kwargs.get('cls_app')
|
57
|
-
# cls.d_com_pacmod = PacMod.sh_d_pacmod(cls)
|
58
|
-
# cls.d_app_pacmod = PacMod.sh_d_pacmod(_cls_app)
|
59
57
|
cls.com_a_mod = cls.__module__.split(".")
|
60
58
|
cls.com_pac = cls.com_a_mod[0]
|
59
|
+
_cls_app = kwargs.get('cls_app')
|
61
60
|
cls.app_a_mod = _cls_app.__module__.split(".")
|
62
61
|
cls.app_pac = cls.app_a_mod[0]
|
63
|
-
cls.sw_init = True
|
64
62
|
cls.tenant = kwargs.get('tenant')
|
65
63
|
cls.ts = calendar.timegm(time.gmtime())
|
66
64
|
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"""
|
2
|
+
Decorators Module
|
3
|
+
"""
|
4
|
+
import os
|
5
|
+
import sys
|
6
|
+
import numpy as np
|
7
|
+
from datetime import datetime
|
8
|
+
from ka_uts_uts.utils.fnc import Fnc
|
9
|
+
from ka_uts_log.log import Log
|
10
|
+
|
11
|
+
|
12
|
+
def timer(fnc):
|
13
|
+
"""
|
14
|
+
Timer Decorator
|
15
|
+
"""
|
16
|
+
def __wrapper(*args, **kwargs):
|
17
|
+
start = datetime.now()
|
18
|
+
fnc(*args, **kwargs)
|
19
|
+
_fnc_name = Fnc.sh_fnc_name(fnc)
|
20
|
+
end = datetime.now()
|
21
|
+
elapse_time = end.timestamp() - start.timestamp()
|
22
|
+
np_elapse_time = np.format_float_positional(elapse_time, trim='k')
|
23
|
+
msg = f"{_fnc_name} elapse time [sec] = {np_elapse_time}"
|
24
|
+
Log.info(msg, stacklevel=2)
|
25
|
+
return __wrapper
|
26
|
+
|
27
|
+
|
28
|
+
def handle_exception(exc_type, exc_value, exc_traceback):
|
29
|
+
if issubclass(exc_type, KeyboardInterrupt):
|
30
|
+
sys.__excepthook__(exc_type, exc_value, exc_traceback)
|
31
|
+
return
|
32
|
+
Log.critical(exc_value.message, exc_info=(exc_type, exc_value, exc_traceback))
|
33
|
+
|
34
|
+
|
35
|
+
def handle_error(fnc):
|
36
|
+
"""
|
37
|
+
Error Decorator
|
38
|
+
"""
|
39
|
+
def __wrapper(*args, **kwargs):
|
40
|
+
try:
|
41
|
+
fnc(*args, **kwargs)
|
42
|
+
os._exit(0)
|
43
|
+
except Exception:
|
44
|
+
exc_type, exc_value, exc_traceback = sys.exc_info()
|
45
|
+
handle_exception(exc_type, exc_value, exc_traceback)
|
46
|
+
os._exit(1)
|
47
|
+
return __wrapper
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ka_uts_com
|
3
|
-
Version: 4.0.
|
3
|
+
Version: 4.0.4.250522
|
4
4
|
Summary: Communication and CLI Utilities
|
5
5
|
Author: Bernd Stroehle
|
6
6
|
Author-email: bernd.stroehle@gmail.com
|
@@ -21,9 +21,9 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
21
|
Requires-Python: >=3.10
|
22
22
|
Description-Content-Type: text/x-rst
|
23
23
|
License-File: LICENSE.txt
|
24
|
-
Requires-Dist: ka_uts_arr>=4.0.
|
25
|
-
Requires-Dist: ka_uts_log>=4.0.
|
26
|
-
Requires-Dist: ka_uts_uts>=4.0.
|
24
|
+
Requires-Dist: ka_uts_arr>=4.0.2.250519
|
25
|
+
Requires-Dist: ka_uts_log>=4.0.6.250522
|
26
|
+
Requires-Dist: ka_uts_uts>=4.0.3.250519
|
27
27
|
Requires-Dist: numpy>=2.2.6
|
28
28
|
Dynamic: license-file
|
29
29
|
|
Binary file
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Decorators Module
|
3
|
-
"""
|
4
|
-
import numpy as np
|
5
|
-
from datetime import datetime
|
6
|
-
from ka_uts_uts.utils.fnc import Fnc
|
7
|
-
from ka_uts_log.log import Log
|
8
|
-
|
9
|
-
|
10
|
-
def timer(fnc):
|
11
|
-
"""
|
12
|
-
Timer Decorator
|
13
|
-
"""
|
14
|
-
def wrapper(*args, **kwargs):
|
15
|
-
start = datetime.now()
|
16
|
-
fnc(*args, **kwargs)
|
17
|
-
_fnc_name = Fnc.sh_fnc_name(fnc)
|
18
|
-
end = datetime.now()
|
19
|
-
elapse_time = end.timestamp() - start.timestamp()
|
20
|
-
np_elapse_time = np.format_float_positional(elapse_time, trim='k')
|
21
|
-
msg = f"{_fnc_name} elapse time [sec] = {np_elapse_time}"
|
22
|
-
Log.info(msg, stacklevel=2)
|
23
|
-
return wrapper
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ka_uts_com-4.0.2.250519 → ka_uts_com-4.0.4.250522}/ka_uts_com.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|