encommon 0.7.1__py3-none-any.whl → 0.7.2__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.
encommon/config/params.py CHANGED
@@ -22,7 +22,7 @@ class ConfigParams(BaseModel, extra='forbid'):
22
22
 
23
23
  :param paths: Complete or relative path to config paths.
24
24
  :param data: Keyword arguments passed to Pydantic model.
25
- This parameter is picked up by autodoc, please ignore.
25
+ Parameter is picked up by autodoc, please ignore.
26
26
  """
27
27
 
28
28
  paths: Optional[list[str]] = None
@@ -37,7 +37,7 @@ class LoggerParams(BaseModel, extra='forbid'):
37
37
  :param file_level: Minimum log message severity level.
38
38
  :param file_path: Enables writing to the filesystem path.
39
39
  :param data: Keyword arguments passed to Pydantic model.
40
- This parameter is picked up by autodoc, please ignore.
40
+ Parameter is picked up by autodoc, please ignore.
41
41
  """
42
42
 
43
43
  stdo_level: Optional[LOGLEVELS] = None
@@ -54,7 +54,7 @@ class Params(BaseModel, extra='forbid'):
54
54
  :param enlogger: Configuration for the `.Logger` object.
55
55
  :param encrypts: Configuration for the `.Crypts` object.
56
56
  :param data: Keyword arguments passed to Pydantic model.
57
- This parameter is picked up by autodoc, please ignore.
57
+ Parameter is picked up by autodoc, please ignore.
58
58
  """
59
59
 
60
60
  enconfig: Optional[ConfigParams] = None
@@ -4,3 +4,13 @@ Functions and routines associated with Enasis Network Common Library.
4
4
  This file is part of Enasis Network software eco-system. Distribution
5
5
  is permitted, for more information consult the project license file.
6
6
  """
7
+
8
+
9
+
10
+ from pathlib import Path
11
+
12
+
13
+
14
+ SAMPLES = (
15
+ Path(__file__).parent
16
+ .joinpath('samples'))
@@ -9,6 +9,7 @@ is permitted, for more information consult the project license file.
9
9
 
10
10
  from pathlib import Path
11
11
 
12
+ from . import SAMPLES
12
13
  from ..config import Config
13
14
  from ..logger import Logger
14
15
  from ..params import Params
@@ -19,12 +20,6 @@ from ...utils.sample import prep_sample
19
20
 
20
21
 
21
22
 
22
- SAMPLES = (
23
- Path(__file__).parent
24
- .joinpath('samples'))
25
-
26
-
27
-
28
23
  def test_Config( # noqa: CFQ001
29
24
  config_path: Path,
30
25
  ) -> None:
@@ -9,6 +9,7 @@ is permitted, for more information consult the project license file.
9
9
 
10
10
  from pathlib import Path
11
11
 
12
+ from . import SAMPLES
12
13
  from ..files import ConfigFile
13
14
  from ..files import ConfigFiles
14
15
  from ... import ENPYRWS
@@ -17,12 +18,6 @@ from ...utils.sample import prep_sample
17
18
 
18
19
 
19
20
 
20
- SAMPLES = (
21
- Path(__file__).parent
22
- .joinpath('samples'))
23
-
24
-
25
-
26
21
  def test_ConfigFile(
27
22
  config_path: Path,
28
23
  ) -> None:
@@ -9,6 +9,7 @@ is permitted, for more information consult the project license file.
9
9
 
10
10
  from pathlib import Path
11
11
 
12
+ from . import SAMPLES
12
13
  from ..paths import ConfigPath
13
14
  from ..paths import ConfigPaths
14
15
  from ... import ENPYRWS
@@ -17,12 +18,6 @@ from ...utils.sample import prep_sample
17
18
 
18
19
 
19
20
 
20
- SAMPLES = (
21
- Path(__file__).parent
22
- .joinpath('samples'))
23
-
24
-
25
-
26
21
  def test_ConfigPath(
27
22
  config_path: Path,
28
23
  ) -> None:
