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