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.
Files changed (71) hide show
  1. {encommon-0.8.0/encommon.egg-info → encommon-0.8.1}/PKG-INFO +1 -1
  2. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/__init__.py +2 -0
  3. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/config.py +13 -9
  4. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/params.py +3 -3
  5. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/match.py +4 -4
  6. encommon-0.8.1/encommon/version.txt +1 -0
  7. {encommon-0.8.0 → encommon-0.8.1/encommon.egg-info}/PKG-INFO +1 -1
  8. encommon-0.8.0/encommon/version.txt +0 -1
  9. {encommon-0.8.0 → encommon-0.8.1}/LICENSE +0 -0
  10. {encommon-0.8.0 → encommon-0.8.1}/MANIFEST.in +0 -0
  11. {encommon-0.8.0 → encommon-0.8.1}/README.md +0 -0
  12. {encommon-0.8.0 → encommon-0.8.1}/encommon/__init__.py +0 -0
  13. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/common.py +0 -0
  14. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/files.py +0 -0
  15. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/logger.py +0 -0
  16. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/paths.py +0 -0
  17. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/__init__.py +0 -0
  18. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/test_common.py +0 -0
  19. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/test_config.py +0 -0
  20. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/test_files.py +0 -0
  21. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/test_logger.py +0 -0
  22. {encommon-0.8.0 → encommon-0.8.1}/encommon/config/test/test_paths.py +0 -0
  23. {encommon-0.8.0 → encommon-0.8.1}/encommon/conftest.py +0 -0
  24. {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/__init__.py +0 -0
  25. {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/crypts.py +0 -0
  26. {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/hashes.py +0 -0
  27. {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/params.py +0 -0
  28. {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/test/__init__.py +0 -0
  29. {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/test/test_crypts.py +0 -0
  30. {encommon-0.8.0 → encommon-0.8.1}/encommon/crypts/test/test_hashes.py +0 -0
  31. {encommon-0.8.0 → encommon-0.8.1}/encommon/py.typed +0 -0
  32. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/__init__.py +0 -0
  33. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/common.py +0 -0
  34. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/duration.py +0 -0
  35. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/parse.py +0 -0
  36. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/__init__.py +0 -0
  37. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_common.py +0 -0
  38. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_duration.py +0 -0
  39. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_parse.py +0 -0
  40. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_timers.py +0 -0
  41. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_times.py +0 -0
  42. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/test/test_window.py +0 -0
  43. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/timers.py +0 -0
  44. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/times.py +0 -0
  45. {encommon-0.8.0 → encommon-0.8.1}/encommon/times/window.py +0 -0
  46. {encommon-0.8.0 → encommon-0.8.1}/encommon/types/__init__.py +0 -0
  47. {encommon-0.8.0 → encommon-0.8.1}/encommon/types/dicts.py +0 -0
  48. {encommon-0.8.0 → encommon-0.8.1}/encommon/types/empty.py +0 -0
  49. {encommon-0.8.0 → encommon-0.8.1}/encommon/types/strings.py +0 -0
  50. {encommon-0.8.0 → encommon-0.8.1}/encommon/types/test/__init__.py +0 -0
  51. {encommon-0.8.0 → encommon-0.8.1}/encommon/types/test/test_dicts.py +0 -0
  52. {encommon-0.8.0 → encommon-0.8.1}/encommon/types/test/test_empty.py +0 -0
  53. {encommon-0.8.0 → encommon-0.8.1}/encommon/types/test/test_strings.py +0 -0
  54. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/__init__.py +0 -0
  55. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/common.py +0 -0
  56. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/paths.py +0 -0
  57. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/sample.py +0 -0
  58. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/stdout.py +0 -0
  59. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/__init__.py +0 -0
  60. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/test_common.py +0 -0
  61. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/test_match.py +0 -0
  62. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/test_paths.py +0 -0
  63. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/test_sample.py +0 -0
  64. {encommon-0.8.0 → encommon-0.8.1}/encommon/utils/test/test_stdout.py +0 -0
  65. {encommon-0.8.0 → encommon-0.8.1}/encommon.egg-info/SOURCES.txt +0 -0
  66. {encommon-0.8.0 → encommon-0.8.1}/encommon.egg-info/dependency_links.txt +0 -0
  67. {encommon-0.8.0 → encommon-0.8.1}/encommon.egg-info/requires.txt +0 -0
  68. {encommon-0.8.0 → encommon-0.8.1}/encommon.egg-info/top_level.txt +0 -0
  69. {encommon-0.8.0 → encommon-0.8.1}/pyproject.toml +0 -0
  70. {encommon-0.8.0 → encommon-0.8.1}/reqs-install.txt +0 -0
  71. {encommon-0.8.0 → encommon-0.8.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: encommon
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Enasis Network Common Library
5
5
  License: MIT
6
6
  Classifier: Programming Language :: Python :: 3
@@ -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:`.Params`.
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
- if self.__params is not None:
167
- return self.__params
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=deepcopy(cargs),
176
+ dict2=self.cargs,
175
177
  force=True)
176
178
 
177
- self.__params = (
178
- self.__model(**merged))
179
+ params = self.model(**merged)
180
+
181
+
182
+ self.__params = params
179
183
 
180
- return self.__params
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 `.Config` object.
54
- :param enlogger: Configuration for the `.Logger` object.
55
- :param encrypts: Configuration for the `.Crypts` object.
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', ['one', 'two'])
26
+ >>> rgxp_match('one', ['on*', 'two'])
27
27
  True
28
28
 
29
29
  Example
30
30
  -------
31
- >>> rgxp_match('uno', ['one', 'two'])
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', ['one', 'two'])
89
+ >>> rgxp_match('one', ['on[a-z]', 'two'])
90
90
  True
91
91
 
92
92
  Example
93
93
  -------
94
- >>> rgxp_match('uno', ['one', 'two'])
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: encommon
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Enasis Network Common Library
5
5
  License: MIT
6
6
  Classifier: Programming Language :: Python :: 3
@@ -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