ka-uts-com 2.1.1.250415__tar.gz → 2.2.0.250427__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ka_uts_com-2.1.1.250415/ka_uts_com.egg-info → ka_uts_com-2.2.0.250427}/PKG-INFO +105 -86
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/README.rst +100 -79
- ka_uts_com-2.2.0.250427/dist/ka_uts_com-2.2.0.250427-py3-none-any.whl +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/__version__.py +2 -2
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/app.py +3 -5
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/cfg.py +1 -4
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/com.py +17 -15
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427/ka_uts_com.egg-info}/PKG-INFO +105 -86
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com.egg-info/SOURCES.txt +1 -1
- ka_uts_com-2.2.0.250427/ka_uts_com.egg-info/requires.txt +3 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/pyproject.toml +1 -1
- ka_uts_com-2.2.0.250427/requirements.txt +3 -0
- ka_uts_com-2.1.1.250415/dist/ka_uts_com-2.1.1.250415-py3-none-any.whl +0 -0
- ka_uts_com-2.1.1.250415/ka_uts_com.egg-info/requires.txt +0 -5
- ka_uts_com-2.1.1.250415/requirements.txt +0 -5
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/LICENSE.txt +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/MANIFEST.in +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/classifiers.txt +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/__init__.py +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/decorators/dec.py +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/exit.py +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/py.typed +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/timer.py +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com.egg-info/dependency_links.txt +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com.egg-info/not-zip-safe +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com.egg-info/top_level.txt +0 -0
- {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/setup.cfg +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ka_uts_com
|
3
|
-
Version: 2.
|
4
|
-
Summary: Communication
|
3
|
+
Version: 2.2.0.250427
|
4
|
+
Summary: Communication and CLIs Utilities
|
5
5
|
Author-email: Bernd Stroehle <bernd.stroehle@gmail.com>
|
6
6
|
Maintainer-email: Bernd Stroehle <bernd.stroehle@gmail.com>
|
7
7
|
License-Expression: GPL-3.0-only WITH Classpath-exception-2.0 OR BSD-3-Clause
|
@@ -17,11 +17,9 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
17
|
Requires-Python: >=3.10
|
18
18
|
Description-Content-Type: text/x-rst
|
19
19
|
License-File: LICENSE.txt
|
20
|
-
Requires-Dist:
|
21
|
-
Requires-Dist:
|
22
|
-
Requires-Dist:
|
23
|
-
Requires-Dist: PyYAML>=6.0.2
|
24
|
-
Requires-Dist: simplejson>=3.20.1
|
20
|
+
Requires-Dist: ka_uts_equ>=2.2.0.250427
|
21
|
+
Requires-Dist: ka_uts_log>=2.1.1.250415
|
22
|
+
Requires-Dist: ka_uts_uts>=2.1.1.250415
|
25
23
|
Dynamic: license-file
|
26
24
|
|
27
25
|
##########
|
@@ -652,25 +650,33 @@ Application parameter for logging
|
|
652
650
|
.. Application-parameter-used-in-log-naming-label:
|
653
651
|
.. table:: *Application parameter used in log naming*
|
654
652
|
|
655
|
-
|
656
|
-
|Name |Decription
|
657
|
-
|
658
|
-
|
|
659
|
-
|
660
|
-
|
|
661
|
-
|
662
|
-
|
|
663
|
-
|
664
|
-
|
|
665
|
-
|
666
|
-
|
|
667
|
-
|
668
|
-
|
|
669
|
-
|
670
|
-
|
671
|
-
|
|
672
|
-
| |
|
673
|
-
|
653
|
+
+-----------------+--------------------------+-----------------+------------+
|
654
|
+
|Name |Decription |Values |Example |
|
655
|
+
| | +-----------------+ |
|
656
|
+
| | |Value|Type | |
|
657
|
+
+=================+==========================+=====+===========+============+
|
658
|
+
|dir_dat |Application data directory| |Path |/otev/data |
|
659
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
660
|
+
|tenant |Application tenant name | |str |UMH |
|
661
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
662
|
+
|package |Application package name | |str |otev_xls_srr|
|
663
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
664
|
+
|cmd |Application command | |str |evupreg |
|
665
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
666
|
+
|pid |Process ID | |str |evupreg |
|
667
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
668
|
+
|log_ts_type |Timestamp type used in |ts |Timestamp |ts |
|
669
|
+
| |loggin files +-----+-----------+------------+
|
670
|
+
| | |dt |Datetime | |
|
671
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
672
|
+
|log_sw_single_dir|Enable single log |True |Bool |True |
|
673
|
+
| |directory or multiple +-----+-----------+ |
|
674
|
+
| |log directories |False|Bool | |
|
675
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
676
|
+
|log_sw_pid |Enable display of pid |True |Bool |True |
|
677
|
+
| |in log file name +-----+-----------+ |
|
678
|
+
| | |False|Bool | |
|
679
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
674
680
|
|
675
681
|
Log type and Log directories
|
676
682
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -719,25 +725,35 @@ Conventions
|
|
719
725
|
|critical|/<dir_dat>/<tenant>/RUN/<package>/<cmd>/<Log directory>|<Log type>_<ts>_<pid>.log|
|
720
726
|
+--------+-------------------------------------------------------+-------------------------+
|
721
727
|
|
722
|
-
Examples
|
723
|
-
""""""""
|
728
|
+
Examples (with log_ts_type = 'ts')
|
729
|
+
""""""""""""""""""""""""""""""""""
|
730
|
+
|
731
|
+
The examples use the following parameter values.
|
732
|
+
|
733
|
+
#. dir_dat = '/data/otev'
|
734
|
+
#. tenant = 'UMH'
|
735
|
+
#. package = 'otev_srr'
|
736
|
+
#. cmd = 'evupreg'
|
737
|
+
#. log_sw_single_dir = True
|
738
|
+
#. log_sw_pid = True
|
739
|
+
#. log_ts_type = 'ts'
|
724
740
|
|
725
741
|
.. Naming-examples-for-logging-file-paths-label:
|
726
742
|
.. table:: *Naming examples for logging file paths*
|
727
743
|
|
728
|
-
|
729
|
-
|Type |Directory
|
730
|
-
|
731
|
-
|debug |/data/otev/umh/RUN/
|
732
|
-
|
733
|
-
|info |/data/otev/umh/RUN/
|
734
|
-
|
735
|
-
|warning |/data/otev/umh/RUN/
|
736
|
-
|
737
|
-
|error |/data/otev/umh/RUN/
|
738
|
-
|
739
|
-
|critical|/data/otev/umh/RUN/
|
740
|
-
|
744
|
+
+--------+----------------------------------------+------------------------+
|
745
|
+
|Type |Directory |File |
|
746
|
+
+========+========================================+========================+
|
747
|
+
|debug |/data/otev/umh/RUN/otev_srr/evupreg/logs|debs_1737118199_9470.log|
|
748
|
+
+--------+----------------------------------------+------------------------+
|
749
|
+
|info |/data/otev/umh/RUN/otev_srr/evupreg/logs|infs_1737118199_9470.log|
|
750
|
+
+--------+----------------------------------------+------------------------+
|
751
|
+
|warning |/data/otev/umh/RUN/otev_srr/evupreg/logs|wrns_1737118199_9470.log|
|
752
|
+
+--------+----------------------------------------+------------------------+
|
753
|
+
|error |/data/otev/umh/RUN/otev_srr/evupreg/logs|errs_1737118199_9470.log|
|
754
|
+
+--------+----------------------------------------+------------------------+
|
755
|
+
|critical|/data/otev/umh/RUN/otev_srr/evupreg/logs|crts_1737118199_9470.log|
|
756
|
+
+--------+----------------------------------------+------------------------+
|
741
757
|
|
742
758
|
Python Terminology
|
743
759
|
==================
|
@@ -751,15 +767,15 @@ Overview
|
|
751
767
|
.. Python package-label:
|
752
768
|
.. table:: *Python package*
|
753
769
|
|
754
|
-
|
755
|
-
|Name
|
756
|
-
|
757
|
-
|Python
|
758
|
-
|
|
759
|
-
|
760
|
-
|Python
|
761
|
-
|sub-package
|
762
|
-
|
770
|
+
+-----------+-----------------------------------------------------------------+
|
771
|
+
|Name |Definition |
|
772
|
+
+===========+==========+======================================================+
|
773
|
+
|Python |Python packages are directories that contains the special module |
|
774
|
+
|package |``__init__.py`` and other modules, packages files or directories.|
|
775
|
+
+-----------+-----------------------------------------------------------------+
|
776
|
+
|Python |Python sub-packages are python packages which are contained in |
|
777
|
+
|sub-package|another pyhon package. |
|
778
|
+
+-----------+-----------------------------------------------------------------+
|
763
779
|
|
764
780
|
Python package sub-directories
|
765
781
|
------------------------------
|
@@ -770,16 +786,15 @@ Overview
|
|
770
786
|
.. Python package sub-direcories-label:
|
771
787
|
.. table:: *Python package sub-directories*
|
772
788
|
|
773
|
-
|
774
|
-
|Name
|
775
|
-
|
776
|
-
|Python
|
777
|
-
|sub-directory
|
778
|
-
|
779
|
-
|Special
|
780
|
-
|package
|
781
|
-
|
782
|
-
+--------------+-----------------------------------------+
|
789
|
+
+---------------------+----------------------------------------+
|
790
|
+
|Name |Definition |
|
791
|
+
+=====================+========================================+
|
792
|
+
|Python |directory contained in a python package.|
|
793
|
+
|package sub-directory| |
|
794
|
+
+---------------------+----------------------------------------+
|
795
|
+
|Special python |Python package sub-directories with a |
|
796
|
+
|package sub-directory|special meaning like data or cfg. |
|
797
|
+
+---------------------+----------------------------------------+
|
783
798
|
|
784
799
|
Special python package sub-directories
|
785
800
|
--------------------------------------
|
@@ -807,21 +822,21 @@ Overview
|
|
807
822
|
.. Python-package-files-label:
|
808
823
|
.. table:: *Python package files*
|
809
824
|
|
810
|
-
|
811
|
-
|Name |Definition
|
812
|
-
|
813
|
-
|Python |
|
814
|
-
|package
|
815
|
-
|
816
|
-
|Special python|
|
817
|
-
|package
|
818
|
-
|
819
|
-
|Python
|
820
|
-
|module
|
821
|
-
|
822
|
-
|Special python|
|
823
|
-
|package module|
|
824
|
-
|
825
|
+
+--------------+---------------------------------------------------------+
|
826
|
+
|Name |Definition |
|
827
|
+
+==============+==========+==============================================+
|
828
|
+
|Python |File within a python package. |
|
829
|
+
|package file | |
|
830
|
+
+--------------+---------------------------------------------------------+
|
831
|
+
|Special python|Python package file which are not modules and used as |
|
832
|
+
|package file |python marker files like ``__init__.py``. |
|
833
|
+
+--------------+---------------------------------------------------------+
|
834
|
+
|Python |File with suffix ``.py`` which could be empty or contain |
|
835
|
+
|package module|python code; Other modules can be imported into a module.|
|
836
|
+
+--------------+---------------------------------------------------------+
|
837
|
+
|Special python|Python package module with special name and functionality|
|
838
|
+
|package module|like ``main.py`` or ``__init__.py``. |
|
839
|
+
+--------------+---------------------------------------------------------+
|
825
840
|
|
826
841
|
Special python package files
|
827
842
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -875,17 +890,21 @@ Overview
|
|
875
890
|
.. Python elements-label:
|
876
891
|
.. table:: *Python elements*
|
877
892
|
|
878
|
-
|
879
|
-
|
|
880
|
-
|
881
|
-
|
|
882
|
-
|
883
|
-
|
884
|
-
|
|
885
|
-
|
886
|
-
|Python class
|
887
|
-
|
888
|
-
|
893
|
+
+-------------------+---------------------------------------------+
|
894
|
+
|Name |Definition |
|
895
|
+
+===================+=============================================+
|
896
|
+
|Python method |Function defined in a python module. |
|
897
|
+
+-------------------+---------------------------------------------+
|
898
|
+
|Special |Python method with special name and |
|
899
|
+
|python method |functionality like ``init``. |
|
900
|
+
+-------------------+---------------------------------------------+
|
901
|
+
|Python class |Python classes are defined in python modules.|
|
902
|
+
+-------------------+---------------------------------------------+
|
903
|
+
|Python class method|Python method defined in a python class. |
|
904
|
+
+-------------------+---------------------------------------------+
|
905
|
+
|Special |Python class method with special name and |
|
906
|
+
|Python class method|functionality like ``init``. |
|
907
|
+
+-------------------+---------------------------------------------+
|
889
908
|
|
890
909
|
Special python methods
|
891
910
|
^^^^^^^^^^^^^^^^^^^^^^
|
@@ -626,25 +626,33 @@ Application parameter for logging
|
|
626
626
|
.. Application-parameter-used-in-log-naming-label:
|
627
627
|
.. table:: *Application parameter used in log naming*
|
628
628
|
|
629
|
-
|
630
|
-
|Name |Decription
|
631
|
-
|
632
|
-
|
|
633
|
-
|
634
|
-
|
|
635
|
-
|
636
|
-
|
|
637
|
-
|
638
|
-
|
|
639
|
-
|
640
|
-
|
|
641
|
-
|
642
|
-
|
|
643
|
-
|
644
|
-
|
645
|
-
|
|
646
|
-
| |
|
647
|
-
|
629
|
+
+-----------------+--------------------------+-----------------+------------+
|
630
|
+
|Name |Decription |Values |Example |
|
631
|
+
| | +-----------------+ |
|
632
|
+
| | |Value|Type | |
|
633
|
+
+=================+==========================+=====+===========+============+
|
634
|
+
|dir_dat |Application data directory| |Path |/otev/data |
|
635
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
636
|
+
|tenant |Application tenant name | |str |UMH |
|
637
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
638
|
+
|package |Application package name | |str |otev_xls_srr|
|
639
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
640
|
+
|cmd |Application command | |str |evupreg |
|
641
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
642
|
+
|pid |Process ID | |str |evupreg |
|
643
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
644
|
+
|log_ts_type |Timestamp type used in |ts |Timestamp |ts |
|
645
|
+
| |loggin files +-----+-----------+------------+
|
646
|
+
| | |dt |Datetime | |
|
647
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
648
|
+
|log_sw_single_dir|Enable single log |True |Bool |True |
|
649
|
+
| |directory or multiple +-----+-----------+ |
|
650
|
+
| |log directories |False|Bool | |
|
651
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
652
|
+
|log_sw_pid |Enable display of pid |True |Bool |True |
|
653
|
+
| |in log file name +-----+-----------+ |
|
654
|
+
| | |False|Bool | |
|
655
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
648
656
|
|
649
657
|
Log type and Log directories
|
650
658
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -693,25 +701,35 @@ Conventions
|
|
693
701
|
|critical|/<dir_dat>/<tenant>/RUN/<package>/<cmd>/<Log directory>|<Log type>_<ts>_<pid>.log|
|
694
702
|
+--------+-------------------------------------------------------+-------------------------+
|
695
703
|
|
696
|
-
Examples
|
697
|
-
""""""""
|
704
|
+
Examples (with log_ts_type = 'ts')
|
705
|
+
""""""""""""""""""""""""""""""""""
|
706
|
+
|
707
|
+
The examples use the following parameter values.
|
708
|
+
|
709
|
+
#. dir_dat = '/data/otev'
|
710
|
+
#. tenant = 'UMH'
|
711
|
+
#. package = 'otev_srr'
|
712
|
+
#. cmd = 'evupreg'
|
713
|
+
#. log_sw_single_dir = True
|
714
|
+
#. log_sw_pid = True
|
715
|
+
#. log_ts_type = 'ts'
|
698
716
|
|
699
717
|
.. Naming-examples-for-logging-file-paths-label:
|
700
718
|
.. table:: *Naming examples for logging file paths*
|
701
719
|
|
702
|
-
|
703
|
-
|Type |Directory
|
704
|
-
|
705
|
-
|debug |/data/otev/umh/RUN/
|
706
|
-
|
707
|
-
|info |/data/otev/umh/RUN/
|
708
|
-
|
709
|
-
|warning |/data/otev/umh/RUN/
|
710
|
-
|
711
|
-
|error |/data/otev/umh/RUN/
|
712
|
-
|
713
|
-
|critical|/data/otev/umh/RUN/
|
714
|
-
|
720
|
+
+--------+----------------------------------------+------------------------+
|
721
|
+
|Type |Directory |File |
|
722
|
+
+========+========================================+========================+
|
723
|
+
|debug |/data/otev/umh/RUN/otev_srr/evupreg/logs|debs_1737118199_9470.log|
|
724
|
+
+--------+----------------------------------------+------------------------+
|
725
|
+
|info |/data/otev/umh/RUN/otev_srr/evupreg/logs|infs_1737118199_9470.log|
|
726
|
+
+--------+----------------------------------------+------------------------+
|
727
|
+
|warning |/data/otev/umh/RUN/otev_srr/evupreg/logs|wrns_1737118199_9470.log|
|
728
|
+
+--------+----------------------------------------+------------------------+
|
729
|
+
|error |/data/otev/umh/RUN/otev_srr/evupreg/logs|errs_1737118199_9470.log|
|
730
|
+
+--------+----------------------------------------+------------------------+
|
731
|
+
|critical|/data/otev/umh/RUN/otev_srr/evupreg/logs|crts_1737118199_9470.log|
|
732
|
+
+--------+----------------------------------------+------------------------+
|
715
733
|
|
716
734
|
Python Terminology
|
717
735
|
==================
|
@@ -725,15 +743,15 @@ Overview
|
|
725
743
|
.. Python package-label:
|
726
744
|
.. table:: *Python package*
|
727
745
|
|
728
|
-
|
729
|
-
|Name
|
730
|
-
|
731
|
-
|Python
|
732
|
-
|
|
733
|
-
|
734
|
-
|Python
|
735
|
-
|sub-package
|
736
|
-
|
746
|
+
+-----------+-----------------------------------------------------------------+
|
747
|
+
|Name |Definition |
|
748
|
+
+===========+==========+======================================================+
|
749
|
+
|Python |Python packages are directories that contains the special module |
|
750
|
+
|package |``__init__.py`` and other modules, packages files or directories.|
|
751
|
+
+-----------+-----------------------------------------------------------------+
|
752
|
+
|Python |Python sub-packages are python packages which are contained in |
|
753
|
+
|sub-package|another pyhon package. |
|
754
|
+
+-----------+-----------------------------------------------------------------+
|
737
755
|
|
738
756
|
Python package sub-directories
|
739
757
|
------------------------------
|
@@ -744,16 +762,15 @@ Overview
|
|
744
762
|
.. Python package sub-direcories-label:
|
745
763
|
.. table:: *Python package sub-directories*
|
746
764
|
|
747
|
-
|
748
|
-
|Name
|
749
|
-
|
750
|
-
|Python
|
751
|
-
|sub-directory
|
752
|
-
|
753
|
-
|Special
|
754
|
-
|package
|
755
|
-
|
756
|
-
+--------------+-----------------------------------------+
|
765
|
+
+---------------------+----------------------------------------+
|
766
|
+
|Name |Definition |
|
767
|
+
+=====================+========================================+
|
768
|
+
|Python |directory contained in a python package.|
|
769
|
+
|package sub-directory| |
|
770
|
+
+---------------------+----------------------------------------+
|
771
|
+
|Special python |Python package sub-directories with a |
|
772
|
+
|package sub-directory|special meaning like data or cfg. |
|
773
|
+
+---------------------+----------------------------------------+
|
757
774
|
|
758
775
|
Special python package sub-directories
|
759
776
|
--------------------------------------
|
@@ -781,21 +798,21 @@ Overview
|
|
781
798
|
.. Python-package-files-label:
|
782
799
|
.. table:: *Python package files*
|
783
800
|
|
784
|
-
|
785
|
-
|Name |Definition
|
786
|
-
|
787
|
-
|Python |
|
788
|
-
|package
|
789
|
-
|
790
|
-
|Special python|
|
791
|
-
|package
|
792
|
-
|
793
|
-
|Python
|
794
|
-
|module
|
795
|
-
|
796
|
-
|Special python|
|
797
|
-
|package module|
|
798
|
-
|
801
|
+
+--------------+---------------------------------------------------------+
|
802
|
+
|Name |Definition |
|
803
|
+
+==============+==========+==============================================+
|
804
|
+
|Python |File within a python package. |
|
805
|
+
|package file | |
|
806
|
+
+--------------+---------------------------------------------------------+
|
807
|
+
|Special python|Python package file which are not modules and used as |
|
808
|
+
|package file |python marker files like ``__init__.py``. |
|
809
|
+
+--------------+---------------------------------------------------------+
|
810
|
+
|Python |File with suffix ``.py`` which could be empty or contain |
|
811
|
+
|package module|python code; Other modules can be imported into a module.|
|
812
|
+
+--------------+---------------------------------------------------------+
|
813
|
+
|Special python|Python package module with special name and functionality|
|
814
|
+
|package module|like ``main.py`` or ``__init__.py``. |
|
815
|
+
+--------------+---------------------------------------------------------+
|
799
816
|
|
800
817
|
Special python package files
|
801
818
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -849,17 +866,21 @@ Overview
|
|
849
866
|
.. Python elements-label:
|
850
867
|
.. table:: *Python elements*
|
851
868
|
|
852
|
-
|
853
|
-
|
|
854
|
-
|
855
|
-
|
|
856
|
-
|
857
|
-
|
858
|
-
|
|
859
|
-
|
860
|
-
|Python class
|
861
|
-
|
862
|
-
|
869
|
+
+-------------------+---------------------------------------------+
|
870
|
+
|Name |Definition |
|
871
|
+
+===================+=============================================+
|
872
|
+
|Python method |Function defined in a python module. |
|
873
|
+
+-------------------+---------------------------------------------+
|
874
|
+
|Special |Python method with special name and |
|
875
|
+
|python method |functionality like ``init``. |
|
876
|
+
+-------------------+---------------------------------------------+
|
877
|
+
|Python class |Python classes are defined in python modules.|
|
878
|
+
+-------------------+---------------------------------------------+
|
879
|
+
|Python class method|Python method defined in a python class. |
|
880
|
+
+-------------------+---------------------------------------------+
|
881
|
+
|Special |Python class method with special name and |
|
882
|
+
|Python class method|functionality like ``init``. |
|
883
|
+
+-------------------+---------------------------------------------+
|
863
884
|
|
864
885
|
Special python methods
|
865
886
|
^^^^^^^^^^^^^^^^^^^^^^
|
Binary file
|
@@ -1,10 +1,10 @@
|
|
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.
|
4
|
+
__version__ = '2.2.0.250427'
|
5
5
|
__build__ = 0x022200
|
6
6
|
__author__ = 'Bernd Stroehle'
|
7
7
|
__author_email__ = 'bernd.stroehle@gmail.com'
|
8
8
|
__license__ = 'Apache-2.0'
|
9
|
-
__copyright__ = 'Copyright
|
9
|
+
__copyright__ = 'Copyright 2025 Bernd Stroehle'
|
10
10
|
__cake__ = u'\u2728 \U0001f370 \u2728'
|
@@ -1,8 +1,7 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
from typing import Any
|
3
3
|
|
4
|
-
from
|
5
|
-
|
4
|
+
from ka_uts_log.log import Log
|
6
5
|
from ka_uts_uts.utils.pacmod import PacMod
|
7
6
|
from ka_uts_uts.ioc.yaml_ import Yaml_
|
8
7
|
|
@@ -10,7 +9,6 @@ TyAny = Any
|
|
10
9
|
TyArr = list[Any]
|
11
10
|
TyBool = bool
|
12
11
|
TyDic = dict[Any, Any]
|
13
|
-
TyLogger = Logger
|
14
12
|
|
15
13
|
TnAny = None | Any
|
16
14
|
TnArr = None | TyArr
|
@@ -37,9 +35,9 @@ class App:
|
|
37
35
|
cls.sw_replace_keys = kwargs.get('sw_replace_keys', False)
|
38
36
|
if cls.sw_replace_keys:
|
39
37
|
try:
|
40
|
-
cls.keys = Yaml_.
|
38
|
+
cls.keys = Yaml_.read_with_safeloader(PacMod.sh_path_keys(cls_com))
|
41
39
|
except Exception as exc:
|
42
|
-
|
40
|
+
Log.error(exc, exc_info=True)
|
43
41
|
raise
|
44
42
|
|
45
43
|
@classmethod
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
from typing import Any
|
3
3
|
|
4
|
-
from logging import Logger
|
5
|
-
|
6
4
|
from ka_uts_uts.ioc.yaml_ import Yaml_
|
7
5
|
|
8
6
|
TyAny = Any
|
@@ -10,7 +8,6 @@ TyTimeStamp = int
|
|
10
8
|
TyArr = list[Any]
|
11
9
|
TyBool = bool
|
12
10
|
TyDic = dict[Any, Any]
|
13
|
-
TyLogger = Logger
|
14
11
|
|
15
12
|
|
16
13
|
class Cfg:
|
@@ -26,7 +23,7 @@ class Cfg:
|
|
26
23
|
cls.sw_init = True
|
27
24
|
_path = cls_com.sh_path_cfg_yaml()
|
28
25
|
if _path:
|
29
|
-
cls.cfg = Yaml_.
|
26
|
+
cls.cfg = Yaml_.read_with_safeloader(_path)
|
30
27
|
|
31
28
|
@classmethod
|
32
29
|
def sh(cls, cls_com, **kwargs) -> Any:
|
@@ -6,8 +6,7 @@ import time
|
|
6
6
|
import calendar
|
7
7
|
from datetime import datetime
|
8
8
|
|
9
|
-
|
10
|
-
from ka_uts_arr.aoeqstmt import AoEqStmt
|
9
|
+
from ka_uts_equ.equ import AoEqu
|
11
10
|
from ka_uts_uts.utils.pac import Pac
|
12
11
|
from ka_uts_uts.utils.pacmod import PacMod
|
13
12
|
|
@@ -60,7 +59,8 @@ class Com:
|
|
60
59
|
Exit: Any = None
|
61
60
|
|
62
61
|
@classmethod
|
63
|
-
def init(cls,
|
62
|
+
def init(cls, kwargs: TyDic):
|
63
|
+
# def init(cls, cls_app, kwargs: TyDic):
|
64
64
|
"""
|
65
65
|
initialise static variables of Com class
|
66
66
|
"""
|
@@ -71,6 +71,7 @@ class Com:
|
|
71
71
|
cls.tenant = kwargs.get('tenant')
|
72
72
|
cls.log_type = kwargs.get('log_type', 'std')
|
73
73
|
cls.cmd = kwargs.get('cmd')
|
74
|
+
cls_app = kwargs.get('cls_app')
|
74
75
|
cls.d_com_pacmod = PacMod.sh_d_pacmod(cls)
|
75
76
|
cls.d_app_pacmod = PacMod.sh_d_pacmod(cls_app)
|
76
77
|
cls.ts = calendar.timegm(time.gmtime())
|
@@ -78,7 +79,7 @@ class Com:
|
|
78
79
|
|
79
80
|
cls.path_bin = cls.sh_path_bin()
|
80
81
|
|
81
|
-
cls.Log = Log.sh(
|
82
|
+
cls.Log = Log.sh(**kwargs)
|
82
83
|
cls.Cfg = Cfg.sh(cls, **kwargs)
|
83
84
|
cls.App = App.sh(cls, **kwargs)
|
84
85
|
cls.Exit = Exit.sh(**kwargs)
|
@@ -88,8 +89,9 @@ class Com:
|
|
88
89
|
"""
|
89
90
|
show keyword arguments
|
90
91
|
"""
|
91
|
-
_kwargs: TyDic =
|
92
|
-
|
92
|
+
_kwargs: TyDic = AoEqu.sh_d_eq(*args, d_parms=d_parms)
|
93
|
+
_kwargs['cls_app'] = cls_app
|
94
|
+
cls.init(_kwargs)
|
93
95
|
_kwargs['com'] = cls
|
94
96
|
return _kwargs
|
95
97
|
|
@@ -98,24 +100,24 @@ class Com:
|
|
98
100
|
"""
|
99
101
|
show path to bin directory in package
|
100
102
|
"""
|
101
|
-
|
102
|
-
|
103
|
-
return Pac.sh_path_by_package(
|
103
|
+
_package = cls.d_app_pacmod['package']
|
104
|
+
_path = 'bin'
|
105
|
+
return Pac.sh_path_by_package(_package, _path)
|
104
106
|
|
105
107
|
@classmethod
|
106
108
|
def sh_path_data(cls) -> Any:
|
107
109
|
"""
|
108
110
|
show path to data directory in package
|
109
111
|
"""
|
110
|
-
|
111
|
-
|
112
|
-
return Pac.sh_path_by_package(
|
112
|
+
_package = cls.d_app_pacmod['package']
|
113
|
+
_path = 'data'
|
114
|
+
return Pac.sh_path_by_package(_package, _path)
|
113
115
|
|
114
116
|
@classmethod
|
115
117
|
def sh_path_cfg_yaml(cls) -> Any:
|
116
118
|
"""
|
117
119
|
show path to configuration yaml-file in data directory of package
|
118
120
|
"""
|
119
|
-
|
120
|
-
|
121
|
-
return Pac.sh_path_by_package(
|
121
|
+
_package = cls.d_app_pacmod['package']
|
122
|
+
_path = os.path.join('data', 'cfg.yml')
|
123
|
+
return Pac.sh_path_by_package(_package, _path)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ka_uts_com
|
3
|
-
Version: 2.
|
4
|
-
Summary: Communication
|
3
|
+
Version: 2.2.0.250427
|
4
|
+
Summary: Communication and CLIs Utilities
|
5
5
|
Author-email: Bernd Stroehle <bernd.stroehle@gmail.com>
|
6
6
|
Maintainer-email: Bernd Stroehle <bernd.stroehle@gmail.com>
|
7
7
|
License-Expression: GPL-3.0-only WITH Classpath-exception-2.0 OR BSD-3-Clause
|
@@ -17,11 +17,9 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
17
|
Requires-Python: >=3.10
|
18
18
|
Description-Content-Type: text/x-rst
|
19
19
|
License-File: LICENSE.txt
|
20
|
-
Requires-Dist:
|
21
|
-
Requires-Dist:
|
22
|
-
Requires-Dist:
|
23
|
-
Requires-Dist: PyYAML>=6.0.2
|
24
|
-
Requires-Dist: simplejson>=3.20.1
|
20
|
+
Requires-Dist: ka_uts_equ>=2.2.0.250427
|
21
|
+
Requires-Dist: ka_uts_log>=2.1.1.250415
|
22
|
+
Requires-Dist: ka_uts_uts>=2.1.1.250415
|
25
23
|
Dynamic: license-file
|
26
24
|
|
27
25
|
##########
|
@@ -652,25 +650,33 @@ Application parameter for logging
|
|
652
650
|
.. Application-parameter-used-in-log-naming-label:
|
653
651
|
.. table:: *Application parameter used in log naming*
|
654
652
|
|
655
|
-
|
656
|
-
|Name |Decription
|
657
|
-
|
658
|
-
|
|
659
|
-
|
660
|
-
|
|
661
|
-
|
662
|
-
|
|
663
|
-
|
664
|
-
|
|
665
|
-
|
666
|
-
|
|
667
|
-
|
668
|
-
|
|
669
|
-
|
670
|
-
|
671
|
-
|
|
672
|
-
| |
|
673
|
-
|
653
|
+
+-----------------+--------------------------+-----------------+------------+
|
654
|
+
|Name |Decription |Values |Example |
|
655
|
+
| | +-----------------+ |
|
656
|
+
| | |Value|Type | |
|
657
|
+
+=================+==========================+=====+===========+============+
|
658
|
+
|dir_dat |Application data directory| |Path |/otev/data |
|
659
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
660
|
+
|tenant |Application tenant name | |str |UMH |
|
661
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
662
|
+
|package |Application package name | |str |otev_xls_srr|
|
663
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
664
|
+
|cmd |Application command | |str |evupreg |
|
665
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
666
|
+
|pid |Process ID | |str |evupreg |
|
667
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
668
|
+
|log_ts_type |Timestamp type used in |ts |Timestamp |ts |
|
669
|
+
| |loggin files +-----+-----------+------------+
|
670
|
+
| | |dt |Datetime | |
|
671
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
672
|
+
|log_sw_single_dir|Enable single log |True |Bool |True |
|
673
|
+
| |directory or multiple +-----+-----------+ |
|
674
|
+
| |log directories |False|Bool | |
|
675
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
676
|
+
|log_sw_pid |Enable display of pid |True |Bool |True |
|
677
|
+
| |in log file name +-----+-----------+ |
|
678
|
+
| | |False|Bool | |
|
679
|
+
+-----------------+--------------------------+-----+-----------+------------+
|
674
680
|
|
675
681
|
Log type and Log directories
|
676
682
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -719,25 +725,35 @@ Conventions
|
|
719
725
|
|critical|/<dir_dat>/<tenant>/RUN/<package>/<cmd>/<Log directory>|<Log type>_<ts>_<pid>.log|
|
720
726
|
+--------+-------------------------------------------------------+-------------------------+
|
721
727
|
|
722
|
-
Examples
|
723
|
-
""""""""
|
728
|
+
Examples (with log_ts_type = 'ts')
|
729
|
+
""""""""""""""""""""""""""""""""""
|
730
|
+
|
731
|
+
The examples use the following parameter values.
|
732
|
+
|
733
|
+
#. dir_dat = '/data/otev'
|
734
|
+
#. tenant = 'UMH'
|
735
|
+
#. package = 'otev_srr'
|
736
|
+
#. cmd = 'evupreg'
|
737
|
+
#. log_sw_single_dir = True
|
738
|
+
#. log_sw_pid = True
|
739
|
+
#. log_ts_type = 'ts'
|
724
740
|
|
725
741
|
.. Naming-examples-for-logging-file-paths-label:
|
726
742
|
.. table:: *Naming examples for logging file paths*
|
727
743
|
|
728
|
-
|
729
|
-
|Type |Directory
|
730
|
-
|
731
|
-
|debug |/data/otev/umh/RUN/
|
732
|
-
|
733
|
-
|info |/data/otev/umh/RUN/
|
734
|
-
|
735
|
-
|warning |/data/otev/umh/RUN/
|
736
|
-
|
737
|
-
|error |/data/otev/umh/RUN/
|
738
|
-
|
739
|
-
|critical|/data/otev/umh/RUN/
|
740
|
-
|
744
|
+
+--------+----------------------------------------+------------------------+
|
745
|
+
|Type |Directory |File |
|
746
|
+
+========+========================================+========================+
|
747
|
+
|debug |/data/otev/umh/RUN/otev_srr/evupreg/logs|debs_1737118199_9470.log|
|
748
|
+
+--------+----------------------------------------+------------------------+
|
749
|
+
|info |/data/otev/umh/RUN/otev_srr/evupreg/logs|infs_1737118199_9470.log|
|
750
|
+
+--------+----------------------------------------+------------------------+
|
751
|
+
|warning |/data/otev/umh/RUN/otev_srr/evupreg/logs|wrns_1737118199_9470.log|
|
752
|
+
+--------+----------------------------------------+------------------------+
|
753
|
+
|error |/data/otev/umh/RUN/otev_srr/evupreg/logs|errs_1737118199_9470.log|
|
754
|
+
+--------+----------------------------------------+------------------------+
|
755
|
+
|critical|/data/otev/umh/RUN/otev_srr/evupreg/logs|crts_1737118199_9470.log|
|
756
|
+
+--------+----------------------------------------+------------------------+
|
741
757
|
|
742
758
|
Python Terminology
|
743
759
|
==================
|
@@ -751,15 +767,15 @@ Overview
|
|
751
767
|
.. Python package-label:
|
752
768
|
.. table:: *Python package*
|
753
769
|
|
754
|
-
|
755
|
-
|Name
|
756
|
-
|
757
|
-
|Python
|
758
|
-
|
|
759
|
-
|
760
|
-
|Python
|
761
|
-
|sub-package
|
762
|
-
|
770
|
+
+-----------+-----------------------------------------------------------------+
|
771
|
+
|Name |Definition |
|
772
|
+
+===========+==========+======================================================+
|
773
|
+
|Python |Python packages are directories that contains the special module |
|
774
|
+
|package |``__init__.py`` and other modules, packages files or directories.|
|
775
|
+
+-----------+-----------------------------------------------------------------+
|
776
|
+
|Python |Python sub-packages are python packages which are contained in |
|
777
|
+
|sub-package|another pyhon package. |
|
778
|
+
+-----------+-----------------------------------------------------------------+
|
763
779
|
|
764
780
|
Python package sub-directories
|
765
781
|
------------------------------
|
@@ -770,16 +786,15 @@ Overview
|
|
770
786
|
.. Python package sub-direcories-label:
|
771
787
|
.. table:: *Python package sub-directories*
|
772
788
|
|
773
|
-
|
774
|
-
|Name
|
775
|
-
|
776
|
-
|Python
|
777
|
-
|sub-directory
|
778
|
-
|
779
|
-
|Special
|
780
|
-
|package
|
781
|
-
|
782
|
-
+--------------+-----------------------------------------+
|
789
|
+
+---------------------+----------------------------------------+
|
790
|
+
|Name |Definition |
|
791
|
+
+=====================+========================================+
|
792
|
+
|Python |directory contained in a python package.|
|
793
|
+
|package sub-directory| |
|
794
|
+
+---------------------+----------------------------------------+
|
795
|
+
|Special python |Python package sub-directories with a |
|
796
|
+
|package sub-directory|special meaning like data or cfg. |
|
797
|
+
+---------------------+----------------------------------------+
|
783
798
|
|
784
799
|
Special python package sub-directories
|
785
800
|
--------------------------------------
|
@@ -807,21 +822,21 @@ Overview
|
|
807
822
|
.. Python-package-files-label:
|
808
823
|
.. table:: *Python package files*
|
809
824
|
|
810
|
-
|
811
|
-
|Name |Definition
|
812
|
-
|
813
|
-
|Python |
|
814
|
-
|package
|
815
|
-
|
816
|
-
|Special python|
|
817
|
-
|package
|
818
|
-
|
819
|
-
|Python
|
820
|
-
|module
|
821
|
-
|
822
|
-
|Special python|
|
823
|
-
|package module|
|
824
|
-
|
825
|
+
+--------------+---------------------------------------------------------+
|
826
|
+
|Name |Definition |
|
827
|
+
+==============+==========+==============================================+
|
828
|
+
|Python |File within a python package. |
|
829
|
+
|package file | |
|
830
|
+
+--------------+---------------------------------------------------------+
|
831
|
+
|Special python|Python package file which are not modules and used as |
|
832
|
+
|package file |python marker files like ``__init__.py``. |
|
833
|
+
+--------------+---------------------------------------------------------+
|
834
|
+
|Python |File with suffix ``.py`` which could be empty or contain |
|
835
|
+
|package module|python code; Other modules can be imported into a module.|
|
836
|
+
+--------------+---------------------------------------------------------+
|
837
|
+
|Special python|Python package module with special name and functionality|
|
838
|
+
|package module|like ``main.py`` or ``__init__.py``. |
|
839
|
+
+--------------+---------------------------------------------------------+
|
825
840
|
|
826
841
|
Special python package files
|
827
842
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@@ -875,17 +890,21 @@ Overview
|
|
875
890
|
.. Python elements-label:
|
876
891
|
.. table:: *Python elements*
|
877
892
|
|
878
|
-
|
879
|
-
|
|
880
|
-
|
881
|
-
|
|
882
|
-
|
883
|
-
|
884
|
-
|
|
885
|
-
|
886
|
-
|Python class
|
887
|
-
|
888
|
-
|
893
|
+
+-------------------+---------------------------------------------+
|
894
|
+
|Name |Definition |
|
895
|
+
+===================+=============================================+
|
896
|
+
|Python method |Function defined in a python module. |
|
897
|
+
+-------------------+---------------------------------------------+
|
898
|
+
|Special |Python method with special name and |
|
899
|
+
|python method |functionality like ``init``. |
|
900
|
+
+-------------------+---------------------------------------------+
|
901
|
+
|Python class |Python classes are defined in python modules.|
|
902
|
+
+-------------------+---------------------------------------------+
|
903
|
+
|Python class method|Python method defined in a python class. |
|
904
|
+
+-------------------+---------------------------------------------+
|
905
|
+
|Special |Python class method with special name and |
|
906
|
+
|Python class method|functionality like ``init``. |
|
907
|
+
+-------------------+---------------------------------------------+
|
889
908
|
|
890
909
|
Special python methods
|
891
910
|
^^^^^^^^^^^^^^^^^^^^^^
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
5
5
|
|
6
6
|
[project]
|
7
7
|
name = "ka_uts_com"
|
8
|
-
description = "Communication
|
8
|
+
description = "Communication and CLIs Utilities"
|
9
9
|
license = "GPL-3.0-only WITH Classpath-Exception-2.0 OR BSD-3-Clause"
|
10
10
|
license-files = ["LICENSE.txt"]
|
11
11
|
requires-python = ">=3.10"
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|