osbot-utils 1.59.0__py3-none-any.whl → 1.60.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/helpers/flows/Flow.py +11 -1
- osbot_utils/utils/Misc.py +2 -0
- osbot_utils/version +1 -1
- {osbot_utils-1.59.0.dist-info → osbot_utils-1.60.0.dist-info}/METADATA +2 -2
- {osbot_utils-1.59.0.dist-info → osbot_utils-1.60.0.dist-info}/RECORD +7 -7
- {osbot_utils-1.59.0.dist-info → osbot_utils-1.60.0.dist-info}/LICENSE +0 -0
- {osbot_utils-1.59.0.dist-info → osbot_utils-1.60.0.dist-info}/WHEEL +0 -0
@@ -32,6 +32,7 @@ class Flow(Type_Safe):
|
|
32
32
|
flow_args : tuple
|
33
33
|
flow_kwargs : dict
|
34
34
|
flow_return_value : typing.Any
|
35
|
+
flow_run_params : dict
|
35
36
|
logger : Python_Logger
|
36
37
|
cformat : CFormat
|
37
38
|
executed_tasks : typing.List
|
@@ -67,8 +68,10 @@ class Flow(Type_Safe):
|
|
67
68
|
def execute(self):
|
68
69
|
return self.execute_flow()
|
69
70
|
|
70
|
-
def execute_flow(self):
|
71
|
+
def execute_flow(self, flow_run_params=None): # todo: see if it makes more sense to call this start_flow_run
|
71
72
|
flow_events.on__flow__start(self)
|
73
|
+
self.set_flow_run_params(flow_run_params)
|
74
|
+
|
72
75
|
if self.flow_config.log_to_memory:
|
73
76
|
self.logger.add_memory_logger() # todo: move to method that does pre-execute tasks
|
74
77
|
|
@@ -206,6 +209,13 @@ class Flow(Type_Safe):
|
|
206
209
|
self.flow_name = self.flow_target.__name__
|
207
210
|
else:
|
208
211
|
self.flow_name = self.random_flow_name()
|
212
|
+
|
213
|
+
def set_flow_run_params(self, flow_run_params=None):
|
214
|
+
if flow_run_params:
|
215
|
+
self.flow_run_params = flow_run_params
|
216
|
+
self.log_info(f"flow_run_params: {flow_run_params}")
|
217
|
+
self.add_flow_artifact(description="Data received via FastAPI's request.json()", key='post-data', data=flow_run_params)
|
218
|
+
|
209
219
|
def setup(self):
|
210
220
|
with self as _:
|
211
221
|
_.cformat.auto_bold = True
|
osbot_utils/utils/Misc.py
CHANGED
@@ -131,6 +131,8 @@ def date_today():
|
|
131
131
|
def list_set(target: object) -> object:
|
132
132
|
if hasattr(target, '__iter__'):
|
133
133
|
return sorted(list(set(target)))
|
134
|
+
if hasattr(target, '__dict__'):
|
135
|
+
return list_set(target.__dict__)
|
134
136
|
return []
|
135
137
|
|
136
138
|
def time_str_milliseconds(datetime_str, datetime_format, milliseconds_numbers=0):
|
osbot_utils/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v1.
|
1
|
+
v1.60.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: osbot_utils
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.60.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
|
|
@@ -154,7 +154,7 @@ osbot_utils/helpers/cache_requests/Cache__Requests__Row.py,sha256=h-yc7NkpScbHww
|
|
154
154
|
osbot_utils/helpers/cache_requests/Cache__Requests__Table.py,sha256=RgxAYhm-FIrXXteQRtD91pOLq8JXhSzxb51Jb6MTUdY,391
|
155
155
|
osbot_utils/helpers/cache_requests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
156
156
|
osbot_utils/helpers/cache_requests/flows/flow__Cache__Requests.py,sha256=xgx_oExxkcvRwQN1UCobimECIMUKGoIX5oGdCmp8Nyw,243
|
157
|
-
osbot_utils/helpers/flows/Flow.py,sha256=
|
157
|
+
osbot_utils/helpers/flows/Flow.py,sha256=dvNzrOt3hY_MkYjvl4unW9KbANda9np2gB4R0KcEhws,10176
|
158
158
|
osbot_utils/helpers/flows/Flow__Events.py,sha256=u9GzVNd08Hr49ZRIpoRDhwJnAHUFB-XzFzmNw-r3_Q0,2535
|
159
159
|
osbot_utils/helpers/flows/Task.py,sha256=ifPm0aqUG4sWAUTaYwT7ig-7Y9JmG9YTiNyC3dOX5sw,4887
|
160
160
|
osbot_utils/helpers/flows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -289,7 +289,7 @@ osbot_utils/utils/Int.py,sha256=PmlUdU4lSwf4gJdmTVdqclulkEp7KPCVUDO6AcISMF4,116
|
|
289
289
|
osbot_utils/utils/Json.py,sha256=7COxBlZRnpxtpNqpmzMPYkcKTnCok-s686nT27oiKEQ,6489
|
290
290
|
osbot_utils/utils/Json_Cache.py,sha256=mLPkkDZN-3ZVJiDvV1KBJXILtKkTZ4OepzOsDoBPhWg,2006
|
291
291
|
osbot_utils/utils/Lists.py,sha256=tPz5x5s3sRO97WZ_nsxREBPC5cwaHrhgaYBhsrffTT8,5599
|
292
|
-
osbot_utils/utils/Misc.py,sha256=
|
292
|
+
osbot_utils/utils/Misc.py,sha256=RaAqJp5hgdp513S9odNAHb9ucoHnC53RbB9OevyhrWw,16881
|
293
293
|
osbot_utils/utils/Objects.py,sha256=0XKssf_aGarfWI-2Gl-XXUb2tYglTfCBkiKa5zTF0O4,17498
|
294
294
|
osbot_utils/utils/Png.py,sha256=V1juGp6wkpPigMJ8HcxrPDIP4bSwu51oNkLI8YqP76Y,1172
|
295
295
|
osbot_utils/utils/Process.py,sha256=lr3CTiEkN3EiBx3ZmzYmTKlQoPdkgZBRjPulMxG-zdo,2357
|
@@ -302,8 +302,8 @@ osbot_utils/utils/Toml.py,sha256=SD6IA4-mrtoBXcI0dIGKV9POMQNd6WYKvmDQq7GQ6ZQ,143
|
|
302
302
|
osbot_utils/utils/Version.py,sha256=Ww6ChwTxqp1QAcxOnztkTicShlcx6fbNsWX5xausHrg,422
|
303
303
|
osbot_utils/utils/Zip.py,sha256=G6Hk_hDcm9yvWzhTKzhT0R_6f0NBIAchHqMxGb3kfh4,14037
|
304
304
|
osbot_utils/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
305
|
-
osbot_utils/version,sha256=
|
306
|
-
osbot_utils-1.
|
307
|
-
osbot_utils-1.
|
308
|
-
osbot_utils-1.
|
309
|
-
osbot_utils-1.
|
305
|
+
osbot_utils/version,sha256=Ar37hQxb9ss3OIUx_Aa9ls0fATVQiRMdEEWpUSlxr6I,8
|
306
|
+
osbot_utils-1.60.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
307
|
+
osbot_utils-1.60.0.dist-info/METADATA,sha256=QfHIdbIqSJtqYsGJ07E5myRgmUrEPIgBebNWpzI-7kY,1266
|
308
|
+
osbot_utils-1.60.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
309
|
+
osbot_utils-1.60.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|