ka-uts-com 4.0.0.250510__tar.gz → 4.0.2.250519__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.0.250510/ka_uts_com.egg-info → ka_uts_com-4.0.2.250519}/PKG-INFO +82 -45
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/README.rst +71 -37
- 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.0.250510 → ka_uts_com-4.0.2.250519}/ka_uts_com/__version__.py +2 -2
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/ka_uts_com/com.py +20 -22
- {ka_uts_com-4.0.0.250510/ka_uts_com/decorators → ka_uts_com-4.0.2.250519/ka_uts_com}/dec.py +4 -7
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519/ka_uts_com.egg-info}/PKG-INFO +82 -45
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/ka_uts_com.egg-info/SOURCES.txt +3 -6
- ka_uts_com-4.0.2.250519/ka_uts_com.egg-info/requires.txt +4 -0
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/pyproject.toml +8 -7
- ka_uts_com-4.0.2.250519/requirements.txt +4 -0
- ka_uts_com-4.0.0.250510/dist/ka_uts_com-4.0.0.250510-py3-none-any.whl +0 -0
- ka_uts_com-4.0.0.250510/ka_uts_com/app.py +0 -48
- ka_uts_com-4.0.0.250510/ka_uts_com/cfg.py +0 -35
- ka_uts_com-4.0.0.250510/ka_uts_com/exit.py +0 -37
- ka_uts_com-4.0.0.250510/ka_uts_com.egg-info/requires.txt +0 -4
- ka_uts_com-4.0.0.250510/requirements.txt +0 -4
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/LICENSE.txt +0 -0
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/MANIFEST.in +0 -0
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/classifiers.txt +0 -0
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/ka_uts_com/__init__.py +0 -0
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/ka_uts_com/py.typed +0 -0
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/ka_uts_com/timer.py +0 -0
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/ka_uts_com.egg-info/dependency_links.txt +0 -0
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/ka_uts_com.egg-info/not-zip-safe +0 -0
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/ka_uts_com.egg-info/top_level.txt +0 -0
- {ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/setup.cfg +0 -0
@@ -1,9 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ka_uts_com
|
3
|
-
Version: 4.0.
|
4
|
-
Summary:
|
5
|
-
Author
|
6
|
-
|
3
|
+
Version: 4.0.2.250519
|
4
|
+
Summary: Communication and CLI Utilities
|
5
|
+
Author: Bernd Stroehle
|
6
|
+
Author-email: bernd.stroehle@gmail.com
|
7
|
+
Maintainer: Bernd Stroehle
|
8
|
+
Maintainer-email: bernd.stroehle@gmail.com
|
9
|
+
License-Expression: GPL-3.0-only WITH Classpath-exception-2.0 OR BSD-3-Clause
|
7
10
|
Project-URL: Source Code, https://github.com/bs29/ka_uts_com/tree/master
|
8
11
|
Project-URL: Homepage, https://kosakya.de/
|
9
12
|
Project-URL: Documentation, https://ka-com.readthedocs.io/en/latest
|
@@ -18,10 +21,10 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
21
|
Requires-Python: >=3.10
|
19
22
|
Description-Content-Type: text/x-rst
|
20
23
|
License-File: LICENSE.txt
|
21
|
-
Requires-Dist: ka_uts_arr>=4.0.
|
22
|
-
Requires-Dist: ka_uts_log>=4.0.
|
23
|
-
Requires-Dist: ka_uts_uts>=4.0.
|
24
|
-
Requires-Dist: numpy>=2.2.
|
24
|
+
Requires-Dist: ka_uts_arr>=4.0.1.250513
|
25
|
+
Requires-Dist: ka_uts_log>=4.0.1.250513
|
26
|
+
Requires-Dist: ka_uts_uts>=4.0.2.250518
|
27
|
+
Requires-Dist: numpy>=2.2.6
|
25
28
|
Dynamic: license-file
|
26
29
|
|
27
30
|
##########
|
@@ -33,7 +36,7 @@ Overview
|
|
33
36
|
|
34
37
|
.. start short_desc
|
35
38
|
|
36
|
-
**
|
39
|
+
**Communication and CLI Utilities**
|
37
40
|
|
38
41
|
.. end short_desc
|
39
42
|
|
@@ -75,15 +78,18 @@ The Package ``ka_uts_com`` consist of the following file types (c.f.: **Appendix
|
|
75
78
|
|
76
79
|
#. **Dunder modules:** (c.f.: **Appendix:** *Special python package modules*)
|
77
80
|
|
78
|
-
#. **
|
81
|
+
#. **Modules**
|
79
82
|
|
80
|
-
|
83
|
+
#. **Decorator Modules**
|
81
84
|
|
82
|
-
|
85
|
+
a. *dec.py*
|
83
86
|
|
84
87
|
#. **Communication Modules**
|
85
88
|
|
86
89
|
a. *com.py*
|
90
|
+
|
91
|
+
#. **Timer Modules**
|
92
|
+
|
87
93
|
#. *timer.py*
|
88
94
|
|
89
95
|
#. **Base Modules**
|
@@ -92,37 +98,55 @@ The Package ``ka_uts_com`` consist of the following file types (c.f.: **Appendix
|
|
92
98
|
#. *cfg.py*
|
93
99
|
#. *exit.py*
|
94
100
|
|
95
|
-
Decorator
|
96
|
-
|
101
|
+
Decorator Module
|
102
|
+
****************
|
97
103
|
|
98
104
|
Overview
|
99
105
|
========
|
100
106
|
|
101
|
-
.. Decorator
|
102
|
-
.. table:: *Decorator
|
107
|
+
.. Decorator Module-label:
|
108
|
+
.. table:: *Decorator Module*
|
109
|
+
|
110
|
+
+------+----------------+
|
111
|
+
|Name |Decription |
|
112
|
+
+======+================+
|
113
|
+
|dec.py|Decorator module|
|
114
|
+
+------+----------------+
|
115
|
+
|
116
|
+
Decorstor module: dec.py
|
117
|
+
========================
|
118
|
+
|
119
|
+
The Decorator Module ``dec.py`` contains the single decorator function ``timer``.
|
120
|
+
|
121
|
+
dec.py Method: timer
|
122
|
+
--------------------
|
123
|
+
|
124
|
+
Parameter
|
125
|
+
^^^^^^^^^
|
126
|
+
|
127
|
+
..dec.py-Method-timer-Parameter-label:
|
128
|
+
.. table:: *dec.py Method timer: Parameter*
|
103
129
|
|
104
|
-
|
105
|
-
|Name
|
106
|
-
|
107
|
-
|
|
108
|
-
|
130
|
+
+----+----------+-----------+
|
131
|
+
|Name|Type |Description|
|
132
|
+
+====+==========+===========+
|
133
|
+
|fnc |TyCallable|function |
|
134
|
+
+----+----------+-----------+
|
109
135
|
|
110
|
-
Communication
|
111
|
-
|
136
|
+
Communication Module
|
137
|
+
********************
|
112
138
|
|
113
139
|
Overview
|
114
140
|
========
|
115
141
|
|
116
|
-
.. Communication
|
117
|
-
.. table:: *Communication
|
142
|
+
.. Communication Module-label:
|
143
|
+
.. table:: *Communication Module*
|
118
144
|
|
119
|
-
|
120
|
-
|Name
|
121
|
-
|
122
|
-
|com.py
|
123
|
-
|
124
|
-
|timer.py|Timer management module |
|
125
|
-
+--------+-----------------------------+
|
145
|
+
+------+-----------------------------+
|
146
|
+
|Name |Decription |
|
147
|
+
+======+=============================+
|
148
|
+
|com.py|Communication handling module|
|
149
|
+
+------+-----------------------------+
|
126
150
|
|
127
151
|
Communication module: com.py
|
128
152
|
============================
|
@@ -143,33 +167,31 @@ Com: Variables
|
|
143
167
|
+------------+-----------+-------+---------------------------------------+
|
144
168
|
|Name |Type |Default|Description |
|
145
169
|
+============+===========+=======+=======================================+
|
146
|
-
|
|
170
|
+
|cmd |TyStr |None |Command |
|
147
171
|
+------------+-----------+-------+---------------------------------------+
|
148
172
|
|d_com_pacmod|TyDic |{} |Communication package module dictionary|
|
149
173
|
+------------+-----------+-------+---------------------------------------+
|
150
174
|
|d_app_pacmod|TyDic |{} |Application package module dictionary |
|
151
175
|
+------------+-----------+-------+---------------------------------------+
|
152
|
-
|
153
|
-
+------------+-----------+-------+---------------------------------------+
|
154
|
-
|ts |TnTimeStamp|None |Timestamp |
|
176
|
+
|sw_init |TyBool |None |Initialisation switch |
|
155
177
|
+------------+-----------+-------+---------------------------------------+
|
156
|
-
|
|
178
|
+
|tenant |TyStr |None |Tenant name |
|
157
179
|
+------------+-----------+-------+---------------------------------------+
|
158
|
-
|
180
|
+
|**Timestamp fields** |
|
159
181
|
+------------+-----------+-------+---------------------------------------+
|
160
|
-
|
|
182
|
+
|ts |TnTimeStamp|None |Timestamp |
|
161
183
|
+------------+-----------+-------+---------------------------------------+
|
162
184
|
|d_timer |TyDic |False |Timer dictionary |
|
163
185
|
+------------+-----------+-------+---------------------------------------+
|
164
186
|
|**Links to other Classes** |
|
165
187
|
+------------+-----------+-------+---------------------------------------+
|
166
|
-
|App |TyAny |
|
188
|
+
|App |TyAny |None |Application class |
|
167
189
|
+------------+-----------+-------+---------------------------------------+
|
168
190
|
|cfg |TyDic |None |Configuration dictionary |
|
169
191
|
+------------+-----------+-------+---------------------------------------+
|
170
|
-
|Log |TyLogger |
|
192
|
+
|Log |TyLogger |None |Log class |
|
171
193
|
+------------+-----------+-------+---------------------------------------+
|
172
|
-
|Exit |TyAny |
|
194
|
+
|Exit |TyAny |None |Exit class |
|
173
195
|
+------------+-----------+-------+---------------------------------------+
|
174
196
|
|
175
197
|
Com: Methods
|
@@ -224,8 +246,23 @@ Parameter
|
|
224
246
|
|\*args |list |arguments array |
|
225
247
|
+--------+-----+--------------------+
|
226
248
|
|
227
|
-
|
228
|
-
|
249
|
+
Timer Module
|
250
|
+
************
|
251
|
+
|
252
|
+
Overview
|
253
|
+
========
|
254
|
+
|
255
|
+
.. Timer Modules-label:
|
256
|
+
.. table:: *Timer Modules*
|
257
|
+
|
258
|
+
+--------+-----------------------------+
|
259
|
+
|Name |Decription |
|
260
|
+
+========+=============================+
|
261
|
+
|timer.py|Timer management module |
|
262
|
+
+--------+-----------------------------+
|
263
|
+
|
264
|
+
Timer module: timer.py
|
265
|
+
======================
|
229
266
|
|
230
267
|
timer.py: Classes
|
231
268
|
-----------------
|
@@ -369,7 +406,7 @@ Overview
|
|
369
406
|
Base module: app\_.py
|
370
407
|
=====================
|
371
408
|
|
372
|
-
The Module ``app.py`` contains a single static class ``App_``.
|
409
|
+
The Module ``app\_.py`` contains a single static class ``App_``.
|
373
410
|
|
374
411
|
Class: App\_
|
375
412
|
------------
|
@@ -7,7 +7,7 @@ Overview
|
|
7
7
|
|
8
8
|
.. start short_desc
|
9
9
|
|
10
|
-
**
|
10
|
+
**Communication and CLI Utilities**
|
11
11
|
|
12
12
|
.. end short_desc
|
13
13
|
|
@@ -49,15 +49,18 @@ The Package ``ka_uts_com`` consist of the following file types (c.f.: **Appendix
|
|
49
49
|
|
50
50
|
#. **Dunder modules:** (c.f.: **Appendix:** *Special python package modules*)
|
51
51
|
|
52
|
-
#. **
|
52
|
+
#. **Modules**
|
53
53
|
|
54
|
-
|
54
|
+
#. **Decorator Modules**
|
55
55
|
|
56
|
-
|
56
|
+
a. *dec.py*
|
57
57
|
|
58
58
|
#. **Communication Modules**
|
59
59
|
|
60
60
|
a. *com.py*
|
61
|
+
|
62
|
+
#. **Timer Modules**
|
63
|
+
|
61
64
|
#. *timer.py*
|
62
65
|
|
63
66
|
#. **Base Modules**
|
@@ -66,37 +69,55 @@ The Package ``ka_uts_com`` consist of the following file types (c.f.: **Appendix
|
|
66
69
|
#. *cfg.py*
|
67
70
|
#. *exit.py*
|
68
71
|
|
69
|
-
Decorator
|
70
|
-
|
72
|
+
Decorator Module
|
73
|
+
****************
|
71
74
|
|
72
75
|
Overview
|
73
76
|
========
|
74
77
|
|
75
|
-
.. Decorator
|
76
|
-
.. table:: *Decorator
|
78
|
+
.. Decorator Module-label:
|
79
|
+
.. table:: *Decorator Module*
|
80
|
+
|
81
|
+
+------+----------------+
|
82
|
+
|Name |Decription |
|
83
|
+
+======+================+
|
84
|
+
|dec.py|Decorator module|
|
85
|
+
+------+----------------+
|
86
|
+
|
87
|
+
Decorstor module: dec.py
|
88
|
+
========================
|
89
|
+
|
90
|
+
The Decorator Module ``dec.py`` contains the single decorator function ``timer``.
|
91
|
+
|
92
|
+
dec.py Method: timer
|
93
|
+
--------------------
|
94
|
+
|
95
|
+
Parameter
|
96
|
+
^^^^^^^^^
|
97
|
+
|
98
|
+
..dec.py-Method-timer-Parameter-label:
|
99
|
+
.. table:: *dec.py Method timer: Parameter*
|
77
100
|
|
78
|
-
|
79
|
-
|Name
|
80
|
-
|
81
|
-
|
|
82
|
-
|
101
|
+
+----+----------+-----------+
|
102
|
+
|Name|Type |Description|
|
103
|
+
+====+==========+===========+
|
104
|
+
|fnc |TyCallable|function |
|
105
|
+
+----+----------+-----------+
|
83
106
|
|
84
|
-
Communication
|
85
|
-
|
107
|
+
Communication Module
|
108
|
+
********************
|
86
109
|
|
87
110
|
Overview
|
88
111
|
========
|
89
112
|
|
90
|
-
.. Communication
|
91
|
-
.. table:: *Communication
|
113
|
+
.. Communication Module-label:
|
114
|
+
.. table:: *Communication Module*
|
92
115
|
|
93
|
-
|
94
|
-
|Name
|
95
|
-
|
96
|
-
|com.py
|
97
|
-
|
98
|
-
|timer.py|Timer management module |
|
99
|
-
+--------+-----------------------------+
|
116
|
+
+------+-----------------------------+
|
117
|
+
|Name |Decription |
|
118
|
+
+======+=============================+
|
119
|
+
|com.py|Communication handling module|
|
120
|
+
+------+-----------------------------+
|
100
121
|
|
101
122
|
Communication module: com.py
|
102
123
|
============================
|
@@ -117,33 +138,31 @@ Com: Variables
|
|
117
138
|
+------------+-----------+-------+---------------------------------------+
|
118
139
|
|Name |Type |Default|Description |
|
119
140
|
+============+===========+=======+=======================================+
|
120
|
-
|
|
141
|
+
|cmd |TyStr |None |Command |
|
121
142
|
+------------+-----------+-------+---------------------------------------+
|
122
143
|
|d_com_pacmod|TyDic |{} |Communication package module dictionary|
|
123
144
|
+------------+-----------+-------+---------------------------------------+
|
124
145
|
|d_app_pacmod|TyDic |{} |Application package module dictionary |
|
125
146
|
+------------+-----------+-------+---------------------------------------+
|
126
|
-
|
127
|
-
+------------+-----------+-------+---------------------------------------+
|
128
|
-
|ts |TnTimeStamp|None |Timestamp |
|
147
|
+
|sw_init |TyBool |None |Initialisation switch |
|
129
148
|
+------------+-----------+-------+---------------------------------------+
|
130
|
-
|
|
149
|
+
|tenant |TyStr |None |Tenant name |
|
131
150
|
+------------+-----------+-------+---------------------------------------+
|
132
|
-
|
151
|
+
|**Timestamp fields** |
|
133
152
|
+------------+-----------+-------+---------------------------------------+
|
134
|
-
|
|
153
|
+
|ts |TnTimeStamp|None |Timestamp |
|
135
154
|
+------------+-----------+-------+---------------------------------------+
|
136
155
|
|d_timer |TyDic |False |Timer dictionary |
|
137
156
|
+------------+-----------+-------+---------------------------------------+
|
138
157
|
|**Links to other Classes** |
|
139
158
|
+------------+-----------+-------+---------------------------------------+
|
140
|
-
|App |TyAny |
|
159
|
+
|App |TyAny |None |Application class |
|
141
160
|
+------------+-----------+-------+---------------------------------------+
|
142
161
|
|cfg |TyDic |None |Configuration dictionary |
|
143
162
|
+------------+-----------+-------+---------------------------------------+
|
144
|
-
|Log |TyLogger |
|
163
|
+
|Log |TyLogger |None |Log class |
|
145
164
|
+------------+-----------+-------+---------------------------------------+
|
146
|
-
|Exit |TyAny |
|
165
|
+
|Exit |TyAny |None |Exit class |
|
147
166
|
+------------+-----------+-------+---------------------------------------+
|
148
167
|
|
149
168
|
Com: Methods
|
@@ -198,8 +217,23 @@ Parameter
|
|
198
217
|
|\*args |list |arguments array |
|
199
218
|
+--------+-----+--------------------+
|
200
219
|
|
201
|
-
|
202
|
-
|
220
|
+
Timer Module
|
221
|
+
************
|
222
|
+
|
223
|
+
Overview
|
224
|
+
========
|
225
|
+
|
226
|
+
.. Timer Modules-label:
|
227
|
+
.. table:: *Timer Modules*
|
228
|
+
|
229
|
+
+--------+-----------------------------+
|
230
|
+
|Name |Decription |
|
231
|
+
+========+=============================+
|
232
|
+
|timer.py|Timer management module |
|
233
|
+
+--------+-----------------------------+
|
234
|
+
|
235
|
+
Timer module: timer.py
|
236
|
+
======================
|
203
237
|
|
204
238
|
timer.py: Classes
|
205
239
|
-----------------
|
@@ -343,7 +377,7 @@ Overview
|
|
343
377
|
Base module: app\_.py
|
344
378
|
=====================
|
345
379
|
|
346
|
-
The Module ``app.py`` contains a single static class ``App_``.
|
380
|
+
The Module ``app\_.py`` contains a single static class ``App_``.
|
347
381
|
|
348
382
|
Class: App\_
|
349
383
|
------------
|
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
__title__ = 'ka_uts_com'
|
2
|
-
__description__ = 'Communication Utilities.'
|
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.2.250519'
|
5
5
|
__build__ = 0x022200
|
6
6
|
__author__ = 'Bernd Stroehle'
|
7
7
|
__author_email__ = 'bernd.stroehle@gmail.com'
|
@@ -6,12 +6,6 @@ import calendar
|
|
6
6
|
from datetime import datetime
|
7
7
|
|
8
8
|
from ka_uts_arr.aoeq import AoEq
|
9
|
-
from ka_uts_uts.utils.pacmod import PacMod
|
10
|
-
|
11
|
-
from ka_uts_com.app import App
|
12
|
-
from ka_uts_com.cfg import Cfg
|
13
|
-
from ka_uts_com.exit import Exit
|
14
|
-
|
15
9
|
from ka_uts_log.log import Log
|
16
10
|
|
17
11
|
TyAny = Any
|
@@ -33,22 +27,22 @@ class Com:
|
|
33
27
|
"""
|
34
28
|
Communication Class
|
35
29
|
"""
|
30
|
+
cmd: TnStr = None
|
36
31
|
sw_init: bool = False
|
32
|
+
|
33
|
+
com_a_mod = None
|
34
|
+
com_pac = None
|
35
|
+
app_a_mod = None
|
36
|
+
app_pac = None
|
37
37
|
tenant: TnStr = None
|
38
|
-
cmd: TnStr = None
|
39
|
-
d_com_pacmod: TyDic = {}
|
40
|
-
d_app_pacmod: TyDic = {}
|
41
38
|
|
42
39
|
ts: TnTimeStamp
|
43
|
-
# ts_start: TnDateTime = None
|
44
|
-
# ts_end: TnDateTime = None
|
45
|
-
# ts_etime: TnDateTime = None
|
46
40
|
d_timer: TyDic = {}
|
47
41
|
|
48
|
-
Cfg: TnDic = None
|
49
42
|
Log: Any = None
|
50
|
-
|
51
|
-
|
43
|
+
# Cfg: TnDic = None
|
44
|
+
# App: Any = None
|
45
|
+
# Exit: Any = None
|
52
46
|
|
53
47
|
@classmethod
|
54
48
|
def init(cls, kwargs: TyDic):
|
@@ -58,18 +52,22 @@ class Com:
|
|
58
52
|
"""
|
59
53
|
if cls.sw_init:
|
60
54
|
return
|
55
|
+
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
|
+
cls.com_a_mod = cls.__module__.split(".")
|
60
|
+
cls.com_pac = cls.com_a_mod[0]
|
61
|
+
cls.app_a_mod = _cls_app.__module__.split(".")
|
62
|
+
cls.app_pac = cls.app_a_mod[0]
|
61
63
|
cls.sw_init = True
|
62
64
|
cls.tenant = kwargs.get('tenant')
|
63
|
-
cls.cmd = kwargs.get('cmd')
|
64
|
-
cls_app = kwargs.get('cls_app')
|
65
|
-
cls.d_com_pacmod = PacMod.sh_d_pacmod(cls)
|
66
|
-
cls.d_app_pacmod = PacMod.sh_d_pacmod(cls_app)
|
67
65
|
cls.ts = calendar.timegm(time.gmtime())
|
68
66
|
|
69
67
|
cls.Log = Log.sh(**kwargs)
|
70
|
-
cls.Cfg = Cfg.sh(cls, **kwargs)
|
71
|
-
cls.App = App.sh(cls, **kwargs)
|
72
|
-
cls.Exit = Exit.sh(**kwargs)
|
68
|
+
# cls.Cfg = Cfg.sh(cls, **kwargs)
|
69
|
+
# cls.App = App.sh(cls, **kwargs)
|
70
|
+
# cls.Exit = Exit.sh(**kwargs)
|
73
71
|
|
74
72
|
@classmethod
|
75
73
|
def sh_kwargs(cls, cls_app, d_parms, *args) -> TyDic:
|
@@ -1,8 +1,6 @@
|
|
1
1
|
"""
|
2
|
-
Decorators
|
2
|
+
Decorators Module
|
3
3
|
"""
|
4
|
-
# coding=utf-8
|
5
|
-
# from ka_uts_com.timer import Timer
|
6
4
|
import numpy as np
|
7
5
|
from datetime import datetime
|
8
6
|
from ka_uts_uts.utils.fnc import Fnc
|
@@ -10,17 +8,16 @@ from ka_uts_log.log import Log
|
|
10
8
|
|
11
9
|
|
12
10
|
def timer(fnc):
|
11
|
+
"""
|
12
|
+
Timer Decorator
|
13
|
+
"""
|
13
14
|
def wrapper(*args, **kwargs):
|
14
|
-
# Timer.start(fnc, *args, **kwargs)
|
15
15
|
start = datetime.now()
|
16
16
|
fnc(*args, **kwargs)
|
17
17
|
_fnc_name = Fnc.sh_fnc_name(fnc)
|
18
18
|
end = datetime.now()
|
19
|
-
# elapse_time = (end - start).total_seconds()
|
20
19
|
elapse_time = end.timestamp() - start.timestamp()
|
21
|
-
# np_elapse_time = np.format_float_positional(elapse_time, trim='-')
|
22
20
|
np_elapse_time = np.format_float_positional(elapse_time, trim='k')
|
23
21
|
msg = f"{_fnc_name} elapse time [sec] = {np_elapse_time}"
|
24
22
|
Log.info(msg, stacklevel=2)
|
25
|
-
# Timer.end(fnc, *args, **kwargs)
|
26
23
|
return wrapper
|
@@ -1,9 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ka_uts_com
|
3
|
-
Version: 4.0.
|
4
|
-
Summary:
|
5
|
-
Author
|
6
|
-
|
3
|
+
Version: 4.0.2.250519
|
4
|
+
Summary: Communication and CLI Utilities
|
5
|
+
Author: Bernd Stroehle
|
6
|
+
Author-email: bernd.stroehle@gmail.com
|
7
|
+
Maintainer: Bernd Stroehle
|
8
|
+
Maintainer-email: bernd.stroehle@gmail.com
|
9
|
+
License-Expression: GPL-3.0-only WITH Classpath-exception-2.0 OR BSD-3-Clause
|
7
10
|
Project-URL: Source Code, https://github.com/bs29/ka_uts_com/tree/master
|
8
11
|
Project-URL: Homepage, https://kosakya.de/
|
9
12
|
Project-URL: Documentation, https://ka-com.readthedocs.io/en/latest
|
@@ -18,10 +21,10 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
21
|
Requires-Python: >=3.10
|
19
22
|
Description-Content-Type: text/x-rst
|
20
23
|
License-File: LICENSE.txt
|
21
|
-
Requires-Dist: ka_uts_arr>=4.0.
|
22
|
-
Requires-Dist: ka_uts_log>=4.0.
|
23
|
-
Requires-Dist: ka_uts_uts>=4.0.
|
24
|
-
Requires-Dist: numpy>=2.2.
|
24
|
+
Requires-Dist: ka_uts_arr>=4.0.1.250513
|
25
|
+
Requires-Dist: ka_uts_log>=4.0.1.250513
|
26
|
+
Requires-Dist: ka_uts_uts>=4.0.2.250518
|
27
|
+
Requires-Dist: numpy>=2.2.6
|
25
28
|
Dynamic: license-file
|
26
29
|
|
27
30
|
##########
|
@@ -33,7 +36,7 @@ Overview
|
|
33
36
|
|
34
37
|
.. start short_desc
|
35
38
|
|
36
|
-
**
|
39
|
+
**Communication and CLI Utilities**
|
37
40
|
|
38
41
|
.. end short_desc
|
39
42
|
|
@@ -75,15 +78,18 @@ The Package ``ka_uts_com`` consist of the following file types (c.f.: **Appendix
|
|
75
78
|
|
76
79
|
#. **Dunder modules:** (c.f.: **Appendix:** *Special python package modules*)
|
77
80
|
|
78
|
-
#. **
|
81
|
+
#. **Modules**
|
79
82
|
|
80
|
-
|
83
|
+
#. **Decorator Modules**
|
81
84
|
|
82
|
-
|
85
|
+
a. *dec.py*
|
83
86
|
|
84
87
|
#. **Communication Modules**
|
85
88
|
|
86
89
|
a. *com.py*
|
90
|
+
|
91
|
+
#. **Timer Modules**
|
92
|
+
|
87
93
|
#. *timer.py*
|
88
94
|
|
89
95
|
#. **Base Modules**
|
@@ -92,37 +98,55 @@ The Package ``ka_uts_com`` consist of the following file types (c.f.: **Appendix
|
|
92
98
|
#. *cfg.py*
|
93
99
|
#. *exit.py*
|
94
100
|
|
95
|
-
Decorator
|
96
|
-
|
101
|
+
Decorator Module
|
102
|
+
****************
|
97
103
|
|
98
104
|
Overview
|
99
105
|
========
|
100
106
|
|
101
|
-
.. Decorator
|
102
|
-
.. table:: *Decorator
|
107
|
+
.. Decorator Module-label:
|
108
|
+
.. table:: *Decorator Module*
|
109
|
+
|
110
|
+
+------+----------------+
|
111
|
+
|Name |Decription |
|
112
|
+
+======+================+
|
113
|
+
|dec.py|Decorator module|
|
114
|
+
+------+----------------+
|
115
|
+
|
116
|
+
Decorstor module: dec.py
|
117
|
+
========================
|
118
|
+
|
119
|
+
The Decorator Module ``dec.py`` contains the single decorator function ``timer``.
|
120
|
+
|
121
|
+
dec.py Method: timer
|
122
|
+
--------------------
|
123
|
+
|
124
|
+
Parameter
|
125
|
+
^^^^^^^^^
|
126
|
+
|
127
|
+
..dec.py-Method-timer-Parameter-label:
|
128
|
+
.. table:: *dec.py Method timer: Parameter*
|
103
129
|
|
104
|
-
|
105
|
-
|Name
|
106
|
-
|
107
|
-
|
|
108
|
-
|
130
|
+
+----+----------+-----------+
|
131
|
+
|Name|Type |Description|
|
132
|
+
+====+==========+===========+
|
133
|
+
|fnc |TyCallable|function |
|
134
|
+
+----+----------+-----------+
|
109
135
|
|
110
|
-
Communication
|
111
|
-
|
136
|
+
Communication Module
|
137
|
+
********************
|
112
138
|
|
113
139
|
Overview
|
114
140
|
========
|
115
141
|
|
116
|
-
.. Communication
|
117
|
-
.. table:: *Communication
|
142
|
+
.. Communication Module-label:
|
143
|
+
.. table:: *Communication Module*
|
118
144
|
|
119
|
-
|
120
|
-
|Name
|
121
|
-
|
122
|
-
|com.py
|
123
|
-
|
124
|
-
|timer.py|Timer management module |
|
125
|
-
+--------+-----------------------------+
|
145
|
+
+------+-----------------------------+
|
146
|
+
|Name |Decription |
|
147
|
+
+======+=============================+
|
148
|
+
|com.py|Communication handling module|
|
149
|
+
+------+-----------------------------+
|
126
150
|
|
127
151
|
Communication module: com.py
|
128
152
|
============================
|
@@ -143,33 +167,31 @@ Com: Variables
|
|
143
167
|
+------------+-----------+-------+---------------------------------------+
|
144
168
|
|Name |Type |Default|Description |
|
145
169
|
+============+===========+=======+=======================================+
|
146
|
-
|
|
170
|
+
|cmd |TyStr |None |Command |
|
147
171
|
+------------+-----------+-------+---------------------------------------+
|
148
172
|
|d_com_pacmod|TyDic |{} |Communication package module dictionary|
|
149
173
|
+------------+-----------+-------+---------------------------------------+
|
150
174
|
|d_app_pacmod|TyDic |{} |Application package module dictionary |
|
151
175
|
+------------+-----------+-------+---------------------------------------+
|
152
|
-
|
153
|
-
+------------+-----------+-------+---------------------------------------+
|
154
|
-
|ts |TnTimeStamp|None |Timestamp |
|
176
|
+
|sw_init |TyBool |None |Initialisation switch |
|
155
177
|
+------------+-----------+-------+---------------------------------------+
|
156
|
-
|
|
178
|
+
|tenant |TyStr |None |Tenant name |
|
157
179
|
+------------+-----------+-------+---------------------------------------+
|
158
|
-
|
180
|
+
|**Timestamp fields** |
|
159
181
|
+------------+-----------+-------+---------------------------------------+
|
160
|
-
|
|
182
|
+
|ts |TnTimeStamp|None |Timestamp |
|
161
183
|
+------------+-----------+-------+---------------------------------------+
|
162
184
|
|d_timer |TyDic |False |Timer dictionary |
|
163
185
|
+------------+-----------+-------+---------------------------------------+
|
164
186
|
|**Links to other Classes** |
|
165
187
|
+------------+-----------+-------+---------------------------------------+
|
166
|
-
|App |TyAny |
|
188
|
+
|App |TyAny |None |Application class |
|
167
189
|
+------------+-----------+-------+---------------------------------------+
|
168
190
|
|cfg |TyDic |None |Configuration dictionary |
|
169
191
|
+------------+-----------+-------+---------------------------------------+
|
170
|
-
|Log |TyLogger |
|
192
|
+
|Log |TyLogger |None |Log class |
|
171
193
|
+------------+-----------+-------+---------------------------------------+
|
172
|
-
|Exit |TyAny |
|
194
|
+
|Exit |TyAny |None |Exit class |
|
173
195
|
+------------+-----------+-------+---------------------------------------+
|
174
196
|
|
175
197
|
Com: Methods
|
@@ -224,8 +246,23 @@ Parameter
|
|
224
246
|
|\*args |list |arguments array |
|
225
247
|
+--------+-----+--------------------+
|
226
248
|
|
227
|
-
|
228
|
-
|
249
|
+
Timer Module
|
250
|
+
************
|
251
|
+
|
252
|
+
Overview
|
253
|
+
========
|
254
|
+
|
255
|
+
.. Timer Modules-label:
|
256
|
+
.. table:: *Timer Modules*
|
257
|
+
|
258
|
+
+--------+-----------------------------+
|
259
|
+
|Name |Decription |
|
260
|
+
+========+=============================+
|
261
|
+
|timer.py|Timer management module |
|
262
|
+
+--------+-----------------------------+
|
263
|
+
|
264
|
+
Timer module: timer.py
|
265
|
+
======================
|
229
266
|
|
230
267
|
timer.py: Classes
|
231
268
|
-----------------
|
@@ -369,7 +406,7 @@ Overview
|
|
369
406
|
Base module: app\_.py
|
370
407
|
=====================
|
371
408
|
|
372
|
-
The Module ``app.py`` contains a single static class ``App_``.
|
409
|
+
The Module ``app\_.py`` contains a single static class ``App_``.
|
373
410
|
|
374
411
|
Class: App\_
|
375
412
|
------------
|
@@ -5,13 +5,11 @@ classifiers.txt
|
|
5
5
|
pyproject.toml
|
6
6
|
requirements.txt
|
7
7
|
setup.cfg
|
8
|
-
dist/ka_uts_com-4.0.
|
8
|
+
dist/ka_uts_com-4.0.2.250519-py3-none-any.whl
|
9
9
|
ka_uts_com/__init__.py
|
10
10
|
ka_uts_com/__version__.py
|
11
|
-
ka_uts_com/app.py
|
12
|
-
ka_uts_com/cfg.py
|
13
11
|
ka_uts_com/com.py
|
14
|
-
ka_uts_com/
|
12
|
+
ka_uts_com/dec.py
|
15
13
|
ka_uts_com/py.typed
|
16
14
|
ka_uts_com/timer.py
|
17
15
|
ka_uts_com.egg-info/PKG-INFO
|
@@ -19,5 +17,4 @@ ka_uts_com.egg-info/SOURCES.txt
|
|
19
17
|
ka_uts_com.egg-info/dependency_links.txt
|
20
18
|
ka_uts_com.egg-info/not-zip-safe
|
21
19
|
ka_uts_com.egg-info/requires.txt
|
22
|
-
ka_uts_com.egg-info/top_level.txt
|
23
|
-
ka_uts_com/decorators/dec.py
|
20
|
+
ka_uts_com.egg-info/top_level.txt
|
@@ -5,18 +5,19 @@ build-backend = "setuptools.build_meta"
|
|
5
5
|
|
6
6
|
[project]
|
7
7
|
name = "ka_uts_com"
|
8
|
-
description = "
|
9
|
-
|
10
|
-
|
8
|
+
description = "Communication and CLI Utilities"
|
9
|
+
license = "GPL-3.0-only WITH Classpath-Exception-2.0 OR BSD-3-Clause"
|
10
|
+
license-files = ["LICENSE.txt"]
|
11
11
|
requires-python = ">=3.10"
|
12
12
|
dynamic = ["readme", "classifiers", "version", "dependencies"]
|
13
13
|
authors = [
|
14
|
-
{name = "Bernd Stroehle",
|
14
|
+
{name = "Bernd Stroehle"},
|
15
|
+
{email = "bernd.stroehle@gmail.com"},
|
15
16
|
]
|
16
17
|
maintainers = [
|
17
|
-
{name = "Bernd Stroehle",
|
18
|
+
{name = "Bernd Stroehle"},
|
19
|
+
{email = "bernd.stroehle@gmail.com"},
|
18
20
|
]
|
19
|
-
|
20
21
|
[project.urls]
|
21
22
|
"Source Code" = "https://github.com/bs29/ka_uts_com/tree/master"
|
22
23
|
"Homepage" = "https://kosakya.de/"
|
@@ -196,6 +197,6 @@ github_username = "ka_uts_com"
|
|
196
197
|
github_repository = "ka_uts_com"
|
197
198
|
author = "Bernd Stroehle"
|
198
199
|
project = "sphinx-pyproject"
|
199
|
-
copyright = "2021-
|
200
|
+
copyright = "2021-2025 Bernd Stroehle"
|
200
201
|
language = "en"
|
201
202
|
package_root = "ka_uts_com"
|
Binary file
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# coding=utf-8
|
2
|
-
from typing import Any
|
3
|
-
|
4
|
-
from ka_uts_log.log import Log
|
5
|
-
from ka_uts_uts.utils.pacmod import PacMod
|
6
|
-
from ka_uts_uts.ioc.yaml_ import Yaml_
|
7
|
-
|
8
|
-
TyAny = Any
|
9
|
-
TyArr = list[Any]
|
10
|
-
TyBool = bool
|
11
|
-
TyDic = dict[Any, Any]
|
12
|
-
|
13
|
-
TnAny = None | Any
|
14
|
-
TnArr = None | TyArr
|
15
|
-
TnBool = None | bool
|
16
|
-
TnDic = None | TyDic
|
17
|
-
|
18
|
-
|
19
|
-
class App:
|
20
|
-
"""Aplication Class
|
21
|
-
"""
|
22
|
-
sw_init: TyBool = False
|
23
|
-
sw_replace_keys: TnBool = None
|
24
|
-
keys: TnArr = None
|
25
|
-
httpmod: TyAny = None
|
26
|
-
reqs: TyDic = {}
|
27
|
-
app: TyDic = {}
|
28
|
-
|
29
|
-
@classmethod
|
30
|
-
def init(cls, cls_com, **kwargs) -> None:
|
31
|
-
if cls.sw_init:
|
32
|
-
return
|
33
|
-
cls.sw_init = True
|
34
|
-
cls.httpmod = kwargs.get('httpmod')
|
35
|
-
cls.sw_replace_keys = kwargs.get('sw_replace_keys', False)
|
36
|
-
if cls.sw_replace_keys:
|
37
|
-
try:
|
38
|
-
cls.keys = Yaml_.read_with_safeloader(PacMod.sh_path_keys_yml(cls_com))
|
39
|
-
except Exception as exc:
|
40
|
-
Log.error(exc, exc_info=True)
|
41
|
-
raise
|
42
|
-
|
43
|
-
@classmethod
|
44
|
-
def sh(cls, cls_com, **kwargs) -> Any:
|
45
|
-
if cls.sw_init:
|
46
|
-
return cls
|
47
|
-
cls.init(cls_com, **kwargs)
|
48
|
-
return cls
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# coding=utf-8
|
2
|
-
from typing import Any
|
3
|
-
|
4
|
-
from ka_uts_uts.ioc.yaml_ import Yaml_
|
5
|
-
from ka_uts_uts.utils.pacmod import PacMod
|
6
|
-
|
7
|
-
TyAny = Any
|
8
|
-
TyTimeStamp = int
|
9
|
-
TyArr = list[Any]
|
10
|
-
TyBool = bool
|
11
|
-
TyDic = dict[Any, Any]
|
12
|
-
|
13
|
-
|
14
|
-
class Cfg:
|
15
|
-
"""Configuration Class
|
16
|
-
"""
|
17
|
-
sw_init: TyBool = False
|
18
|
-
cfg: Any = None
|
19
|
-
|
20
|
-
@classmethod
|
21
|
-
def init(cls, cls_com, **kwargs) -> None:
|
22
|
-
if cls.sw_init:
|
23
|
-
return
|
24
|
-
cls.sw_init = True
|
25
|
-
_cls_app = kwargs.get('cls_app')
|
26
|
-
_path = PacMod.sh_path_cfg_yml(_cls_app)
|
27
|
-
if _path:
|
28
|
-
cls.cfg = Yaml_.read_with_safeloader(_path)
|
29
|
-
|
30
|
-
@classmethod
|
31
|
-
def sh(cls, cls_com, **kwargs) -> Any:
|
32
|
-
if cls.sw_init:
|
33
|
-
return cls
|
34
|
-
cls.init(cls_com, **kwargs)
|
35
|
-
return cls.cfg
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# coding=utf-8
|
2
|
-
from typing import Any
|
3
|
-
|
4
|
-
TyAny = Any
|
5
|
-
TyArr = list[Any]
|
6
|
-
TyBool = bool
|
7
|
-
TyDic = dict[Any, Any]
|
8
|
-
|
9
|
-
TnAny = None | Any
|
10
|
-
TnArr = None | TyArr
|
11
|
-
TnBool = None | bool
|
12
|
-
TnDic = None | TyDic
|
13
|
-
|
14
|
-
|
15
|
-
class Exit:
|
16
|
-
"""Exit Class
|
17
|
-
"""
|
18
|
-
sw_init: TyBool = False
|
19
|
-
sw_critical: bool = False
|
20
|
-
sw_stop: bool = False
|
21
|
-
sw_interactive: bool = False
|
22
|
-
|
23
|
-
@classmethod
|
24
|
-
def init(cls, **kwargs) -> None:
|
25
|
-
if cls.sw_init:
|
26
|
-
return
|
27
|
-
cls.sw_init = True
|
28
|
-
cls.sw_critical = kwargs.get('sw_critical', False)
|
29
|
-
cls.sw_stop = kwargs.get('sw_stop', False)
|
30
|
-
cls.sw_interactive = kwargs.get('sw_interactive', False)
|
31
|
-
|
32
|
-
@classmethod
|
33
|
-
def sh(cls, **kwargs) -> Any:
|
34
|
-
if cls.sw_init:
|
35
|
-
return cls
|
36
|
-
cls.init(**kwargs)
|
37
|
-
return cls
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ka_uts_com-4.0.0.250510 → ka_uts_com-4.0.2.250519}/ka_uts_com.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|