The package ka_uts_com can be installed from PyPI or Anaconda.
To install with pip:
$ python -m pip install ka_uts_com
To install with conda:
$ conda install -c conda-forge ka_uts_com
This requires that the readme extra is installed:
$ python -m pip install ka_uts_com[readme]
The Modules of Package ka_uts_com could be classified in the follwing module classes:
- Base-Module
- Utility-Modules
- Special-Modules
Base Modules with classes
Name |
Type |
Static Classes |
Name |
Description |
com |
Communication |
App |
Setup Application Management |
Com |
Communication Management |
Cfg |
Configuaration Management |
Exit |
Setup Exit Rules |
LogStandard |
Standard Log Configuration |
LogPersonal |
Peronal Log Configuration |
Mgo |
Mongo DB Interface |
Utility Modules with classes
Name |
Type |
Static Classes |
Name |
Description |
argv |
Commandline
Arguments |
Argv |
Command Line Arguments Handling |
deq |
Dictionary
of Equates |
Deq |
Processing of Dictionaries which are
created out of Parameter Equates |
fnc |
Function
Management |
Fnc |
Function Managment
(Show, Execution) |
ioc |
I/O Control |
Yaml |
I/O Control for YAML files |
Jinja2 |
I/O Control for Jinja2 files |
log |
Logging |
Log |
Log Management |
pacmod |
Package and
Module |
Pacmod |
Package and Module Managment |
str |
String |
Str |
String Processing |
timer |
Timer |
Timestamp |
Timestamp Handling |
Timer |
Timer Management |
Special Modules without classes
Name |
Type |
Statements |
__init__ |
Package
directory
marker |
Module with no Statements; the module is used to mark
the directory it contains as a package. A dummy Module
enforces explicit imports and thus clear namespace
use and call them with the dot notation |
__version__ |
Version |
Assignment Statements for Version System Variables |
The Base Module com contains the subsequent static classes
- App
- Com
- Cfg
- Exit
- LogStandard
- LogPersonal
The static Class App contains the subsequent static variables and methods
App static Variables
Name |
Type |
Default |
Description |
sw_init |
T_Bool |
False |
initialisation switch |
httpmod |
T_Dic |
None |
http modus |
sw_replace_keys |
TN_Bool |
False |
replace keys switch |
keys |
TN_Arr |
None |
Keys array |
reqs |
T_Dic |
None |
Requests dictionary |
app |
T_Dic |
None |
Appliction dictionary |
App Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/R |
Description |
init |
initialise static variables
of class if they are not
allready initialized |
cls |
class |
P |
current class |
**kwargs |
list |
P |
Keyword arguments |
sh |
show (return) class |
cls |
class |
P |
current class |
**kwargs |
list |
P |
Keyword arguments |
log |
Logger |
R |
|
The static Class Com contains the subsequent variables and methods
Com static Variables
Name |
Type |
Default |
Description |
cfg |
T_Dic |
None |
Configuration dictionary |
log |
Logger |
None |
logging Method |
sw_init |
T_Bool |
False |
initialisation switch |
Com Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/RV |
Description |
init |
initialise static variables of
class if they are not allready
initialized |
cls |
class |
P |
current class |
**kwargs |
list |
P |
keyword arguments |
The static Class Cfg contains the subsequent methods.
Cfg Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/RV |
Description |
init |
read pacmod yaml file into
dictionary variable _dic and
return _dic |
cls |
class |
P |
current class |
pacmod |
T_Dic |
P |
pacmod
dictionary |
_dic |
TN_Dic |
RV |
|
Exit static Variables
Name |
Type |
Default |
Description |
sw_critical |
T_Bool |
False |
critical switch |
sw_stop |
T_Bool |
False |
stop switch |
sw_interactive |
T_Bool |
False |
interactive switch |
The static Class LogPersonal contains the subsequent static variables and methods.
LogPersonal static Variables
Name |
Type |
Default |
Description |
sw_init |
T_Bool |
False |
initialisation switch |
cfg |
T_Dic |
None |
Configuration dictionary |
log |
Logger |
None |
logging function |
logfile |
str |
None |
Logfile name |
LogPersonal Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/RV |
Description |
init |
Initialize static class
variables if they are
not allready initialized |
cls |
class |
P |
current class |
**kwargs |
|
P |
keywords |
read |
|
pacmod |
T_Dic |
P |
pacmod dictionary |
filename |
str |
P |
|
log_main |
str |
RV |
|
set_level |
set static variable log
level in log
configuration handlers |
sw_debug |
bool |
P |
debug switch |
sh |
show static Logger
variable log |
cls |
class |
P |
current class |
**kwargs |
|
P |
keyword arguments |
log |
Logger |
P |
|
The static Class LogStandard contains the subsequent static variables and methods
LogStandard static Variables
Name |
Type |
Default |
Description |
sw_init |
T_Bool |
False |
initialisation switch |
cfg |
T_Dic |
None |
Configuration dictionary |
log |
Logger |
None |
logging function |
logfile |
str |
None |
Logfile name |
LogStandard Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/RV |
Description |
read |
Read log file path with
jinja2 I/O utility |
pacmod |
T_Dic |
P |
|
filename |
str |
P |
|
log_main |
str |
RV |
|
set_level |
Set static variable log
level in log
configuration handlers |
sw_debug |
bool |
P |
|
init |
initialise static
variables of class if
if they are not allready
initialized |
cls |
class |
P |
current class |
**kwargs |
|
P |
|
sh |
show static Logger
variable |
cls |
class |
P |
current class |
**kwargs |
|
P |
Keywords |
log |
Logger |
RV |
|
The Module argv contains the subsequent static classes.
Module argv static Classes
Name |
Type |
Static Classes |
Name |
Description |
argv |
CLI Argument
Management |
Argv |
Manage Commandline Arguments as
Equate-Strings |
The static Class Argv contains the subsequent variables and methods
Argv static Variables
Name |
Type |
Default |
Description |
sw_init |
T_Bool |
False |
initialisation switch |
httpmod |
T_Dic |
None |
http modus |
sw_replace_keys |
TN_Bool |
False |
replace keys switch |
keys |
TN_Arr |
None |
Keys array |
reqs |
T_Dic |
None |
Requests dictionary |
app |
T_Dic |
None |
Appliction dictionary |
Argv Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/RV |
Description |
set_by_pacmod |
set current pacmod
dictionary |
d_eq |
T_Dic |
P |
Dictionary of
equates |
root_cls |
Class |
P |
Root Class |
set_d_eq |
set current pacmod
dictionary |
d_eq |
T_Dic |
P |
Dictionary of
equates |
root_cls |
Class |
P |
Root Class |
The static Class Aeq contains the subsequent variables and methods
Aeq static Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/R |
Description |
sh_value |
Show value of equate
string provided by
single command line
argument |
cls |
class |
P |
current class |
key |
str |
P |
Key of equate string |
value |
Any |
P |
Value of equate string |
d_valid_parms |
TN_Dic |
P |
Dictionary of valid
keys (parameters) |
value |
Any |
RV |
converted Value of the
equate-string
according Value type
d_valid_parms |
sh_d_eq |
Show Dictionary creat
created by parsing
array of equate
strings provided by
commandline arguments |
cls |
class |
P |
current class |
a_s_eq |
T_Arr |
P |
array of equate
strings |
d_valid_parms |
TN_Dic |
P |
Dictionary of valid
parameter-keys |
d_eq |
TN_Dic |
RV |
Dictiony of parameter
key, values |
The Module ioc provides Classes with I/O Control methods for files;
it contains the subsequent classes classified by the supported file type.
ioc static Classes
Name |
Type |
Static Classes |
Name |
Description |
ioc |
I/O Control |
Jinja2 |
I/O Control for Jinja2 files |
Yaml |
MI/O Control for Yaml files |
The static Class Jinja2 provides I/O Control methods for Jinja2 files;
it contains the subsequent variables and methods.
Jinja2 Methods
Name |
|
Parameter / Return Value |
Name |
Type |
P/R |
Description |
read |
Read log file path
with jinja |
pacmod |
TN_Dic |
P |
|
filename |
str |
P |
|
|
TN_Any |
RV |
no return value |
read_template |
Read log file path
with jinja2 |
pacmod |
TN_Dic |
P |
|
filename |
TN_Any |
P |
|
|
TN_Any |
RV |
no return value |
The static Class Yaml provides I/O Control methods for Yaml files;
it contains the subsequent variables and methods
Yaml Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/RV |
Description |
load |
Load yaml string into any
object using yaml loader;
default is yaml.safeloader |
string |
str |
P |
|
loader |
str |
P |
|
|
TN_Any |
RV |
no return value |
read |
Read yaml file path into
any object using yaml
loader; default loader is
yaml.safeloader |
path |
str |
P |
|
loader |
str |
P |
|
|
TN_Any |
RV |
no return value |
The Module log provides Classes with I/O Control methods for log files;
it contains the following static classes.
* Module log static Classes*
Name |
Type |
Static Classes |
Name |
Description |
log |
Logging |
Log |
Log Management |
Log static Variables
Name |
Type |
Default |
Description |
sw_init |
T_Bool |
False |
initialisation switch |
cfg |
T_Dic |
None |
Configuration dictionary |
log |
Logger |
None |
logging function |
The Class Log contains the following static sub-classes.
Log static Sub-Classes
Name |
Type |
Description |
Eq |
|
Log Management for Equate Messages |
Log Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/RV |
Description |
debug |
Log debug message |
cls |
class |
P |
current class |
key |
Any |
P |
|
value |
Any |
P |
|
error |
Log error message |
cls |
class |
P |
current class |
key |
Any |
P |
|
value |
Any |
P |
|
info |
Log info message |
cls |
class |
P |
current class |
key |
Any |
P |
|
value |
Any |
P |
|
warning |
Log warning message |
cls |
class |
P |
current class |
key |
Any |
P |
|
value |
Any |
P |
|
sh |
show equate message |
key |
Any |
P |
|
value |
Any |
P |
|
|
str |
RV |
no return value |
The Module pacmod contains the following static classes.
pacmod static Classes
Name |
Type |
Static Classes |
Name |
Description |
Pacmod |
Package Module |
Pacmod |
Package Module Management |
Pacmod Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/RV |
Description |
sh_d_pacmod |
create and show (return)
pacmod dictionary |
root_cls |
class |
P |
root class |
tenant |
Any |
P |
|
|
T_Dic |
RV |
no return value |
sh_path_cfg_yaml |
show pacmod file path of
the yaml file
<pacmod module>.yaml
in the data directory of
the current module of the
current package |
pacmod |
T_Dic |
P |
|
|
str |
RV |
no return value |
sh_path_keys_yaml |
show pacmod file path type
for the yaml file keys.yml
keys.yml in the data
directory of the current
module of the current |
pacmod |
T_Dic |
P |
|
type_ |
str |
P |
|
|
str |
RV |
no return value |
sh_pacmod_type |
show pacmod type directory
path |
pacmod |
T_Dic |
P |
|
type_ |
str |
P |
|
|
str |
RV |
no return value |
sh_file_path |
show pacmod file path |
cls |
class |
P |
current class |
pacmod |
T_Dic |
P |
|
type_ |
str |
P |
|
suffix |
str |
P |
|
pid |
Any |
P |
|
ts |
Any |
P |
|
**kwargs |
|
P |
keyword arguments |
|
str |
RV |
no return value |
sh_pattern |
show pacmod file path
pattern |
pacmod |
T_Dic |
P |
|
type_ |
str |
P |
|
suffix |
str |
P |
|
**kwargs |
|
P |
keyword arguments |
|
str |
RV |
no return value |
sh_path_cfg_log |
show file path of log
configuration file |
pacmod |
TN_Dic |
P |
|
filename |
str |
P |
|
|
str |
RV |
no return value |
sh_d_pacmod |
show pacmod dictionary |
cls |
class |
P |
current class |
**kwargs |
|
P |
keyword arguments |
The Module timer contains the following static classes.
timer static Classes
Name |
Type |
Static Classes |
Name |
Description |
Timer |
Timer |
Timestamp |
Timestamop class |
Timer |
Timer class |
Class Timer static Variables
Name |
Type |
Default |
Description |
sw_init |
T_Bool |
False |
initialisation switch |
cfg |
T_Dic |
None |
Configuration dictionary |
log |
Logger |
None |
logging function |
Class Timer static Methods
Name |
Description |
Parameter / Return Value |
Name |
Type |
P/RV |
Description |
read |
Read log file path with
jinja2 |
pacmod |
T_Dic |
P |
|
filename |
str |
P |
|
log_main |
str |
RV |
|
set_level |
Set static variable log level
in log configuration handlers |
sw_debug |
bool |
P |
|
init |
initialise static variables
if they are not allready
initialized |
cls |
class |
P |
current class |
**kwargs |
|
P |
keyword arguments |
sh |
show static variable log |
cls |
class |
P |
|
**kwargs |
|
P |
keyword arguments |
The Module __version__ contains no classes, but assignment statements for
system variables used by versioning.
Module __version_ System Variables
Name |
Example |
__title__ |
'ka_uts_com' |
__description__ |
'Communication Area Utilities.' |
__url__ |
'https://ka-com.readthedocs.io/en/latest' |
__version___ |
'2023.2.2' |
__build__ |
0x022200 |
__author_email_ |
'Bernd Stroehle' |
__license__ |
'Apache-2.0' |
__copyright__ |
'Copyright 2023 bs29' |
__cake__ |
u'u2728 U0001f370 u2728' |
Name |
Description |
log.main.tenant.yml
__copyright__ |
'ka_uts_com'
'Copyright 2023 bs29' |