ka-uts-com 3.0.3.250509__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.
Files changed (31) hide show
  1. ka_uts_com-4.0.2.250519/PKG-INFO +917 -0
  2. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/README.rst +71 -37
  3. ka_uts_com-4.0.2.250519/dist/ka_uts_com-4.0.2.250519-py3-none-any.whl +0 -0
  4. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/ka_uts_com/__version__.py +2 -2
  5. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/ka_uts_com/com.py +20 -22
  6. ka_uts_com-4.0.2.250519/ka_uts_com/dec.py +23 -0
  7. ka_uts_com-4.0.2.250519/ka_uts_com/timer.py +86 -0
  8. ka_uts_com-4.0.2.250519/ka_uts_com.egg-info/PKG-INFO +917 -0
  9. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/ka_uts_com.egg-info/SOURCES.txt +3 -6
  10. ka_uts_com-4.0.2.250519/ka_uts_com.egg-info/requires.txt +4 -0
  11. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/pyproject.toml +9 -9
  12. ka_uts_com-4.0.2.250519/requirements.txt +4 -0
  13. ka_uts_com-3.0.3.250509/PKG-INFO +0 -23
  14. ka_uts_com-3.0.3.250509/dist/ka_uts_com-3.0.3.250509-py3-none-any.whl +0 -0
  15. ka_uts_com-3.0.3.250509/ka_uts_com/app.py +0 -48
  16. ka_uts_com-3.0.3.250509/ka_uts_com/cfg.py +0 -35
  17. ka_uts_com-3.0.3.250509/ka_uts_com/decorators/dec.py +0 -13
  18. ka_uts_com-3.0.3.250509/ka_uts_com/exit.py +0 -37
  19. ka_uts_com-3.0.3.250509/ka_uts_com/timer.py +0 -69
  20. ka_uts_com-3.0.3.250509/ka_uts_com.egg-info/PKG-INFO +0 -23
  21. ka_uts_com-3.0.3.250509/ka_uts_com.egg-info/requires.txt +0 -3
  22. ka_uts_com-3.0.3.250509/requirements.txt +0 -3
  23. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/LICENSE.txt +0 -0
  24. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/MANIFEST.in +0 -0
  25. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/classifiers.txt +0 -0
  26. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/ka_uts_com/__init__.py +0 -0
  27. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/ka_uts_com/py.typed +0 -0
  28. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/ka_uts_com.egg-info/dependency_links.txt +0 -0
  29. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/ka_uts_com.egg-info/not-zip-safe +0 -0
  30. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/ka_uts_com.egg-info/top_level.txt +0 -0
  31. {ka_uts_com-3.0.3.250509 → ka_uts_com-4.0.2.250519}/setup.cfg +0 -0
@@ -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**