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.
Files changed (27) hide show
  1. {ka_uts_com-2.1.1.250415/ka_uts_com.egg-info → ka_uts_com-2.2.0.250427}/PKG-INFO +105 -86
  2. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/README.rst +100 -79
  3. ka_uts_com-2.2.0.250427/dist/ka_uts_com-2.2.0.250427-py3-none-any.whl +0 -0
  4. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/__version__.py +2 -2
  5. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/app.py +3 -5
  6. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/cfg.py +1 -4
  7. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/com.py +17 -15
  8. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427/ka_uts_com.egg-info}/PKG-INFO +105 -86
  9. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com.egg-info/SOURCES.txt +1 -1
  10. ka_uts_com-2.2.0.250427/ka_uts_com.egg-info/requires.txt +3 -0
  11. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/pyproject.toml +1 -1
  12. ka_uts_com-2.2.0.250427/requirements.txt +3 -0
  13. ka_uts_com-2.1.1.250415/dist/ka_uts_com-2.1.1.250415-py3-none-any.whl +0 -0
  14. ka_uts_com-2.1.1.250415/ka_uts_com.egg-info/requires.txt +0 -5
  15. ka_uts_com-2.1.1.250415/requirements.txt +0 -5
  16. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/LICENSE.txt +0 -0
  17. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/MANIFEST.in +0 -0
  18. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/classifiers.txt +0 -0
  19. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/__init__.py +0 -0
  20. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/decorators/dec.py +0 -0
  21. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/exit.py +0 -0
  22. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/py.typed +0 -0
  23. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com/timer.py +0 -0
  24. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com.egg-info/dependency_links.txt +0 -0
  25. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com.egg-info/not-zip-safe +0 -0
  26. {ka_uts_com-2.1.1.250415 → ka_uts_com-2.2.0.250427}/ka_uts_com.egg-info/top_level.txt +0 -0
  27. {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.1.1.250415
4
- Summary: Communication Class Utilities
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: Jinja2>=3.1.6
21
- Requires-Dist: orjson>=3.10.16
22
- Requires-Dist: psutil>=7.0.0
23
- Requires-Dist: PyYAML>=6.0.2
24
- Requires-Dist: simplejson>=3.20.1
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 |Values |Example |
657
- +=================+===========================+==========+============+
658
- |dir_dat |Application data directory | |/otev/data |
659
- +-----------------+---------------------------+----------+------------+
660
- |tenant |Application tenant name | |UMH |
661
- +-----------------+---------------------------+----------+------------+
662
- |package |Application package name | |otev_xls_srr|
663
- +-----------------+---------------------------+----------+------------+
664
- |cmd |Application command | |evupreg |
665
- +-----------------+---------------------------+----------+------------+
666
- |pid |Process ID |evupreg |
667
- +-----------------+---------------------------+----------+------------+
668
- |log_ts_type |Timestamp type used in |ts, |ts |
669
- | |logging files|ts, dt |dt | |
670
- +-----------------+---------------------------+----------+------------+
671
- |log_sw_single_dir|Enable single log directory|True, |True |
672
- | |or multiple log directories|False | |
673
- +-----------------+---------------------------+----------+------------+
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 |File |
730
- +========+============================================+========================+
731
- |debug |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|debs_1737118199_9470.log|
732
- +--------+--------------------------------------------+------------------------+
733
- |info |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|infs_1737118199_9470.log|
734
- +--------+--------------------------------------------+------------------------+
735
- |warning |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|wrns_1737118199_9470.log|
736
- +--------+--------------------------------------------+------------------------+
737
- |error |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|errs_1737118199_9470.log|
738
- +--------+--------------------------------------------+------------------------+
739
- |critical|/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|crts_1737118199_9470.log|
740
- +--------+--------------------------------------------+------------------------+
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 |Definition |
756
- +==============+==========+======================================================+
757
- |Python package|Python packages are directories that contains the special module |
758
- | |``__init__.py`` and other modules, packages files or directories.|
759
- +--------------+-----------------------------------------------------------------+
760
- |Python |Python sub-packages are python packages which are contained in |
761
- |sub-package |another pyhon package. |
762
- +--------------+-----------------------------------------------------------------+
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 |Definition |
775
- +==============+==========+==============================+
776
- |Python package|Python packages sub-directories are |
777
- |sub-directory |directories contained in python packages.|
778
- +--------------+-----------------------------------------+
779
- |Special Python|Special Python package sub-directories |
780
- |package |are python package sub-directories with |
781
- |sub-directory |with a special meaning |
782
- +--------------+-----------------------------------------+
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 |Python packages are files within a python package. |
814
- |package files | |
815
- +--------------+--------------------------------------------------------------------+
816
- |Special python|Special python package files are package files which are not modules|
817
- |package files |and used as python marker files like ``__init__.py`` |
818
- +--------------+--------------------------------------------------------------------+
819
- |Python package|Python modules are files with suffix ``.py``; they could be empty or|
820
- |module |contain python code; other modules can be imported into a module. |
821
- +--------------+--------------------------------------------------------------------+
822
- |Special python|Special python modules like ``__init__.py`` or ``main.py`` are |
823
- |package module|python modules with special names and functionality. |
824
- +--------------+--------------------------------------------------------------------+
825
+ +--------------+---------------------------------------------------------+
826
+ |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
- |Python method|Python methods are python functions defined in python modules.|
880
- +-------------+--------------------------------------------------------------+
881
- |Special |Special python methods are python functions with special names|
882
- |python method|and functionalities. |
883
- +-------------+--------------------------------------------------------------+
884
- |Python class |Python classes are defined in python modules. |
885
- +-------------+--------------------------------------------------------------+
886
- |Python class |Python class methods are python methods defined python |
887
- |method |classes. |
888
- +-------------+--------------------------------------------------------------+
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 |Values |Example |
631
- +=================+===========================+==========+============+
632
- |dir_dat |Application data directory | |/otev/data |
633
- +-----------------+---------------------------+----------+------------+
634
- |tenant |Application tenant name | |UMH |
635
- +-----------------+---------------------------+----------+------------+
636
- |package |Application package name | |otev_xls_srr|
637
- +-----------------+---------------------------+----------+------------+
638
- |cmd |Application command | |evupreg |
639
- +-----------------+---------------------------+----------+------------+
640
- |pid |Process ID |evupreg |
641
- +-----------------+---------------------------+----------+------------+
642
- |log_ts_type |Timestamp type used in |ts, |ts |
643
- | |logging files|ts, dt |dt | |
644
- +-----------------+---------------------------+----------+------------+
645
- |log_sw_single_dir|Enable single log directory|True, |True |
646
- | |or multiple log directories|False | |
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 |File |
704
- +========+============================================+========================+
705
- |debug |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|debs_1737118199_9470.log|
706
- +--------+--------------------------------------------+------------------------+
707
- |info |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|infs_1737118199_9470.log|
708
- +--------+--------------------------------------------+------------------------+
709
- |warning |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|wrns_1737118199_9470.log|
710
- +--------+--------------------------------------------+------------------------+
711
- |error |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|errs_1737118199_9470.log|
712
- +--------+--------------------------------------------+------------------------+
713
- |critical|/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|crts_1737118199_9470.log|
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 |Definition |
730
- +==============+==========+======================================================+
731
- |Python package|Python packages are directories that contains the special module |
732
- | |``__init__.py`` and other modules, packages files or directories.|
733
- +--------------+-----------------------------------------------------------------+
734
- |Python |Python sub-packages are python packages which are contained in |
735
- |sub-package |another pyhon 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 |Definition |
749
- +==============+==========+==============================+
750
- |Python package|Python packages sub-directories are |
751
- |sub-directory |directories contained in python packages.|
752
- +--------------+-----------------------------------------+
753
- |Special Python|Special Python package sub-directories |
754
- |package |are python package sub-directories with |
755
- |sub-directory |with a special meaning |
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 |Python packages are files within a python package. |
788
- |package files | |
789
- +--------------+--------------------------------------------------------------------+
790
- |Special python|Special python package files are package files which are not modules|
791
- |package files |and used as python marker files like ``__init__.py`` |
792
- +--------------+--------------------------------------------------------------------+
793
- |Python package|Python modules are files with suffix ``.py``; they could be empty or|
794
- |module |contain python code; other modules can be imported into a module. |
795
- +--------------+--------------------------------------------------------------------+
796
- |Special python|Special python modules like ``__init__.py`` or ``main.py`` are |
797
- |package module|python modules with special names and functionality. |
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
- |Python method|Python methods are python functions defined in python modules.|
854
- +-------------+--------------------------------------------------------------+
855
- |Special |Special python methods are python functions with special names|
856
- |python method|and functionalities. |
857
- +-------------+--------------------------------------------------------------+
858
- |Python class |Python classes are defined in python modules. |
859
- +-------------+--------------------------------------------------------------+
860
- |Python class |Python class methods are python methods defined python |
861
- |method |classes. |
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
  ^^^^^^^^^^^^^^^^^^^^^^
@@ -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.1.1.250415'
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 2024 Bernd Stroehle'
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 logging import Logger
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_.read(PacMod.sh_path_keys(cls_com), cls_com.Log)
38
+ cls.keys = Yaml_.read_with_safeloader(PacMod.sh_path_keys(cls_com))
41
39
  except Exception as exc:
42
- cls_com.Log.error(exc, exc_info=True)
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_.read(_path, cls_com.Log)
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
- # from ka_uts_uts.utils.aoeqstmt import AoEqStmt
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, cls_app, kwargs: TyDic):
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(cls_app, **kwargs)
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 = AoEqStmt.sh_d_eq(*args, d_parms=d_parms)
92
- cls.init(cls_app, _kwargs)
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
- package = cls.d_app_pacmod['package']
102
- path = "bin"
103
- return Pac.sh_path_by_package(package, path)
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
- package = cls.d_app_pacmod['package']
111
- path = "data"
112
- return Pac.sh_path_by_package(package, path)
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
- package = cls.d_app_pacmod['package']
120
- path = os.path.join('data', 'cfg.yml')
121
- return Pac.sh_path_by_package(package, path)
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.1.1.250415
4
- Summary: Communication Class Utilities
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: Jinja2>=3.1.6
21
- Requires-Dist: orjson>=3.10.16
22
- Requires-Dist: psutil>=7.0.0
23
- Requires-Dist: PyYAML>=6.0.2
24
- Requires-Dist: simplejson>=3.20.1
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 |Values |Example |
657
- +=================+===========================+==========+============+
658
- |dir_dat |Application data directory | |/otev/data |
659
- +-----------------+---------------------------+----------+------------+
660
- |tenant |Application tenant name | |UMH |
661
- +-----------------+---------------------------+----------+------------+
662
- |package |Application package name | |otev_xls_srr|
663
- +-----------------+---------------------------+----------+------------+
664
- |cmd |Application command | |evupreg |
665
- +-----------------+---------------------------+----------+------------+
666
- |pid |Process ID |evupreg |
667
- +-----------------+---------------------------+----------+------------+
668
- |log_ts_type |Timestamp type used in |ts, |ts |
669
- | |logging files|ts, dt |dt | |
670
- +-----------------+---------------------------+----------+------------+
671
- |log_sw_single_dir|Enable single log directory|True, |True |
672
- | |or multiple log directories|False | |
673
- +-----------------+---------------------------+----------+------------+
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 |File |
730
- +========+============================================+========================+
731
- |debug |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|debs_1737118199_9470.log|
732
- +--------+--------------------------------------------+------------------------+
733
- |info |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|infs_1737118199_9470.log|
734
- +--------+--------------------------------------------+------------------------+
735
- |warning |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|wrns_1737118199_9470.log|
736
- +--------+--------------------------------------------+------------------------+
737
- |error |/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|errs_1737118199_9470.log|
738
- +--------+--------------------------------------------+------------------------+
739
- |critical|/data/otev/umh/RUN/otev_xls_srr/evupreg/logs|crts_1737118199_9470.log|
740
- +--------+--------------------------------------------+------------------------+
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 |Definition |
756
- +==============+==========+======================================================+
757
- |Python package|Python packages are directories that contains the special module |
758
- | |``__init__.py`` and other modules, packages files or directories.|
759
- +--------------+-----------------------------------------------------------------+
760
- |Python |Python sub-packages are python packages which are contained in |
761
- |sub-package |another pyhon package. |
762
- +--------------+-----------------------------------------------------------------+
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 |Definition |
775
- +==============+==========+==============================+
776
- |Python package|Python packages sub-directories are |
777
- |sub-directory |directories contained in python packages.|
778
- +--------------+-----------------------------------------+
779
- |Special Python|Special Python package sub-directories |
780
- |package |are python package sub-directories with |
781
- |sub-directory |with a special meaning |
782
- +--------------+-----------------------------------------+
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 |Python packages are files within a python package. |
814
- |package files | |
815
- +--------------+--------------------------------------------------------------------+
816
- |Special python|Special python package files are package files which are not modules|
817
- |package files |and used as python marker files like ``__init__.py`` |
818
- +--------------+--------------------------------------------------------------------+
819
- |Python package|Python modules are files with suffix ``.py``; they could be empty or|
820
- |module |contain python code; other modules can be imported into a module. |
821
- +--------------+--------------------------------------------------------------------+
822
- |Special python|Special python modules like ``__init__.py`` or ``main.py`` are |
823
- |package module|python modules with special names and functionality. |
824
- +--------------+--------------------------------------------------------------------+
825
+ +--------------+---------------------------------------------------------+
826
+ |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
- |Python method|Python methods are python functions defined in python modules.|
880
- +-------------+--------------------------------------------------------------+
881
- |Special |Special python methods are python functions with special names|
882
- |python method|and functionalities. |
883
- +-------------+--------------------------------------------------------------+
884
- |Python class |Python classes are defined in python modules. |
885
- +-------------+--------------------------------------------------------------+
886
- |Python class |Python class methods are python methods defined python |
887
- |method |classes. |
888
- +-------------+--------------------------------------------------------------+
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 @@ classifiers.txt
5
5
  pyproject.toml