encommon/crypts/params.py CHANGED
@@ -15,7 +15,9 @@ class CryptsParams(BaseModel, extra='forbid'):
15
15
  """
16
16
  Process and validate the common configuration parameters.
17
17
 
18
+ :param phrases: Passphrases that are used in operations.
18
19
  :param data: Keyword arguments passed to Pydantic model.
20
+ Parameter is picked up by autodoc, please ignore.
19
21
  """
20
22
 
21
23
  phrases: dict[str, str]
@@ -63,6 +63,7 @@ def test_Times() -> None:
63
63
  assert times.subsec == UNIXMPOCH
64
64
  assert times.human == UNIXHPOCH
65
65
  assert times.elapsed >= 1672531200
66
+ assert times.since >= 1672531200
66
67
 
67
68
  assert times.before == (
68
69
  '1969-12-31T23:59:59.999999Z')
encommon/times/times.py CHANGED
@@ -346,6 +346,19 @@ class Times:
346
346
  return since_time(self.__source)
347
347
 
348
348
 
349
+ @property
350
+ def since(
351
+ self,
352
+ ) -> float:
353
+ """
354
+ Determine the time in seconds that occured since instance.
355
+
356
+ :returns: Time in seconds that occured between the values.
357
+ """
358
+
359
+ return since_time(self.__source)
360
+
361
+
349
362
  @property
