Clemens Schwaighofer
a046d9f84c
Move file handling to corelibs_file module
2026-02-03 11:42:57 +09:00
Clemens Schwaighofer
2e0d5aeb51
Move all debug handling into their own packages
...
dump data: corelibs_dump_data
stack trace: corelibs_stack_trace
profiling, timing, etc: corelibs_debug
2026-02-03 10:48:59 +09:00
Clemens Schwaighofer
82a759dd21
Fix fingerprint with mixed int and str keys
...
Create a fallback hash function to handle mixed key types in dictionaries
and lists, ensuring consistent hashing across different data structures.
Fallback called is prefixed with "HO_" to indicate its usage.
2026-01-27 15:59:38 +09:00
Clemens Schwaighofer
fe913608c4
Fix iteration list helpers dict list type
2026-01-27 14:52:11 +09:00
Clemens Schwaighofer
79f9c5d1c6
iterator list helpers tests run cases updated
2026-01-27 14:51:25 +09:00
Clemens Schwaighofer
1a978f786d
Add a list helper to create unique list of dictionaries and tests for it.
2026-01-27 14:42:19 +09:00
Clemens Schwaighofer
51669d3c5f
Settings loader test-run add boolean convert check test
2026-01-23 18:07:52 +09:00
Clemens Schwaighofer
84286593f6
Log fix bug where log consosle format set to None would throw an exception
...
Also add prefix "[SettingsLoader] " to print statements in SettingsLoader if we do not write to log
2026-01-23 15:14:31 +09:00
Clemens Schwaighofer
2748bc19be
Log, add get console formatter method
...
Returns current flags set for console formatter
2026-01-23 11:33:38 +09:00
Clemens Schwaighofer
7da18e0f00
Moved the compiled regex patterns to a new file regex_constants_compiled
...
So we do not force the compiled build if not needed
2026-01-09 16:15:38 +09:00
Clemens Schwaighofer
f91e0bb93a
Add new regex constants for email handling and update related tests
2026-01-08 14:58:14 +09:00
Clemens Schwaighofer
2923a3e88b
Fix settings loader to return empty list when splitting empty string value
2026-01-06 09:58:21 +09:00
Clemens Schwaighofer
d224876a8e
Settings loader, pass error messages to exception raise
...
So we can get the actual error message in the exception if logging is all off
2025-12-24 10:08:38 +09:00
Clemens Schwaighofer
523e61c9f7
Add SQL Main class as general wrapper for SQL DB handling
2025-12-18 17:20:57 +09:00
Clemens Schwaighofer
6593e11332
Update deprecation infor for enum base
...
Test run add for regex checks domain name regex contants
2025-12-10 11:35:00 +09:00
Clemens Schwaighofer
acd61e825e
Add Log method "any handler is minimum level" with tests
...
Checks if a given handler is set for any current active handler
2025-12-04 14:37:55 +09:00
Clemens Schwaighofer
4ffe372434
Change that the args overload has to be set to override settings from arguments
...
So we do not have issues with values change because an arugment has the same name as a setting name
2025-11-20 10:00:36 +09:00
Clemens Schwaighofer
1f7f4b8d53
Update settings loader with skip argument set if not matching settings type or ignore flag is set
...
We have "args:no" that can be set to avoid override from arguments.
Also arguments that do not match the exepected type are not loaded
2025-11-19 19:01:29 +09:00
Clemens Schwaighofer
f1788f057f
Log skip format change it format flags have not changed
2025-11-19 17:42:47 +09:00
Clemens Schwaighofer
51e9b1ce7c
Add "LEVEL" option to console log format
...
So we can set output to onle the message without any information (NONE),
only level (BARE), time and level (MINIMAL), time, file, line and level (CONDENSED) or
(ALL) full information.
2025-11-19 17:35:27 +09:00
Clemens Schwaighofer
d29f827fc9
Add a function to Log system to update the console formatter dynamically.
2025-11-19 15:17:25 +09:00
Clemens Schwaighofer
5996bb1fc0
Add Log ConsoleFormatSettings.from_string static method to get settings by name with default option
...
To help set from config or command line with fallback
2025-11-19 13:45:26 +09:00
Clemens Schwaighofer
1280b2f855
Log switch to bitwise flag settings for console format type
...
Has the following settings
TIME, TIME_SECONDS, TIME_MILLISECONDS, TIME_MICROSECONDS: enable time output in different formats
TIME and TIME_MILLISECONDS are equivalent, if multiple are set the smallest precision wins
TIMEZONE: add time zone to time output
NAME: log group name
FILE: short file name
FUNCTION: function name
LINENO: line number
There is a class with quick grouped settings
ConsoleFormatSettings
ALL: all options enabled, time is in milliseconds
CONDENSED: time without time zone, file and line number
MINIMAL: only time without time zone
BARE: only the message, no other info
2025-11-19 11:25:49 +09:00
Clemens Schwaighofer
592652cff1
Update logging with console output format changes
...
"console_format_type" with "normal", "condensed", "minimal" options
This sets the format of the console output, controlling the amount of detail shown.
normal show log title, file, function and line number
condensed show file and line number only
minimal shows only timestamp, log level and message
Default is normal
"console_iso_precision" with "seconds", "milliseconds", "microseconds" options
This sets the precision of the ISO timestamp in console logs.
Default is milliseconds
The timestamp output is now ISO8601 formatatted with time zone.
2025-11-18 15:31:16 +09:00
Clemens Schwaighofer
4e78d83092
Add checks for BOM encoding in files
2025-11-06 18:21:32 +09:00
Clemens Schwaighofer
c5ab4352e3
Fix name dict_helper to dict_helpers
...
So we have the same name for everyhing
2025-10-27 10:40:12 +09:00
Clemens Schwaighofer
fb4fdb6857
iterator tests added
2025-10-24 16:36:42 +09:00
Clemens Schwaighofer
d642a13b6e
file handling tests, move progress to script handling
...
Progress is not only file, but process progress in a script
2025-10-24 16:07:47 +09:00
Clemens Schwaighofer
a76eae0cc7
Add datetime helpers and move all time/date time datetime_handling folder
...
previous string_handling located datetime and timestamp files have been moved
to the datetime handling folder
Update readme file with more information about currently covered areas
2025-10-24 10:03:04 +09:00
Clemens Schwaighofer
53cf2a6f48
Add prepare_url_slash to string_helpers.py and tests
...
Function cleans up url paths (without domain) by ensuring they start with a single slash and removing double slashes.
2025-10-23 15:47:19 +09:00
Clemens Schwaighofer
fe69530b38
Add a simple add key entry to dictionary
2025-10-23 15:31:52 +09:00
Clemens Schwaighofer
84ce43ab93
Add SQLite IO class
...
This is a very basic class without many helper functions added yet
Add to the CoreLibs so when we develop it further it can be used by all projects
2025-10-23 15:22:12 +09:00
Clemens Schwaighofer
5e0765ee24
Rename the enum_test to enum_base for the test run file
2025-10-23 14:32:52 +09:00
Clemens Schwaighofer
30bf9c1bcb
Add Enum base class
...
A helper class for handling enum classes with various lookup helpers
2025-10-23 13:47:13 +09:00
Clemens Schwaighofer
2544fad9ce
Add json helper function json_replace
...
Function can replace content for a json path string in a dictionary
2025-10-23 13:20:40 +09:00
Clemens Schwaighofer
543e9766a1
Add symmetric encryption and tests
2025-10-23 11:47:41 +09:00
Clemens Schwaighofer
dadc14563a
jmespath search check update
2025-10-09 16:42:41 +09:00
Clemens Schwaighofer
b858936c68
Add test file for datetime helpers
2025-10-08 16:08:23 +09:00
Clemens Schwaighofer
bb60a570d0
Change the TimestampStrings check to check for str instead of not ZoneInfo.
...
This fixes the pytest problem which threw:
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union
during Mocking
2025-09-25 15:36:47 +09:00
Clemens Schwaighofer
38bae7fb46
TimestampStrings allows ZoneInfo object as time_zone parameter
...
So we can use pre-parsed data
Some tests for parsing settings, timestamp output
2025-09-25 15:14:40 +09:00
Clemens Schwaighofer
ef5981b473
convert_to_seconds allow negative time strings and add pytests
2025-09-24 15:25:53 +09:00
Clemens Schwaighofer
b32887a6d8
Add time in seconds convert to human readable format
2025-09-19 09:57:51 +09:00
Clemens Schwaighofer
f8ae6609c7
Allow empty config settings for settings loader if only loading is needed
2025-08-26 14:38:55 +09:00
Clemens Schwaighofer
f8905a176c
Fix settings loader
...
Remove all class vars for vars that are only used in the loader itsef
- entry_split_char
- entry_convert
- entry_set_empty
The self.settings varr was never used, removed
The config file path exists check is moved to the config data loader
The internal _check_settings_abort is now __check_settings_abort to make it private
lock file updates
2025-08-26 14:29:52 +09:00
Clemens Schwaighofer
0df049d453
Add per run log rotate flag
...
This flag will use the normal file handler with a file name that has date + time + milliseconds
to create a new file each time the script is run
2025-08-01 16:01:50 +09:00
Clemens Schwaighofer
2f08ecabbf
For convert time string, skip convert if incoming value is a number of any type
...
Any float number will be rounded, and everything that is any kind of number will be then converted to int and returned
The rest will be converted to string and normal convert is run
2025-07-29 09:29:38 +09:00
Clemens Schwaighofer
a586cf65e2
Convert string with time units to seconds
2025-07-29 09:13:36 +09:00
Clemens Schwaighofer
4f9c2b9d5f
Add exception stack caller and add this to the logger exception call
...
So we get the location of the exception in the console log too
2025-07-28 15:26:23 +09:00
Clemens Schwaighofer
f1e3bc8559
For Log exception write to ERROR, add the stack trace too
2025-07-28 14:32:14 +09:00
Clemens Schwaighofer
2cfbf4bb90
Update data search for iterators
...
array_search name is deprecated
use find_in_array_from_list
- change parameter order
data (search in) comes before search_params list
- created a TypedDict for the array search params dict entry
2025-07-25 15:48:37 +09:00