ka-uts-com 3.0.3.250509__py3-none-any.whl → 4.0.2.250519__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.
ka_uts_com/__version__.py CHANGED
@@ -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__ = '3.0.3.250509'
4
+ __version__ = '4.0.2.250519'
5
5
  __build__ = 0x022200
6
6
  __author__ = 'Bernd Stroehle'
7
7
  __author_email__ = 'bernd.stroehle@gmail.com'
ka_uts_com/com.py CHANGED
@@ -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
- App: Any = None
51
- Exit: Any = None
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:
ka_uts_com/dec.py ADDED
@@ -0,0 +1,23 @@
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
ka_uts_com/timer.py CHANGED
@@ -3,6 +3,7 @@ from datetime import datetime
3
3
 
4
4
  from ka_uts_com.com import Com
5
5
  from ka_uts_log.log import Log
6
+ from ka_uts_uts.utils.fnc import Fnc
6
7
 
7
8
  from typing import Any
8
9
  TyAny = Any
@@ -26,42 +27,58 @@ class Timer:
26
27
  """ Timer Management
27
28
  """
28
29
  @staticmethod
29
- def sh_task_id(d_pacmod: TyDic, class_id: TyAny, parms: TnAny, sep: TyStr) -> TyStr:
30
+ def sh_args_str(*args) -> TyStr:
31
+ """
32
+ Show class name, the item class_name is the class_id if its a string,
33
+ otherwise the attribute __qualname__ is used.
34
+ """
35
+ if not args:
36
+ return ""
37
+ else:
38
+ return f"{args}"
39
+
40
+ @staticmethod
41
+ def sh_kwargs_str(**kwargs) -> TyStr:
42
+ """
43
+ Show class name, the item class_name is the class_id if its a string,
44
+ otherwise the attribute __qualname__ is used.
45
+ """
46
+ if not kwargs:
47
+ return ""
48
+ else:
49
+ return f"{kwargs}"
50
+
51
+ @classmethod
52
+ def sh_task_id(cls, fnc, *args, **kwargs) -> TyStr:
30
53
  """
31
54
  Show task id, which is created by the concationation of the following items:
32
55
  package, module, class_name and parms if they are defined; the items package
33
56
  and module are get from the package-module directory; the item class_name is
34
57
  the class_id if its a string, otherwise the attribute __qualname__ is used.
35
58
  """
36
- package = d_pacmod.get('package')
37
- module = d_pacmod.get('module')
38
- if isinstance(class_id, str):
39
- class_name = class_id
40
- else:
41
- class_name = class_id.__qualname__
42
- if not parms:
43
- parms = ""
44
- else:
45
- parms = f" {parms}"
46
- arr: TyArr = []
47
- for item in [package, module, class_name, parms]:
48
- if not item:
49
- continue
50
- arr.append(item)
51
- return sep.join(arr)
59
+ _pac_name = Fnc.sh_pac_name(fnc)
60
+ _mod_name = Fnc.sh_mod_name(fnc)
61
+ _cls_name = Fnc.sh_cls_name(fnc)
62
+ _args = cls.sh_args_str(*args)
63
+ _kwargs = cls.sh_kwargs_str(**kwargs)
64
+ _sep = kwargs.get('sep', '.')
65
+ task_id: TyStr = _sep.join([_pac_name, _mod_name, _cls_name, _args, _kwargs])
66
+ return task_id
52
67
 
53
68
  @classmethod
54
- def start(cls, class_id: TyAny, parms: TnAny = None, sep: TyStr = ".") -> None:
55
- """ Start Timer
69
+ def start(cls, fnc: TyAny, *args, **kwargs) -> None:
70
+ """
71
+ Start Timer
56
72
  """
57
- task_id = cls.sh_task_id(Com.d_app_pacmod, class_id, parms, sep)
73
+ task_id = cls.sh_task_id(fnc, *args, **kwargs)
58
74
  Com.d_timer[task_id] = datetime.now()
59
75
 
60
76
  @classmethod
61
- def end(cls, class_id: TyAny, parms: TnAny = None, sep: TyStr = ".") -> None:
62
- """ End Timer
77
+ def end(cls, fnc: TyAny, *args, **kwargs) -> None:
78
+ """
79
+ End Timer
63
80
  """
64
- task_id = cls.sh_task_id(Com.d_app_pacmod, class_id, parms, sep)
81
+ task_id = cls.sh_task_id(fnc, *args, **kwargs)
65
82
  start = Com.d_timer.get(task_id)
66
83
  end = datetime.now()
67
84
  elapse_time_sec = Timestamp.sh_elapse_time_sec(end, start)