350
363
  def before(
351
364
  self,
encommon/utils/stdout.py CHANGED
@@ -178,11 +178,16 @@ def array_ansi( # noqa: CFQ001, CFQ004
178
178
  This massive function should be refactored, possibly
179
179
  into a class with methods where there are functions.
180
180
 
181
+ Example
182
+ -------
183
+ >>> array_ansi({'foo': 'bar'})
184
+ "\\x1b[0;97mfoo\\x1b[0;37m:\\x1b[0;0m...
185
+
181
186
  :param source: Value in supported and iterable formats.
182
187
  :param indent: How many levels for initial indentation.
183
188
  :param colors: Determine colors used with different types.
184
189
  :returns: ANSI colorized string using inline directives.
185
- """
190
+ """ # noqa: D301 LIT102
186
191
 
187
192
  output: list[str] = []
188
193
 
encommon/version.txt CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.7.2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: encommon
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: Enasis Network Common Library
5
5
  License: MIT
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,24 +1,24 @@
1
1
  encommon/__init__.py,sha256=VoXUcphq-gcXCraaU47EtXBftF6UVuQPMGr0fuCTt9A,525
2
2
  encommon/conftest.py,sha256=z5BMi6KjNuactDRgbh8J8w81V08Ptf6QK2o_bJANRs4,880
3
3
  encommon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- encommon/version.txt,sha256=kCMRx7s4-hZY_0A972FY7nN4_p1uLihPocOHNcMb0ws,6
4
+ encommon/version.txt,sha256=0BdnGL0hTOhHTAbtYcOVyhE_38Ks3YbZqpkztA2bVh4,6
5
5
  encommon/config/__init__.py,sha256=2ic7tK2lOQvqWmmQnMozqxCJcbyQ_sSEHmOUDUFan2U,710
6
6
  encommon/config/common.py,sha256=gaKBgkF7b7UIAhd0ESio0KpG8JfdRpz5BxNgKRptd6A,2041
7
7
  encommon/config/config.py,sha256=-wIkyA6YQGAly0WuXLaOYXENjZYRYgWk_VdUN8mMe8Q,4853
8
8
  encommon/config/files.py,sha256=2DHz7GKOjF8FC26tY0V-E9svNMrlkSUshb2gfxqGgSo,2313
9
9
  encommon/config/logger.py,sha256=jtxqmpFLDFEfWyfpgiOmHEavEfuWUOdehAk32ce8slA,13662
10
- encommon/config/params.py,sha256=IWQ-UzR8x6VxkcUddC3qhI612IFMfLW44jEjRePXK0c,1825
10
+ encommon/config/params.py,sha256=414LgESo-Q6htZmXrVPvkjM2y7b-hT88z0uZ-jFbAuQ,1810
11
11
  encommon/config/paths.py,sha256=0EpXWn6G9IO6tuZTrWuDq53RI5xMTgDQrAlOjRLILHs,2433
12
- encommon/config/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
12
+ encommon/config/test/__init__.py,sha256=i0JAeRcM-0YH2StGfwpaDbZV9dVribNSgFDcYcPPay8,313
13
13
  encommon/config/test/test_common.py,sha256=U6XWfCLxtLmArn8P6h4cmCALzdXxV7IMUxKNU-UhwPw,731
14
- encommon/config/test/test_config.py,sha256=SMe8ZrHRVS7jcyoFB-jBmlYTdUkBT1RrjZ9QlAW1EtE,3292
15
- encommon/config/test/test_files.py,sha256=OlGziUPV35yrdn2Ac8tuqmFfjHciWJADdQRvacoJNUc,2298
14
+ encommon/config/test/test_config.py,sha256=o-FYIDgLWLlKjCRSMzRWOihqXAzmwsycq3yFZlwzYeU,3247
15
+ encommon/config/test/test_files.py,sha256=qO9B3-36H4einZrtHqRx4-ssIqwP7XSsre0PHM4mD2g,2253
16
16
  encommon/config/test/test_logger.py,sha256=6SO_iCTGDHZYnITVEyN4Q15bho2TYVxmNxDr-t3-_Ak,4740
17
- encommon/config/test/test_paths.py,sha256=vNWYqiN_wNuFCu1HHEekoJdGGJyRlucDBZTAspwxWhc,2107
17
+ encommon/config/test/test_paths.py,sha256=PWshb90ckowQDZPsQRQHGHni_r0yqdjf7yd2FKxqLcQ,2062
18
18
  encommon/crypts/__init__.py,sha256=7tNT1KqdYaVTLMKJazQGBULe8RpxD4MJoJi8nGMZixw,318
19
19
  encommon/crypts/crypts.py,sha256=Av6kb9xSvj8mVMxZW8J_PuzBWV24Rw-fOFR9OKW-oH4,3158
20
20
  encommon/crypts/hashes.py,sha256=p_o8IIznBBHtYJYvI1YPEsmDS_BsE-ufNE99QQog8pk,3145
21
- encommon/crypts/params.py,sha256=GLaU6gnxmSPnbpxYqrnWqfVlX8bl4pCbIAzoHMPYc48,471
21
+ encommon/crypts/params.py,sha256=7hh7a7VtsQNqcZHeSkQI_V4JLfoe0D-JyqrIvtoq86c,590
22
22
  encommon/crypts/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
23
23
  encommon/crypts/test/test_crypts.py,sha256=QDhIUVzn-n5z9tk1ZPXbZ4pBx0CRtcfqIyESYVB0kbU,2433
24
24
  encommon/crypts/test/test_hashes.py,sha256=Spixpx2qBi6iSJ8aNgmnNtz04JofUpwU-a_UjpRoiHA,1206
@@ -27,14 +27,14 @@ encommon/times/common.py,sha256=xLB_GLahYKT-YrVq90RUzmiodJQ4__1YihgZZTnadgg,2506
27
27
  encommon/times/duration.py,sha256=8p-L9OItO80nnd35FYrAXbiUS8RJzavI21lXBrtLaH0,9872
28
28
  encommon/times/parse.py,sha256=ZzranxftlB6bZJ1ivkoUxD53TUfXDDUdpq9jsSJN-88,6411
29
29
  encommon/times/timers.py,sha256=yOVr6deGE5iatNWUwNQCzaXjMlLeYlolx4MmKT0MSHc,6312
30
- encommon/times/times.py,sha256=Dfu6ztUsV4X4vHzOC7ds8jtYy0AVj4_R5xB6H-yzemE,9432
30
+ encommon/times/times.py,sha256=xD2sRIAhjWgNE4xNE04nKfi00_eW3snZtMMhQU6ovIc,9694
31
31
  encommon/times/window.py,sha256=Fx_OJfU9B0IctCyaJ5XH_HxzhGlzeRATwuhI-HlsTPA,8023
32
32
  encommon/times/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
33
33
  encommon/times/test/test_common.py,sha256=nizxgB1scLDEm2o66waK1Ar_Dl5BBMTC-GRV7iDk0_U,1477
34
34
  encommon/times/test/test_duration.py,sha256=rmAhW2otHzQDHF0mBSETHnnL2OSbeAFYEHpDlaUSRnI,3901
35
35
  encommon/times/test/test_parse.py,sha256=TuZG_UbIEez4Ww35vdKIie_yaKp-PiUhsNmr1ZUoGvo,4308
36
36
  encommon/times/test/test_timers.py,sha256=z-ONyKtkAZ1A7w8qgpgx07r-Vsl5jY-pe2oneSF7hyo,2314
37
- encommon/times/test/test_times.py,sha256=DJBmRHCPkMLL9-bmc2DMhhf8zcr2rsTVAAQPavD_UmE,1986
37
+ encommon/times/test/test_times.py,sha256=aI3bsTPuZqVCNgKH45lGR7TVMD4nxzZlQJ5X8_3VO0Y,2023
38
38
  encommon/times/test/test_window.py,sha256=EWjXR8XREYwKrH-221CBAUwLF9GpvHtuF_CSMdQtUXI,4735
39
39
  encommon/types/__init__.py,sha256=l2WKtDs6uC9I3dIGnrzJvz-4JLEETUJOfT509XyMQWs,420
40
40
  encommon/types/dicts.py,sha256=zJbfAsL1uiqfouBQrQgcYGoLowtkUd-Vm9536_DVK_E,2208
@@ -49,14 +49,14 @@ encommon/utils/common.py,sha256=UrowELh3PtDzpSS48nGhsAxTS_QUk96-KEJa4MlxiMA,466
49
49
  encommon/utils/match.py,sha256=4L2d2Cvr7vp3odkRCdNQ10OIW8DkEP55_NbQ6bdsReo,2462
50
50
  encommon/utils/paths.py,sha256=4EeaPsVwpv3pzoHeWmiSSGYZEud6hkD27kvbvgSpOPs,3236
51
51
  encommon/utils/sample.py,sha256=hOhS6A2aB9a5kXfrst7gUSQkxuqEo2J1AFyBsJZQhHE,3169
52
- encommon/utils/stdout.py,sha256=coGmpw9Wljxy-m3jI6AAUwhuGJPnxJXykz3uVWlwak0,7234
52
+ encommon/utils/stdout.py,sha256=rmesIjpmzpMdV660qZWzVqToPCs4IZNpvPHaTi6i73Y,7360
53
53
  encommon/utils/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
54
54
  encommon/utils/test/test_match.py,sha256=QagKpTFdRo23-Y55fSaJrSMpt5jIebScKbz0h8tivrI,1124
55
55
  encommon/utils/test/test_paths.py,sha256=0ls9gWJ2B487Dr1fHDDFCZPA7gxtv56nFEYHrTkNX-U,1892
56
56
  encommon/utils/test/test_sample.py,sha256=iNV9IxXmA5KJat3jKRiZH3iutHrT6bsibwti60AhICk,1464
57
57
  encommon/utils/test/test_stdout.py,sha256=TA7xQuFoPZUYW2l00e04MGp4P9gHkkVxVflvPlhpQXg,4878
58
- encommon-0.7.1.dist-info/LICENSE,sha256=otnXKCtMjPlbHs0wgZ_BWULrp3g_2dWQJ6icRk9nkgg,1071
59
- encommon-0.7.1.dist-info/METADATA,sha256=NW58CHjQymcfLpmbdHWOMJVbIbxX2T_5wD4qDPs9Ctk,2671
60
- encommon-0.7.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
61
- encommon-0.7.1.dist-info/top_level.txt,sha256=bP8q7-5tLDNm-3XPlqn_bDENfYNug5801H_xfz3BEAM,9
62
- encommon-0.7.1.dist-info/RECORD,,
58
+ encommon-0.7.2.dist-info/LICENSE,sha256=otnXKCtMjPlbHs0wgZ_BWULrp3g_2dWQJ6icRk9nkgg,1071
59
+ encommon-0.7.2.dist-info/METADATA,sha256=PJD8NnrD4Q7aOjXUME3gtyyJPXS6H3ZOYNRPpJjKOHc,2671
60
+ encommon-0.7.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
61
+ encommon-0.7.2.dist-info/top_level.txt,sha256=bP8q7-5tLDNm-3XPlqn_bDENfYNug5801H_xfz3BEAM,9
62
+ encommon-0.7.2.dist-info/RECORD,,