ae-base 0.3.59__py3-none-any.whl → 0.3.61__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ae/base.py +8 -6
- {ae_base-0.3.59.dist-info → ae_base-0.3.61.dist-info}/METADATA +4 -4
- ae_base-0.3.61.dist-info/RECORD +7 -0
- {ae_base-0.3.59.dist-info → ae_base-0.3.61.dist-info}/licenses/LICENSE.md +1 -1
- ae_base-0.3.59.dist-info/RECORD +0 -7
- {ae_base-0.3.59.dist-info → ae_base-0.3.61.dist-info}/WHEEL +0 -0
- {ae_base-0.3.59.dist-info → ae_base-0.3.61.dist-info}/top_level.txt +0 -0
- {ae_base-0.3.59.dist-info → ae_base-0.3.61.dist-info}/zip-safe +0 -0
ae/base.py
CHANGED
|
@@ -171,7 +171,7 @@ from types import ModuleType
|
|
|
171
171
|
from typing import Any, Callable, Generator, Iterable, MutableMapping, Optional, Union, cast
|
|
172
172
|
|
|
173
173
|
|
|
174
|
-
__version__ = '0.3.
|
|
174
|
+
__version__ = '0.3.61'
|
|
175
175
|
|
|
176
176
|
|
|
177
177
|
os_path_abspath = os.path.abspath
|
|
@@ -207,6 +207,8 @@ INI_EXT = '.ini' #: INI config file extension
|
|
|
207
207
|
DATE_ISO = "%Y-%m-%d" #: ISO string format for date values (e.g. in config files/variables)
|
|
208
208
|
DATE_TIME_ISO = "%Y-%m-%d %H:%M:%S.%f" #: ISO string format for datetime values
|
|
209
209
|
|
|
210
|
+
DEF_PROJECT_PARENT_FOLDER = 'src' #: default directory name to put code project roots underneath of it
|
|
211
|
+
|
|
210
212
|
DEF_ENCODE_ERRORS = 'backslashreplace' #: default encode error handling for UnicodeEncodeErrors
|
|
211
213
|
DEF_ENCODING = 'ascii'
|
|
212
214
|
""" encoding for :func:`force_encoding` that will always work independent from destination (console, file sys, ...).
|
|
@@ -334,21 +336,21 @@ def camel_to_snake(name: str) -> str:
|
|
|
334
336
|
return "".join(str_parts)
|
|
335
337
|
|
|
336
338
|
|
|
337
|
-
def deep_dict_update(data: dict, update: dict):
|
|
339
|
+
def deep_dict_update(data: dict, update: dict, overwrite: bool = True):
|
|
338
340
|
""" update the optionally nested data dict in-place with the items and subitems from the update dict.
|
|
339
341
|
|
|
340
342
|
:param data: dict to be updated/extended. non-existing keys of dict-subitems will be added.
|
|
341
343
|
:param update: dict with the [sub-]items to update in the :paramref:`~deep_dict_update.data` dict.
|
|
344
|
+
:param overwrite: pass False to not overwrite an already existing value.
|
|
342
345
|
|
|
343
|
-
.. hint:: the module/portion :mod:`ae.deep`
|
|
344
|
-
|
|
346
|
+
.. hint:: see the module/portion :mod:`ae.deep` for more deep update helper functions.
|
|
345
347
|
"""
|
|
346
348
|
for upd_key, upd_val in update.items():
|
|
347
349
|
if isinstance(upd_val, dict):
|
|
348
350
|
if upd_key not in data:
|
|
349
351
|
data[upd_key] = {}
|
|
350
|
-
deep_dict_update(data[upd_key], upd_val)
|
|
351
|
-
|
|
352
|
+
deep_dict_update(data[upd_key], upd_val, overwrite=overwrite)
|
|
353
|
+
elif overwrite or upd_key not in data:
|
|
352
354
|
data[upd_key] = upd_val
|
|
353
355
|
|
|
354
356
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ae_base
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.61
|
|
4
4
|
Summary: ae namespace module portion base: basic constants, helper functions and context manager
|
|
5
5
|
Home-page: https://gitlab.com/ae-group/ae_base
|
|
6
6
|
Author: AndiEcker
|
|
@@ -69,13 +69,13 @@ Dynamic: summary
|
|
|
69
69
|
|
|
70
70
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project ae.ae V0.3.96 -->
|
|
71
71
|
<!-- THIS FILE IS EXCLUSIVELY MAINTAINED by the project aedev.tpl_namespace_root V0.3.14 -->
|
|
72
|
-
# base 0.3.
|
|
72
|
+
# base 0.3.61
|
|
73
73
|
|
|
74
74
|
[](
|
|
75
75
|
https://gitlab.com/ae-group/ae_base)
|
|
76
76
|
[](
|
|
78
|
+
https://gitlab.com/ae-group/ae_base/-/tree/release0.3.60)
|
|
79
79
|
[](
|
|
80
80
|
https://pypi.org/project/ae-base/#history)
|
|
81
81
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
ae/base.py,sha256=RlIALdehqSfXnfsAQO08ZQditIvM7lhhoq6nxI207W0,67651
|
|
2
|
+
ae_base-0.3.61.dist-info/licenses/LICENSE.md,sha256=vn9XT8MDUxNAWsP60HLwHJp8ZLOI0OJBRe-1N2xXh08,35002
|
|
3
|
+
ae_base-0.3.61.dist-info/METADATA,sha256=yrc326HYYiuFYCWc13w5RIabiR_fJnLCW1VtnyEGblU,5724
|
|
4
|
+
ae_base-0.3.61.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
5
|
+
ae_base-0.3.61.dist-info/top_level.txt,sha256=vUdgAslSmhZLXWU48fm8AG2BjVnkOWLco8rzuW-5zY0,3
|
|
6
|
+
ae_base-0.3.61.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
|
+
ae_base-0.3.61.dist-info/RECORD,,
|
ae_base-0.3.59.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
ae/base.py,sha256=Ki2ROdjP0ZRbi96s_Im1wwFMzE0ou3a92Nzkubhd-rM,67374
|
|
2
|
-
ae_base-0.3.59.dist-info/licenses/LICENSE.md,sha256=k61Ar-RjA09gAZejD19C5g-mItE0OuhIC4zU0gbYpXE,35002
|
|
3
|
-
ae_base-0.3.59.dist-info/METADATA,sha256=pZr_N86DQFM5QpxSEx8b6VKqOX2NWn4NxGSfXpyiGnI,5724
|
|
4
|
-
ae_base-0.3.59.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
5
|
-
ae_base-0.3.59.dist-info/top_level.txt,sha256=vUdgAslSmhZLXWU48fm8AG2BjVnkOWLco8rzuW-5zY0,3
|
|
6
|
-
ae_base-0.3.59.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
|
-
ae_base-0.3.59.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|