@@ -0,0 +1,917 @@
1
+ Metadata-Version: 2.4
2
+ Name: ka_uts_com
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
10
+ Project-URL: Source Code, https://github.com/bs29/ka_uts_com/tree/master
11
+ Project-URL: Homepage, https://kosakya.de/
12
+ Project-URL: Documentation, https://ka-com.readthedocs.io/en/latest
13
+ Project-URL: Apache-2.0 License, https://apache.org/licenses/LICENSE-2.0
14
+ Project-URL: GPLv3 License, https://www.gnu.org/licenses/gpl-3.0.en.html
15
+ Classifier: Development Status :: 5 - Production/Stable
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Natural Language :: English
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/x-rst
23
+ License-File: LICENSE.txt
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
28
+ Dynamic: license-file
29
+
30
+ ##########
31
+ ka_uts_com
32
+ ##########
33
+
34
+ Overview
35
+ ********
36
+
37
+ .. start short_desc
38
+
39
+ **Communication and CLI Utilities**
40
+
41
+ .. end short_desc
42
+
43
+ Installation
44
+ ************
45
+
46
+ .. start installation
47
+
48
+ The package ``ka_uts_com`` can be installed from PyPI or Anaconda.
49
+
50
+ To install with ``pip``:
51
+
52
+ .. code-block:: shell
53
+
54
+ $ python -m pip install ka_uts_com
55
+
56
+ To install with ``conda``:
57
+
58
+ .. code-block:: shell
59
+
60
+ $ conda install -c conda-forge ka_uts_com
61
+
62
+ .. end installation
63
+
64
+ Package logging
65
+ ***************
66
+
67
+ (c.f.: **Appendix**: `Package Logging`)
68
+
69
+ Package files
70
+ *************
71
+
72
+ Classification
73
+ ==============
74
+
75
+ The Package ``ka_uts_com`` consist of the following file types (c.f.: **Appendix**):
76
+
77
+ #. **Special files:** (c.f.: **Appendix:** *Special python package files*)
78
+
79
+ #. **Dunder modules:** (c.f.: **Appendix:** *Special python package modules*)
80
+
81
+ #. **Modules**
82
+
83
+ #. **Decorator Modules**
84
+
85
+ a. *dec.py*
86
+
87
+ #. **Communication Modules**
88
+
89
+ a. *com.py*
90
+
91
+ #. **Timer Modules**
92
+
93
+ #. *timer.py*
94
+
95
+ #. **Base Modules**
96
+
97
+ a. *app.py*
98
+ #. *cfg.py*
99
+ #. *exit.py*
100
+
101
+ Decorator Module
102
+ ****************
103
+
104
+ Overview
105
+ ========
106
+
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*
129
+
130
+ +----+----------+-----------+
131
+ |Name|Type |Description|
132
+ +====+==========+===========+
133
+ |fnc |TyCallable|function |
134
+ +----+----------+-----------+
135
+
136
+ Communication Module
137
+ ********************
138
+
139
+ Overview
140
+ ========
141
+
142
+ .. Communication Module-label:
143
+ .. table:: *Communication Module*
144
+
145
+ +------+-----------------------------+
146
+ |Name |Decription |
147
+ +======+=============================+
148
+ |com.py|Communication handling module|
149
+ +------+-----------------------------+
150
+
151
+ Communication module: com.py
152
+ ============================
153
+
154
+ The Communication Module ``com.py`` contains the single static class ``Com``.
155
+
156
+ com.py Class: Com
157
+ -----------------
158
+
159
+ The static Class ``Com`` contains the subsequent variables and methods.
160
+
161
+ Com: Variables
162
+ ^^^^^^^^^^^^^^
163
+
164
+ .. Com-Variables-label:
165
+ .. table:: *Com: Variables*
166
+
167
+ +------------+-----------+-------+---------------------------------------+
168
+ |Name |Type |Default|Description |
169
+ +============+===========+=======+=======================================+
170
+ |cmd |TyStr |None |Command |
171
+ +------------+-----------+-------+---------------------------------------+
172
+ |d_com_pacmod|TyDic |{} |Communication package module dictionary|
173
+ +------------+-----------+-------+---------------------------------------+
174
+ |d_app_pacmod|TyDic |{} |Application package module dictionary |
175
+ +------------+-----------+-------+---------------------------------------+
176
+ |sw_init |TyBool |None |Initialisation switch |
177
+ +------------+-----------+-------+---------------------------------------+
178
+ |tenant |TyStr |None |Tenant name |
179
+ +------------+-----------+-------+---------------------------------------+
180
+ |**Timestamp fields** |
181
+ +------------+-----------+-------+---------------------------------------+
182
+ |ts |TnTimeStamp|None |Timestamp |
183
+ +------------+-----------+-------+---------------------------------------+
184
+ |d_timer |TyDic |False |Timer dictionary |
185
+ +------------+-----------+-------+---------------------------------------+
186
+ |**Links to other Classes** |
187
+ +------------+-----------+-------+---------------------------------------+
188
+ |App |TyAny |None |Application class |
189
+ +------------+-----------+-------+---------------------------------------+
190
+ |cfg |TyDic |None |Configuration dictionary |
191
+ +------------+-----------+-------+---------------------------------------+
192
+ |Log |TyLogger |None |Log class |
193
+ +------------+-----------+-------+---------------------------------------+
194
+ |Exit |TyAny |None |Exit class |
195
+ +------------+-----------+-------+---------------------------------------+
196
+
197
+ Com: Methods
198
+ ^^^^^^^^^^^^
199
+
200
+ .. Com-Methods-label:
201
+ .. table:: *Com Methods*
202
+
203
+ +---------+-------------------------------------------------------+
204
+ |Name |Description |
205
+ +=========+=======================================================+
206
+ |init |Initialise static variables if they are not initialized|
207
+ +---------+-------------------------------------------------------+
208
+ |sh_kwargs|Show keyword arguments |
209
+ +---------+-------------------------------------------------------+
210
+
211
+ Com Method: init
212
+ ^^^^^^^^^^^^^^^^
213
+
214
+ Parameter
215
+ """""""""
216
+
217
+ ..Com-Method-init-Parameter-label:
218
+ .. table:: *Com Method init: Parameter*
219
+
220
+ +---------+-----+-----------------+
221
+ |Name |Type |Description |
222
+ +=========+=====+=================+
223
+ |cls |class|current class |
224
+ +---------+-----+-----------------+
225
+ |\**kwargs|TyAny|keyword arguments|
226
+ +---------+-----+-----------------+
227
+
228
+ Com Method: sh_kwargs
229
+ ^^^^^^^^^^^^^^^^^^^^^
230
+
231
+ Parameter
232
+ """""""""
233
+
234
+ .. Com-Method-sh_kwargs-Parameter-label:
235
+ .. table:: *Com Method sh_kwargs: Parameter*
236
+
237
+ +--------+-----+--------------------+
238
+ |Name |Type |Description |
239
+ +========+=====+====================+
240
+ |cls |class|current class |
241
+ +--------+-----+--------------------+
242
+ |root_cls|class|root lass |
243
+ +--------+-----+--------------------+
244
+ |d_parms |TyDic|parameter dictionary|
245
+ +--------+-----+--------------------+
246
+ |\*args |list |arguments array |
247
+ +--------+-----+--------------------+
248
+
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
+ ======================
266
+
267
+ timer.py: Classes
268
+ -----------------
269
+
270
+ The Module ``timer.py`` contains the following classes
271
+
272
+
273
+ .. timer.py-Classes-label:
274
+ .. table:: *timer.py classes*
275
+
276
+ +---------+------+---------------+
277
+ |Name |Type |Description |
278
+ +=========+======+===============+
279
+ |Timestamp|static|Timestamp class|
280
+ +---------+------+---------------+
281
+ |Timer |static|Timer class |
282
+ +---------+------+---------------+
283
+
284
+ timer.py Class: Timer
285
+ ---------------------
286
+
287
+ Timer: Methods
288
+ ^^^^^^^^^^^^^^
289
+
290
+ .. Timer-Methods-label:
291
+ .. table:: *Timer Methods*
292
+
293
+ +----------+------------------------------------+
294
+ |Name |Description |
295
+ +==========+====================================+
296
+ |sh_task_id|Show task id |
297
+ +----------+------------------------------------+
298
+ |start |Start Timer |
299
+ +----------+------------------------------------+
300
+ |end |End Timer and Log Timer info message|
301
+ +----------+------------------------------------+
302
+
303
+ Timer Method: sh_task_id
304
+ ^^^^^^^^^^^^^^^^^^^^^^^^
305
+
306
+ Show task id, which is created by the concatination of the following items if they are defined:
307
+ #. package,
308
+ #. module,
309
+ #. class_name,
310
+ #. parms
311
+ The items package and module are get from the package-module directory;
312
+ The item class_name is the class_id if its a string, otherwise the attribute
313
+ __qualname__ is used.
314
+
315
+ Parameter
316
+ """""""""
317
+
318
+ .. Parameter-of-Timer-Method-sh_task_id-label:
319
+ .. table:: *Parameter of: Timer Method sh_task_id*
320
+
321
+ +--------+-----+-----------------+
322
+ |Name |Type |Description |
323
+ +========+=====+=================+
324
+ |d_pacmod|TyDic|pacmod dictionary|
325
+ +--------+-----+-----------------+
326
+ |class_id|TyAny|Class Id |
327
+ +--------+-----+-----------------+
328
+ |parms |TnAny|Parameters |
329
+ +--------+-----+-----------------+
330
+ |sep |TyStr|Separator |
331
+ +--------+-----+-----------------+
332
+
333
+ Return Value
334
+ """"""""""""
335
+
336
+ .. Timer-Method-sh_task_id-Return-Value-label:
337
+ .. table:: *Timer Method sh_task_id: Return Value*
338
+
339
+ +----+-----+-----------+
340
+ |Name|Type |Description|
341
+ +====+=====+===========+
342
+ | |TyStr|Task Id |
343
+ +----+-----+-----------+
344
+
345
+ Timer Method: start
346
+ ^^^^^^^^^^^^^^^^^^^
347
+
348
+ Parameter
349
+ """""""""
350
+
351
+ .. Parameter-of-Timer-Method-start-Parameter-label:
352
+ .. table:: *Timer Method start: Parameter*
353
+
354
+ +--------+-----+-------------+
355
+ |Name |Type |Description |
356
+ +========+=====+=============+
357
+ |cls |class|current class|
358
+ +--------+-----+-------------+
359
+ |class_id|TyAny|Class Id |
360
+ +--------+-----+-------------+
361
+ |parms |TnAny|Parameter |
362
+ +--------+-----+-------------+
363
+ |sep |TyStr|Separator |
364
+ +--------+-----+-------------+
365
+
366
+ Timer Method: end
367
+ ^^^^^^^^^^^^^^^^^
368
+
369
+ Parameter
370
+ """""""""
371
+
372
+ .. Parameter-of-Timer-Method-end-label:
373
+ .. table:: *Parameter of: Timer Method end*
374
+
375
+ +--------+-----+-------------+
376
+ |Name |Type |Description |
377
+ +========+=====+=============+
378
+ |cls |class|current class|
379
+ +--------+-----+-------------+
380
+ |class_id|TyAny|Class Id |
381
+ +--------+-----+-------------+
382
+ |parms |TnAny|Parameter |
383
+ +--------+-----+-------------+
384
+ |sep |TyStr|Separator |
385
+ +--------+-----+-------------+
386
+
387
+ Base Modules
388
+ ************
389
+
390
+ Overview
391
+ ========
392
+
393
+ .. Base Modules-label:
394
+ .. table:: *Base Modules*
395
+
396
+ +---------+----------------------------+
397
+ |Name |Decription |
398
+ +=========+============================+
399
+ |app\_.py |Application setup module |
400
+ +---------+----------------------------+
401
+ |cfg\_.py |Configuration setup module |
402
+ +---------+----------------------------+
403
+ |exit\_.py|Exit Manafement setup module|
404
+ +---------+----------------------------+
405
+
406
+ Base module: app\_.py
407
+ =====================
408
+
409
+ The Module ``app\_.py`` contains a single static class ``App_``.
410
+
411
+ Class: App\_
412
+ ------------
413
+
414
+ The static class ``App_`` contains the subsequent static variables and methods
415
+
416
+ App\_: Static Variables
417
+ ^^^^^^^^^^^^^^^^^^^^^^^
418
+
419
+ .. Appl\_ Static-Variables-label:
420
+ .. table:: *Appl\_ tatic Variables*
421
+
422
+ +---------------+-------+-------+---------------------+
423
+ |Name |Type |Default|Description |
424
+ +===============+=======+=======+=====================+
425
+ |sw_init |TyBool |False |initialisation switch|
426
+ +---------------+-------+-------+---------------------+
427
+ |httpmod |TyDic |None |http modus |
428
+ +---------------+-------+-------+---------------------+
429
+ |sw_replace_keys|TnBool |False |replace keys switch |
430
+ +---------------+-------+-------+---------------------+
431
+ |keys |TnArr |None |Keys array |
432
+ +---------------+-------+-------+---------------------+
433
+ |reqs |TyDic |None |Requests dictionary |
434
+ +---------------+-------+-------+---------------------+
435
+ |app |TyDic |None |Appliction dictionary|
436
+ +---------------+-------+-------+---------------------+
437
+
438
+ App\_: Methods
439
+ ^^^^^^^^^^^^^^
440
+
441
+ .. App\_-Methods-label:
442
+ .. table:: *App\_ Methods*
443
+
444
+ +----+------+------------------------------------+
445
+ |Name|Type |Description |
446
+ +====+======+====================================+
447
+ |init|class |initialise static variables of class|
448
+ | | |if they are not allready initialized|
449
+ +----+------+------------------------------------+
450
+ |sh |class |show (return) class |
451
+ +----+------+------------------------------------+
452
+
453
+ App\_ Method: init
454
+ ^^^^^^^^^^^^^^^^^^
455
+
456
+ Parameter
457
+ """""""""
458
+
459
+ .. Parameter-of-App\_-Method-init-label:
460
+ .. table:: *Parameter of: App\_ Method init*
461
+
462
+ +---------+-----+-----------------+
463
+ |Name |Type |Description |
464
+ +=========+=====+=================+
465
+ |cls |class|Current class |
466
+ +---------+-----+-----------------+
467
+ |\**kwargs|TyAny|Keyword arguments|
468
+ +---------+-----+-----------------+
469
+
470
+ App\_ Method: sh
471
+ ^^^^^^^^^^^^^^^^
472
+
473
+ .. App\_-Method-sh-label:
474
+ .. table:: *App\_ Method: sh*
475
+
476
+ +---------+-----+-----------------+
477
+ |Name |Type |Description |
478
+ +=========+=====+=================+
479
+ |cls |class|Current class |
480
+ +---------+-----+-----------------+
481
+ |\**kwargs|TyAny|Keyword arguments|
482
+ +---------+-----+-----------------+
483
+
484
+ Return Value
485
+ """"""""""""
486
+
487
+ .. App\_-Method-sh-Return-Value-label:
488
+ .. table:: *App\_ Method sh: Return Value*
489
+
490
+ +----+--------+-----------+
491
+ |Name|Type |Description|
492
+ +====+========+===========+
493
+ |log |TyLogger|Logger |
494
+ +----+--------+-----------+
495
+
496
+ Base module: cfg\_.py
497
+ =====================
498
+
499
+ The Base module cfg\_.py contains a single static class ``Cfg_``.
500
+
501
+ cfg\_.py Class Cfg\_
502
+ ---------------------
503
+
504
+ The static class ``Cfg_`` contains the subsequent static variables and methods
505
+
506
+ Cfg\_Static Variables
507
+ ^^^^^^^^^^^^^^^^^^^^^
508
+
509
+ .. Cfg\_-Static-Variables-label:
510
+ .. table:: *Cfg\_ Static Variables*
511
+
512
+ +----+-----+-------+--------------------+
513
+ |Name|Type |Default|Description |
514
+ +====+=====+=======+====================+
515
+ |cfg |TyDic|None |Configuration object|
516
+ +----+-----+-------+--------------------+
517
+
518
+ Cfg\_ Methods
519
+ ^^^^^^^^^^^^^
520
+
521
+ .. Cfg\_-Methods-label:
522
+ .. table:: *Cfg\_ Methods*
523
+
524
+ +----+------+-----------------------------------+
525
+ |Name|Type |Description |
526
+ +====+======+===================================+
527
+ |sh |class |read pacmod yaml file into class |
528
+ | | |variable cls.dic and return cls.cfg|
529
+ +----+------+-----------------------------------+
530
+
531
+ Cfg\_ Method: sh
532
+ ^^^^^^^^^^^^^^^^
533
+
534
+ Parameter
535
+ """""""""
536
+
537
+ .. Cfg\_-Method-sh-Parameter-label:
538
+ .. table:: *Cfg\_ Method sh: Parameter*
539
+
540
+ +--------+--------+-----------------+
541
+ |Name |Type |Description |
542
+ +========+========+=================+
543
+ |cls |class |Current class |
544
+ +--------+--------+-----------------+
545
+ |log |TyLogger|Logger |
546
+ +--------+--------+-----------------+
547
+ |d_pacmod|TyDic |pacmod dictionary|
548
+ +--------+--------+-----------------+
549
+
550
+ Return Value
551
+ """"""""""""
552
+
553
+ .. Cfg\_-Method-sh-Return-Value-label:
554
+ .. table:: *Cfg\_ Method sh: Return Value*
555
+
556
+ +-------+-----+-----------+
557
+ |Name |Type |Description|
558
+ +=======+=====+===========+
559
+ |cls.cfg|TyDic| |
560
+ +-------+-----+-----------+
561
+
562
+ Base Modul: exit\_.py
563
+ =====================
564
+
565
+ The Base module exit\_.py contains a single static class ``Ext_``.
566
+
567
+ exit\_.py class: Exit\_
568
+ -----------------------
569
+
570
+ The static Class ``Exit_`` of Module exit\_.py contains the subsequent static variables and methods.
571
+
572
+ Exit\_: Variables
573
+ ^^^^^^^^^^^^^^^^^
574
+
575
+ .. Exit\_-Variables-label:
576
+ .. table:: *Exit\_ Variables*
577
+
578
+ +--------------+------+-------+---------------------+
579
+ |Name |Type |Default|Description |
580
+ +==============+======+=======+=====================+
581
+ |sw_init |TyBool|False |initialisation switch|
582
+ +--------------+------+-------+---------------------+
583
+ |sw_critical |TyBool|False |critical switch |
584
+ +--------------+------+-------+---------------------+
585
+ |sw_stop |TyBool|False |stop switch |
586
+ +--------------+------+-------+---------------------+
587
+ |sw_interactive|TyBool|False |interactive switch |
588
+ +--------------+------+-------+---------------------+
589
+
590
+ Exit\_: Methods
591
+ ^^^^^^^^^^^^^^^
592
+
593
+ .. Exit\_-Methods-label:
594
+ .. table:: *Exit\_ Methods*
595
+
596
+ +----+------+------------------------------------+
597
+ |Name|Method|Description |
598
+ +====+======+====================================+
599
+ |init|class |initialise static variables of class|
600
+ | | |if they are not allready initialized|
601
+ +----+------+------------------------------------+
602
+ |sh |class |show (return) class |
603
+ +----+------+------------------------------------+
604
+
605
+ Exit\_: Method: init
606
+ ^^^^^^^^^^^^^^^^^^^^
607
+
608
+ Parameter
609
+ """""""""
610
+
611
+ .. Exit\_-Method-init-Parameter:
612
+ .. table:: *Exit\_ Method init: Parameter*
613
+
614
+ +---------+-----+-----------------+
615
+ |Name |Type |Description |
616
+ +=========+=====+=================+
617
+ |cls |class|Current class |
618
+ +---------+-----+-----------------+
619
+ |\**kwargs|TyAny|Keyword arguments|
620
+ +---------+-----+-----------------+
621
+
622
+ Exit\_: Method: sh
623
+ ^^^^^^^^^^^^^^^^^^
624
+
625
+ Parameter
626
+ """""""""
627
+
628
+ .. Exit\_-Method-sh-Parameter:
629
+ .. table:: *Exit\_ Method sh: Parameter*
630
+
631
+ +---------+-----+-----------------+
632
+ |Name |Type |Description |
633
+ +=========+=====+=================+
634
+ |cls |class|Current class |
635
+ +---------+-----+-----------------+
636
+ |\**kwargs|TyAny|Keyword arguments|
637
+ +---------+-----+-----------------+
638
+
639
+ Return Value
640
+ """"""""""""
641
+
642
+ .. Exit\_-Method-sh-Return-Value:
643
+ .. table:: *Exit\_ Method sh: Return Value*
644
+
645
+ +----+-----+-------------+
646
+ |Name|Type |Description |
647
+ +====+=====+=============+
648
+ |cls |class|Current class|
649
+ +----+-----+-------------+
650
+
651
+ Appendix
652
+ ********
653
+
654
+ Package Logging
655
+ ===============
656
+
657
+ Description
658
+ -----------
659
+
660
+ The Standard or user specifig logging is carried out by the log.py module of the logging
661
+ package ka_uts_log using the configuration files **ka_std_log.yml** or **ka_usr_log.yml**
662
+ in the configuration directory **cfg** of the logging package **ka_uts_log**.
663
+ The Logging configuration of the logging package could be overriden by yaml files with
664
+ the same names in the configuration directory **cfg** of the application packages.
665
+
666
+ Log message types
667
+ -----------------
668
+
669
+ Logging defines log file path names for the following log message types: .
670
+
671
+ #. *debug*
672
+ #. *info*
673
+ #. *warning*
674
+ #. *error*
675
+ #. *critical*
676
+
677
+ Application parameter for logging
678
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
679
+
680
+ .. Application-parameter-used-in-log-naming-label:
681
+ .. table:: *Application parameter used in log naming*
682
+
683
+ +-----------------+---------------------------+----------+------------+
684
+ |Name |Decription |Values |Example |
685
+ +=================+===========================+==========+============+
686
+ |dir_dat |Application data directory | |/otev/data |
687
+ +-----------------+---------------------------+----------+------------+
688
+ |tenant |Application tenant name | |UMH |
689
+ +-----------------+---------------------------+----------+------------+
690
+ |package |Application package name | |otev_xls_srr|
691
+ +-----------------+---------------------------+----------+------------+
692
+ |cmd |Application command | |evupreg |
693
+ +-----------------+---------------------------+----------+------------+
694
+ |pid |Process ID | |æevupreg |
695
+ +-----------------+---------------------------+----------+------------+
696
+ |log_ts_type |Timestamp type used in |ts, |ts |
697
+ | |logging files|ts, dt |dt | |
698
+ +-----------------+---------------------------+----------+------------+
699
+ |log_sw_single_dir|Enable single log directory|True, |True |
700
+ | |or multiple log directories|False | |
701
+ +-----------------+---------------------------+----------+------------+
702
+
703
+ Log type and Log directories
704
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
705
+
706
+ Single or multiple Application log directories can be used for each message type:
707
+
708
+ .. Log-types-and-Log-directories-label:
709
+ .. table:: *Log types and directoriesg*
710
+
711
+ +--------------+---------------+
712
+ |Log type |Log directory |
713
+ +--------+-----+--------+------+
714
+ |long |short|multiple|single|
715
+ +========+=====+========+======+
716
+ |debug |dbqs |dbqs |logs |
717
+ +--------+-----+--------+------+
718
+ |info |infs |infs |logs |
719
+ +--------+-----+--------+------+
720
+ |warning |wrns |wrns |logs |
721
+ +--------+-----+--------+------+
722
+ |error |errs |errs |logs |
723
+ +--------+-----+--------+------+
724
+ |critical|crts |crts |logs |
725
+ +--------+-----+--------+------+
726
+
727
+ Log files naming
728
+ ^^^^^^^^^^^^^^^^
729
+
730
+ Naming Conventions
731
+ """"""""""""""""""
732
+
733
+ .. Naming-conventions-for-logging-file-paths-label:
734
+ .. table:: *Naming conventions for logging file paths*
735
+
736
+ +--------+-------------------------------------------------------+-------------------------+
737
+ |Type |Directory |File |
738
+ +========+=======================================================+=========================+
739
+ |debug |/<dir_dat>/<tenant>/RUN/<package>/<cmd>/<Log directory>|<Log type>_<ts>_<pid>.log|
740
+ +--------+-------------------------------------------------------+-------------------------+
741
+ |info |/<dir_dat>/<tenant>/RUN/<package>/<cmd>/<Log directory>|<Log type>_<ts>_<pid>.log|
742
+ +--------+-------------------------------------------------------+-------------------------+
743
+ |warning |/<dir_dat>/<tenant>/RUN/<package>/<cmd>/<Log directory>|<Log type>_<ts>_<pid>.log|
744
+ +--------+-------------------------------------------------------+-------------------------+
745
+ |error |/<dir_dat>/<tenant>/RUN/<package>/<cmd>/<Log directory>|<Log type>_<ts>_<pid>.log|
746
+ +--------+-------------------------------------------------------+-------------------------+
747
+ |critical|/<dir_dat>/<tenant>/RUN/<package>/<cmd>/<Log directory>|<Log type>_<ts>_<pid>.log|
748
+ +--------+-------------------------------------------------------+-------------------------+
749
+
750
+ Naming Examples
751
+ """""""""""""""
752
+
753
+ .. Naming-examples-for-logging-file-paths-label:
754
+ .. table:: *Naming examples for logging file paths*
755
+
756
+ +--------+--------------------------------------------+------------------------+
757
+ |Type |Directory |File |
758
+ +========+============================================+========================+
759
+ |debug |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|debs_1737118199_9470.log|
760
+ +--------+--------------------------------------------+------------------------+
761
+ |info |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|infs_1737118199_9470.log|
762
+ +--------+--------------------------------------------+------------------------+
763
+ |warning |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|wrns_1737118199_9470.log|
764
+ +--------+--------------------------------------------+------------------------+
765
+ |error |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|errs_1737118199_9470.log|
766
+ +--------+--------------------------------------------+------------------------+
767
+ |critical|/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|crts_1737118199_9470.log|
768
+ +--------+--------------------------------------------+------------------------+
769
+
770
+ Python Terminology
771
+ ==================
772
+
773
+ Python packages
774
+ ---------------
775
+
776
+ .. Python packages-label:
777
+ .. table:: *Python packages*
778
+
779
+ +-----------+-----------------------------------------------------------------+
780
+ |Name |Definition |
781
+ +===========+==========+======================================================+
782
+ |Python |Python packages are directories that contains the special module |
783
+ |package |``__init__.py`` and other modules, packages files or directories.|
784
+ +-----------+-----------------------------------------------------------------+
785
+ |Python |Python sub-packages are python packages which are contained in |
786
+ |sub-package|another pyhon package. |
787
+ +-----------+-----------------------------------------------------------------+
788
+
789
+ Python package Sub-directories
790
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
791
+
792
+ .. Python package-Sub-directories-label:
793
+ .. table:: *Python packages Sub-directories*
794
+
795
+ +----------------------+-------------------------------+
796
+ |Name |Definition |
797
+ +======================+==========+====================+
798
+ |Python package |Sub-directories are directories|
799
+ |sub-directory |contained in python packages. |
800
+ +----------------------+-------------------------------+
801
+ |Special Python package|Python package sub-directories |
802
+ |sub-directory |with a special meaning. |
803
+ +----------------------+-------------------------------+
804
+
805
+ Special python package Sub-directories
806
+ """"""""""""""""""""""""""""""""""""""
807
+
808
+ .. Special-python-package-Sub-directories-label:
809
+ .. table:: *Special python Sub-directories*
810
+
811
+ +-------+------------------------------------------+
812
+ |Name |Description |
813
+ +=======+==========================================+
814
+ |bin |Directory for package scripts. |
815
+ +-------+------------------------------------------+
816
+ |cfg |Directory for package configuration files.|
817
+ +-------+------------------------------------------+
818
+ |data |Directory for package data files. |
819
+ +-------+------------------------------------------+
820
+ |service|Directory for systemd service scripts. |
821
+ +-------+------------------------------------------+
822
+
823
+ Python package files
824
+ ^^^^^^^^^^^^^^^^^^^^
825
+
826
+ .. Python-package-files-label:
827
+ .. table:: *Python package files*
828
+
829
+ +--------------+---------------------------------------------------------+
830
+ |Name |Definition |
831
+ +==============+==========+==============================================+
832
+ |Python |Files within a python package. |
833
+ |package files | |
834
+ +--------------+---------------------------------------------------------+
835
+ |Special python|Package files which are not modules and used as python |
836
+ |package files |and used as python marker files like ``__init__.py``. |
837
+ +--------------+---------------------------------------------------------+
838
+ |Python package|Files with suffix ``.py``; they could be empty or contain|
839
+ |module |python code; other modules can be imported into a module.|
840
+ +--------------+---------------------------------------------------------+
841
+ |Special python|Modules like ``__init__.py`` or ``main.py`` with special |
842
+ |package module|names and functionality. |
843
+ +--------------+---------------------------------------------------------+
844
+
845
+ Special python package files
846
+ """"""""""""""""""""""""""""
847
+
848
+ .. Special-python-package-files-label:
849
+ .. table:: *Special python package files*
850
+
851
+ +--------+--------+---------------------------------------------------------------+
852
+ |Name |Type |Description |
853
+ +========+========+===============================================================+
854
+ |py.typed|Type |The ``py.typed`` file is a marker file used in Python packages |
855
+ | |checking|to indicate that the package supports type checking. This is a |
856
+ | |marker |part of the PEP 561 standard, which provides a standardized way|
857
+ | |file |to package and distribute type information in Python. |
858
+ +--------+--------+---------------------------------------------------------------+
859
+
860
+ Special python package modules
861
+ """"""""""""""""""""""""""""""
862
+
863
+ .. Special-Python-package-modules-label:
864
+ .. table:: *Special Python package modules*
865
+
866
+ +--------------+-----------+-----------------------------------------------------------------+
867
+ |Name |Type |Description |
868
+ +==============+===========+=================================================================+
869
+ |__init__.py |Package |The dunder (double underscore) module ``__init__.py`` is used to |
870
+ | |directory |execute initialisation code or mark the directory it contains as |
871
+ | |marker |a package. The Module enforces explicit imports and thus clear |
872
+ | |file |namespace use and call them with the dot notation. |
873
+ +--------------+-----------+-----------------------------------------------------------------+
874
+ |__main__.py |entry point|The dunder module ``__main__.py`` serves as an entry point for |
875
+ | |for the |the package. The module is executed when the package is called by|
876
+ | |package |the interpreter with the command **python -m <package name>**. |
877
+ +--------------+-----------+-----------------------------------------------------------------+
878
+ |__version__.py|Version |The dunder module ``__version__.py`` consist of assignment |
879
+ | |file |statements used in Versioning. |
880
+ +--------------+-----------+-----------------------------------------------------------------+
881
+
882
+ Python elements
883
+ ---------------
884
+
885
+ .. Python elements-label:
886
+ .. table:: *Python elements*
887
+
888
+ +---------------------+--------------------------------------------------------+
889
+ |Name |Description |
890
+ +=====================+========================================================+
891
+ |Python method |Python functions defined in python modules. |
892
+ +---------------------+--------------------------------------------------------+
893
+ |Special python method|Python functions with special names and functionalities.|
894
+ +---------------------+--------------------------------------------------------+
895
+ |Python class |Classes defined in python modules. |
896
+ +---------------------+--------------------------------------------------------+
897
+ |Python class method |Python methods defined in python classes |
898
+ +---------------------+--------------------------------------------------------+
899
+
900
+ Special python methods
901
+ ^^^^^^^^^^^^^^^^^^^^^^
902
+
903
+ .. Special-python-methods-label:
904
+ .. table:: *Special python methods*
905
+
906
+ +--------+------------+----------------------------------------------------------+
907
+ |Name |Type |Description |
908
+ +========+============+==========================================================+
909
+ |__init__|class object|The special method ``__init__`` is called when an instance|
910
+ | |constructor |(object) of a class is created; instance attributes can be|
911
+ | |method |defined and initalized in the method. |
912
+ +--------+------------+----------------------------------------------------------+
913
+
914
+ Table of Contents
915
+ =================
916
+
917
+ .. contents:: **Table of Content**
@@ -0,0 +1,11 @@
1
+ ka_uts_com/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ ka_uts_com/__version__.py,sha256=MnTyIshnEK9ysvQxq9S1sZHBeW0zVhmCMoy3sMtMSsM,373
3
+ ka_uts_com/com.py,sha256=adNYxZIhPXLRLNyvJ772ZZRy70n2yKXPbrO5kFM3Bzk,1927
4
+ ka_uts_com/dec.py,sha256=1qxjJI2Rem7ZyETP1z20SsYPSYQw0XHUAHa_JbachBE,615
5
+ ka_uts_com/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ ka_uts_com/timer.py,sha256=qVKanfNBnsU3B6C-Y5mjHWnS056GiYlRmFwEnX6BAU0,2546
7
+ ka_uts_com-4.0.2.250519.dist-info/licenses/LICENSE.txt,sha256=BiT3QGI_2iRbdvgS3HDig57lnXJVk60Pj4xM9eeCczI,814
8
+ ka_uts_com-4.0.2.250519.dist-info/METADATA,sha256=nbt1ho98PUT5FQvo6JsfRQpOBggrA_TC6GWBRUV4P2M,32599
9
+ ka_uts_com-4.0.2.250519.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
10
+ ka_uts_com-4.0.2.250519.dist-info/top_level.txt,sha256=cWCIrm1g6Jn-FbCQuB3wBrrNH1YwqVlc6mE0jV6vg74,21
11
+ ka_uts_com-4.0.2.250519.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.1.0)
2
+ Generator: setuptools (80.7.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
ka_uts_com/app.py DELETED
@@ -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
ka_uts_com/cfg.py DELETED
@@ -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,13 +0,0 @@
1
- """
2
- Decorators
3
- """
4
- # coding=utf-8
5
- from ka_uts_com.timer import Timer
6
-
7
-
8
- def timer(fnc):
9
- def wrapper(*args, **kwargs):
10
- Timer.start(fnc)
11
- fnc(*args, **kwargs)
12
- Timer.end(fnc)
13
- return wrapper
ka_uts_com/exit.py DELETED
@@ -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
@@ -1,23 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: ka_uts_com
3
- Version: 3.0.3.250509
4
- Summary: Communication and CLIs Utilities
5
- Author-email: Bernd Stroehle <bernd.stroehle@gmail.com>
6
- Maintainer-email: Bernd Stroehle <bernd.stroehle@gmail.com>
7
- Project-URL: Source Code, https://github.com/bs29/ka_uts_com/tree/master
8
- Project-URL: Homepage, https://kosakya.de/
9
- Project-URL: Documentation, https://ka-com.readthedocs.io/en/latest
10
- Project-URL: Apache-2.0 License, https://apache.org/licenses/LICENSE-2.0
11
- Project-URL: GPLv3 License, https://www.gnu.org/licenses/gpl-3.0.en.html
12
- Classifier: Development Status :: 5 - Production/Stable
13
- Classifier: Intended Audience :: Developers
14
- Classifier: Operating System :: OS Independent
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Natural Language :: English
17
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
- Requires-Python: >=3.10
19
- Description-Content-Type: text/x-rst
20
- License-File: LICENSE.txt
21
- Requires-Dist: ka_uts_arr>=3.0.1.250507
22
- Requires-Dist: ka_uts_log>=3.0.0.250505
23
- Requires-Dist: ka_uts_uts>=3.0.2.250507
@@ -1,14 +0,0 @@
1
- ka_uts_com/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- ka_uts_com/__version__.py,sha256=XihCO_MVEXOpxfDAuBdagZDQ0iZOqKx98gG0vaKpZV4,365
3
- ka_uts_com/app.py,sha256=XrMhqQI9YHzw1XmC8zGgCJwrwxzkHtHDEQIo9gP07DI,1151
4
- ka_uts_com/cfg.py,sha256=RNWxOz3XtP0HgH0z1e6tAQA_L0alEh82_EOPOoyv3R4,768
5
- ka_uts_com/com.py,sha256=PmbQ46Ecneuh9DHuJ40yFcrwCJYfx_Uqlw4NyliVovY,1937
6
- ka_uts_com/exit.py,sha256=RIpFKwEGeBCBBPPQXIcLsrYeNY2dTF8BDlESe6UhdMo,791
7
- ka_uts_com/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- ka_uts_com/timer.py,sha256=hSNDh5qV6stSRLLEv-G_eMRoglsOU9N2HvRPUQ-s7yU,2153
9
- ka_uts_com/decorators/dec.py,sha256=NHerkpjOYpJXz2CIh9HlN3_YCyLv-SbyQL4ldyGUSpM,217
10
- ka_uts_com-3.0.3.250509.dist-info/LICENSE.txt,sha256=BiT3QGI_2iRbdvgS3HDig57lnXJVk60Pj4xM9eeCczI,814
11
- ka_uts_com-3.0.3.250509.dist-info/METADATA,sha256=9Ctg-Nruei7wT10wdCUKk0M6Pv1tW0_4NvaiCdSqNYw,1067
12
- ka_uts_com-3.0.3.250509.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
13
- ka_uts_com-3.0.3.250509.dist-info/top_level.txt,sha256=cWCIrm1g6Jn-FbCQuB3wBrrNH1YwqVlc6mE0jV6vg74,21
14
- ka_uts_com-3.0.3.250509.dist-info/RECORD,,