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