encommon 0.8.0__tar.gz → 0.8.1__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.
- {encommon-0.8.0/encommon.egg-info → encommon-0.8.1}/PKG-INFO +1 -1
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/__init__.py +2 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/config.py +13 -9
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/params.py +3 -3
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/match.py +4 -4
- encommon-0.8.1/encommon/version.txt +1 -0
- {encommon-0.8.0 → encommon-0.8.1/encommon.egg-info}/PKG-INFO +1 -1
- encommon-0.8.0/encommon/version.txt +0 -1
- {encommon-0.8.0 → encommon-0.8.1}/LICENSE +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/MANIFEST.in +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/README.md +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/__init__.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/common.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/files.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/logger.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/paths.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/__init__.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/test_common.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/test_config.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/test_files.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/test_logger.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/test_paths.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/conftest.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/__init__.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/crypts.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/hashes.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/params.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/test/__init__.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/test/test_crypts.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/test/test_hashes.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/py.typed +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/__init__.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/common.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/duration.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/parse.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/__init__.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_common.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_duration.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_parse.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_timers.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_times.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_window.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/timers.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/times.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/times/window.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/types/__init__.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/types/dicts.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/types/empty.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/types/strings.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/types/test/__init__.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/types/test/test_dicts.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/types/test/test_empty.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/types/test/test_strings.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/__init__.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/common.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/paths.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/sample.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/stdout.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/__init__.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/test_common.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/test_match.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/test_paths.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/test_sample.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/test_stdout.py +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon.egg-info/SOURCES.txt +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon.egg-info/dependency_links.txt +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon.egg-info/requires.txt +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/encommon.egg-info/top_level.txt +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/pyproject.toml +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/reqs-install.txt +0 -0
- {encommon-0.8.0 → encommon-0.8.1}/setup.cfg +0 -0
@@ -14,6 +14,7 @@ from .config import Config
|
|
14
14
|
from .files import ConfigFile
|
15
15
|
from .files import ConfigFiles
|
16
16
|
from .logger import Logger
|
17
|
+
from .logger import Message
|
17
18
|
from .params import ConfigParams
|
18
19
|
from .params import LoggerParams
|
19
20
|
from .params import Params
|
@@ -31,6 +32,7 @@ __all__ = [
|
|
31
32
|
'ConfigPaths',
|
32
33
|
'Logger',
|
33
34
|
'LoggerParams',
|
35
|
+
'Message',
|
34
36
|
'Params',
|
35
37
|
'config_load',
|
36
38
|
'config_path',
|
@@ -32,7 +32,7 @@ class Config:
|
|
32
32
|
|
33
33
|
.. note::
|
34
34
|
Configuration loaded from files is validated with the
|
35
|
-
Pydantic model :class
|
35
|
+
Pydantic model :class:`encommon.config.Params`.
|
36
36
|
|
37
37
|
:param files: Complete or relative path to config files.
|
38
38
|
:param paths: Complete or relative path to config paths.
|
@@ -124,7 +124,7 @@ class Config:
|
|
124
124
|
:returns: Value for the attribute from class instance.
|
125
125
|
"""
|
126
126
|
|
127
|
-
return self.__cargs
|
127
|
+
return deepcopy(self.__cargs)
|
128
128
|
|
129
129
|
|
130
130
|
@property
|
@@ -163,21 +163,25 @@ class Config:
|
|
163
163
|
:returns: Pydantic model containing the configuration.
|
164
164
|
"""
|
165
165
|
|
166
|
-
|
167
|
-
|
166
|
+
params = self.__params
|
167
|
+
|
168
|
+
if params is not None:
|
169
|
+
return params
|
170
|
+
|
168
171
|
|
169
|
-
cargs = self.__cargs
|
170
172
|
merged = self.files.merged
|
171
173
|
|
172
174
|
merge_dicts(
|
173
175
|
dict1=merged,
|
174
|
-
dict2=
|
176
|
+
dict2=self.cargs,
|
175
177
|
force=True)
|
176
178
|
|
177
|
-
|
178
|
-
|
179
|
+
params = self.model(**merged)
|
180
|
+
|
181
|
+
|
182
|
+
self.__params = params
|
179
183
|
|
180
|
-
return
|
184
|
+
return params
|
181
185
|
|
182
186
|
|
183
187
|
@property
|
@@ -50,9 +50,9 @@ class Params(BaseModel, extra='forbid'):
|
|
50
50
|
"""
|
51
51
|
Process and validate the common configuration parameters.
|
52
52
|
|
53
|
-
:param enconfig: Configuration for the
|
54
|
-
:param enlogger: Configuration for the
|
55
|
-
:param encrypts: Configuration for the
|
53
|
+
:param enconfig: Configuration for the Config instance.
|
54
|
+
:param enlogger: Configuration for the Logger instance.
|
55
|
+
:param encrypts: Configuration for the Crypts instance.
|
56
56
|
:param data: Keyword arguments passed to Pydantic model.
|
57
57
|
Parameter is picked up by autodoc, please ignore.
|
58
58
|
"""
|
@@ -23,12 +23,12 @@ def rgxp_match(
|
|
23
23
|
|
24
24
|
Example
|
25
25
|
-------
|
26
|
-
>>> rgxp_match('one', ['
|
26
|
+
>>> rgxp_match('one', ['on*', 'two'])
|
27
27
|
True
|
28
28
|
|
29
29
|
Example
|
30
30
|
-------
|
31
|
-
>>> rgxp_match('uno', ['
|
31
|
+
>>> rgxp_match('uno', ['on*', 'two'])
|
32
32
|
False
|
33
33
|
|
34
34
|
:param values: Value or values to enumerate for matching.
|
@@ -86,12 +86,12 @@ def fuzz_match(
|
|
86
86
|
|
87
87
|
Example
|
88
88
|
-------
|
89
|
-
>>> rgxp_match('one', ['
|
89
|
+
>>> rgxp_match('one', ['on[a-z]', 'two'])
|
90
90
|
True
|
91
91
|
|
92
92
|
Example
|
93
93
|
-------
|
94
|
-
>>> rgxp_match('uno', ['
|
94
|
+
>>> rgxp_match('uno', ['on[a-z]', 'two'])
|
95
95
|
False
|
96
96
|
|
97
97
|
:param values: Value or values to enumerate for matching.
|
@@ -0,0 +1 @@
|
|
1
|
+
0.8.1
|
@@ -1 +0,0 @@
|
|
1
|
-
0.8.0
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|