osbot-utils 1.81.0__py3-none-any.whl → 1.82.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/base_classes/Type_Safe.py +2 -0
- osbot_utils/helpers/generators/Generator_Manager.py +16 -0
- osbot_utils/version +1 -1
- {osbot_utils-1.81.0.dist-info → osbot_utils-1.82.0.dist-info}/METADATA +2 -2
- {osbot_utils-1.81.0.dist-info → osbot_utils-1.82.0.dist-info}/RECORD +7 -7
- {osbot_utils-1.81.0.dist-info → osbot_utils-1.82.0.dist-info}/LICENSE +0 -0
- {osbot_utils-1.81.0.dist-info → osbot_utils-1.82.0.dist-info}/WHEEL +0 -0
@@ -8,6 +8,7 @@ from osbot_utils.helpers.Random_Guid import Random_Gu
|
|
8
8
|
from osbot_utils.helpers.generators.Generator_Context_Manager import Generator_Context_Manager
|
9
9
|
from osbot_utils.helpers.generators.Model__Generator_State import Model__Generator_State
|
10
10
|
from osbot_utils.helpers.generators.Model__Generator_Target import Model__Generator_Target
|
11
|
+
from osbot_utils.utils.Lists import list_group_by
|
11
12
|
|
12
13
|
|
13
14
|
class Generator_Manager(Type_Safe): # Class for managing multiple generator targets
|
@@ -92,6 +93,21 @@ class Generator_Manager(Type_Safe):
|
|
92
93
|
stopped_count += 1 # Increment the stopped count if successful
|
93
94
|
return stopped_count # Return the total number of stopped generators
|
94
95
|
|
96
|
+
def status(self):
|
97
|
+
items = []
|
98
|
+
for _, generator in self.generators.items():
|
99
|
+
item = dict(target_method_name = generator.target.__name__,
|
100
|
+
target_state = generator.state.value,
|
101
|
+
target_id = generator.target_id )
|
102
|
+
items.append(item)
|
103
|
+
items__by_state = list_group_by(items, 'target_state')
|
104
|
+
result = {}
|
105
|
+
for state, items in items__by_state.items():
|
106
|
+
result[state] = len(items)
|
107
|
+
result['data'] = items__by_state
|
108
|
+
return result
|
109
|
+
|
110
|
+
|
95
111
|
def target_id(self, target: GeneratorType) -> Union[Random_Guid, None]: # Method to get the ID of a specific generator
|
96
112
|
with self.lock: # Acquire the lock for thread-safe access
|
97
113
|
for generator in list(self.generators.values()): # Iterate over the generator targets
|
osbot_utils/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v1.
|
1
|
+
v1.82.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: osbot_utils
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.82.0
|
4
4
|
Summary: OWASP Security Bot - Utils
|
5
5
|
Home-page: https://github.com/owasp-sbot/OSBot-Utils
|
6
6
|
License: MIT
|
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
|
|
23
23
|
|
24
24
|
Powerful Python util methods and classes that simplify common apis and tasks.
|
25
25
|
|
26
|
-

|
27
27
|
[](https://codecov.io/gh/owasp-sbot/OSBot-Utils)
|
28
28
|
|
29
29
|
|
@@ -2,7 +2,7 @@ osbot_utils/__init__.py,sha256=DdJDmQc9zbQUlPVyTJOww6Ixrn9n4bD3ami5ItQfzJI,16
|
|
2
2
|
osbot_utils/base_classes/Cache_Pickle.py,sha256=kPCwrgUbf_dEdxUz7vW1GuvIPwlNXxuRhb-H3AbSpII,5884
|
3
3
|
osbot_utils/base_classes/Kwargs_To_Disk.py,sha256=HHoy05NC_w35WcT-OnSKoSIV_cLqaU9rdjH0_KNTM0E,1096
|
4
4
|
osbot_utils/base_classes/Kwargs_To_Self.py,sha256=weFNsBfBNV9W_qBkN-IdBD4yYcJV_zgTxBRO-ZlcPS4,141
|
5
|
-
osbot_utils/base_classes/Type_Safe.py,sha256=
|
5
|
+
osbot_utils/base_classes/Type_Safe.py,sha256=ozt5ydM6iHKX-Xkj_h3CJQ0QhUFf91xEWkUL3vANBLU,22454
|
6
6
|
osbot_utils/base_classes/Type_Safe__List.py,sha256=iWyoc2xjHkTJrZTVnPse9Rljte2tF67oNq8yA7jnAhY,5996
|
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
|
@@ -170,7 +170,7 @@ osbot_utils/helpers/flows/models/Flow_Run__Event_Data.py,sha256=Xvv_vtOL-siSdt5n
|
|
170
170
|
osbot_utils/helpers/flows/models/Flow_Run__Event_Type.py,sha256=-iHKNQ-Ar2UfiCraFYQNHdBQ9fNcTTRoh3kRpXRS_Gc,375
|
171
171
|
osbot_utils/helpers/flows/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
172
172
|
osbot_utils/helpers/generators/Generator_Context_Manager.py,sha256=STpCn2Zh5G2TmyYMjeLMjfpkSYUUeU6mzV_O6Hu4g4Q,863
|
173
|
-
osbot_utils/helpers/generators/Generator_Manager.py,sha256=
|
173
|
+
osbot_utils/helpers/generators/Generator_Manager.py,sha256=eQzyZVxZjglzPmoxLJ7ib1pD8187YcKBIr7mljpSUF4,11731
|
174
174
|
osbot_utils/helpers/generators/Model__Generator_State.py,sha256=cS9tigdBIAvexip2VC8B0meegslzlu-cOosTDiEpe54,903
|
175
175
|
osbot_utils/helpers/generators/Model__Generator_Target.py,sha256=JKa_PEQeVNZDSMBAobADaor4zXAhM_XWPHrQ2NMApZs,819
|
176
176
|
osbot_utils/helpers/generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -311,8 +311,8 @@ osbot_utils/utils/Toml.py,sha256=-_Yv5T8ZhGGoDSSoNEdFhSsXiK_JPjGkPijm4JoeHSk,166
|
|
311
311
|
osbot_utils/utils/Version.py,sha256=Ww6ChwTxqp1QAcxOnztkTicShlcx6fbNsWX5xausHrg,422
|
312
312
|
osbot_utils/utils/Zip.py,sha256=pR6sKliUY0KZXmqNzKY2frfW-YVQEVbLKiyqQX_lc-8,14052
|
313
313
|
osbot_utils/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
314
|
-
osbot_utils/version,sha256=
|
315
|
-
osbot_utils-1.
|
316
|
-
osbot_utils-1.
|
317
|
-
osbot_utils-1.
|
318
|
-
osbot_utils-1.
|
314
|
+
osbot_utils/version,sha256=e35OcH4nQ1oWf1FG09fvfF_3Ok_im-bbOEnUGv2vOi0,8
|
315
|
+
osbot_utils-1.82.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
316
|
+
osbot_utils-1.82.0.dist-info/METADATA,sha256=xKqrIfMr1ibNv8sycCvTDPeSYEHhChKdpwk-ioqvzFs,1317
|
317
|
+
osbot_utils-1.82.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
318
|
+
osbot_utils-1.82.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|