osbot-utils 1.35.0__py3-none-any.whl → 1.36.0__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.
- osbot_utils/context_managers/capture_duration.py +11 -7
- osbot_utils/version +1 -1
- {osbot_utils-1.35.0.dist-info → osbot_utils-1.36.0.dist-info}/METADATA +2 -2
- {osbot_utils-1.35.0.dist-info → osbot_utils-1.36.0.dist-info}/RECORD +6 -6
- {osbot_utils-1.35.0.dist-info → osbot_utils-1.36.0.dist-info}/LICENSE +0 -0
- {osbot_utils-1.35.0.dist-info → osbot_utils-1.36.0.dist-info}/WHEEL +0 -0
@@ -1,12 +1,13 @@
|
|
1
|
+
from osbot_utils.base_classes.Type_Safe import Type_Safe
|
1
2
|
from osbot_utils.utils.Misc import timestamp_utc_now
|
2
3
|
|
3
4
|
|
4
|
-
class capture_duration():
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
class capture_duration(Type_Safe):
|
6
|
+
action_name : str
|
7
|
+
duration : float
|
8
|
+
start_timestamp : int
|
9
|
+
end_timestamp : int
|
10
|
+
seconds : float
|
10
11
|
|
11
12
|
def __enter__(self):
|
12
13
|
self.start_timestamp = timestamp_utc_now()
|
@@ -23,7 +24,10 @@ class capture_duration():
|
|
23
24
|
|
24
25
|
def print(self):
|
25
26
|
print()
|
26
|
-
|
27
|
+
if self.action_name:
|
28
|
+
print(f'action "{self.action_name}" took: {self.seconds} seconds')
|
29
|
+
else:
|
30
|
+
print(f'action took: {self.seconds} seconds')
|
27
31
|
|
28
32
|
class print_duration(capture_duration):
|
29
33
|
|
osbot_utils/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v1.
|
1
|
+
v1.36.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: osbot_utils
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.36.0
|
4
4
|
Summary: OWASP Security Bot - Utils
|
5
5
|
Home-page: https://github.com/owasp-sbot/OSBot-Utils
|
6
6
|
License: MIT
|
@@ -22,7 +22,7 @@ Description-Content-Type: text/markdown
|
|
22
22
|
|
23
23
|
Powerful Python util methods and classes that simplify common apis and tasks.
|
24
24
|
|
25
|
-

|
26
26
|
[](https://codecov.io/gh/owasp-sbot/OSBot-Utils)
|
27
27
|
|
28
28
|
|
@@ -6,7 +6,7 @@ osbot_utils/base_classes/Type_Safe.py,sha256=62eV2AnIAN-7VshhOpvWw0v_DZHJucLq10V
|
|
6
6
|
osbot_utils/base_classes/Type_Safe__List.py,sha256=-80C9OhsK6iDR2dAG8yNLAZV0qg5x3faqvSUigFCMJw,517
|
7
7
|
osbot_utils/base_classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
osbot_utils/context_managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
|
-
osbot_utils/context_managers/capture_duration.py,sha256=
|
9
|
+
osbot_utils/context_managers/capture_duration.py,sha256=sdWij3UJzDf1gDCogCO9RDg6Vijh1bZeeLSi3QmZeYs,1345
|
10
10
|
osbot_utils/context_managers/disable_root_loggers.py,sha256=XDMbKATcRbmUQSMKaOhk68DANVdhbBvDxj15iXjIkw0,1056
|
11
11
|
osbot_utils/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
osbot_utils/decorators/classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -287,8 +287,8 @@ osbot_utils/utils/Toml.py,sha256=dqiegndCJF7V1YT1Tc-b0-Bl6QWyL5q30urmQwMXfMQ,140
|
|
287
287
|
osbot_utils/utils/Version.py,sha256=Ww6ChwTxqp1QAcxOnztkTicShlcx6fbNsWX5xausHrg,422
|
288
288
|
osbot_utils/utils/Zip.py,sha256=riPLKkZJxQjVu8lCm19cOTx5uiLPm1HreB9_BzNXi30,12209
|
289
289
|
osbot_utils/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
290
|
-
osbot_utils/version,sha256=
|
291
|
-
osbot_utils-1.
|
292
|
-
osbot_utils-1.
|
293
|
-
osbot_utils-1.
|
294
|
-
osbot_utils-1.
|
290
|
+
osbot_utils/version,sha256=rMmpZHQMkGtmhxXxeNoUoWNY_rR9jHMl9gN-__ovf3A,8
|
291
|
+
osbot_utils-1.36.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
292
|
+
osbot_utils-1.36.0.dist-info/METADATA,sha256=QyYL2P7iaO1dC7rHFzfpsyfefApqQpbotMlC5uFhDeI,1266
|
293
|
+
osbot_utils-1.36.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
294
|
+
osbot_utils-1.36.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|