6
6
  requirements.txt
7
7
  setup.cfg
8
- dist/ka_uts_com-2.1.1.250415-py3-none-any.whl
8
+ dist/ka_uts_com-2.2.0.250427-py3-none-any.whl
9
9
  ka_uts_com/__init__.py
10
10
  ka_uts_com/__version__.py
11
11
  ka_uts_com/app.py
@@ -0,0 +1,3 @@
1
+ ka_uts_equ>=2.2.0.250427
2
+ ka_uts_log>=2.1.1.250415
3
+ ka_uts_uts>=2.1.1.250415
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "ka_uts_com"
8
- description = "Communication Class Utilities"
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"
@@ -0,0 +1,3 @@
1
+ ka_uts_equ>=2.2.0.250427
2
+ ka_uts_log>=2.1.1.250415
3
+ ka_uts_uts>=2.1.1.250415
@@ -1,5 +0,0 @@
1
- Jinja2>=3.1.6
2
- orjson>=3.10.16
3
- psutil>=7.0.0
4
- PyYAML>=6.0.2
5
- simplejson>=3.20.1
@@ -1,5 +0,0 @@
1
- Jinja2>=3.1.6
2
- orjson>=3.10.16
3
- psutil>=7.0.0
4
- PyYAML>=6.0.2
5
- simplejson>=3.20.1