naeural-client 2.0.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.
- naeural_client/__init__.py +13 -0
- naeural_client/_ver.py +13 -0
- naeural_client/base/__init__.py +6 -0
- naeural_client/base/distributed_custom_code_presets.py +44 -0
- naeural_client/base/generic_session.py +1763 -0
- naeural_client/base/instance.py +616 -0
- naeural_client/base/payload/__init__.py +1 -0
- naeural_client/base/payload/payload.py +66 -0
- naeural_client/base/pipeline.py +1499 -0
- naeural_client/base/plugin_template.py +5209 -0
- naeural_client/base/responses.py +209 -0
- naeural_client/base/transaction.py +157 -0
- naeural_client/base_decentra_object.py +143 -0
- naeural_client/bc/__init__.py +3 -0
- naeural_client/bc/base.py +1046 -0
- naeural_client/bc/chain.py +0 -0
- naeural_client/bc/ec.py +324 -0
- naeural_client/certs/__init__.py +0 -0
- naeural_client/certs/r9092118.ala.eu-central-1.emqxsl.com.crt +22 -0
- naeural_client/code_cheker/__init__.py +1 -0
- naeural_client/code_cheker/base.py +520 -0
- naeural_client/code_cheker/checker.py +294 -0
- naeural_client/comm/__init__.py +2 -0
- naeural_client/comm/amqp_wrapper.py +338 -0
- naeural_client/comm/mqtt_wrapper.py +539 -0
- naeural_client/const/README.md +3 -0
- naeural_client/const/__init__.py +9 -0
- naeural_client/const/base.py +101 -0
- naeural_client/const/comms.py +80 -0
- naeural_client/const/environment.py +26 -0
- naeural_client/const/formatter.py +7 -0
- naeural_client/const/heartbeat.py +111 -0
- naeural_client/const/misc.py +20 -0
- naeural_client/const/payload.py +190 -0
- naeural_client/default/__init__.py +1 -0
- naeural_client/default/instance/__init__.py +4 -0
- naeural_client/default/instance/chain_dist_custom_job_01_plugin.py +54 -0
- naeural_client/default/instance/custom_web_app_01_plugin.py +118 -0
- naeural_client/default/instance/net_mon_01_plugin.py +45 -0
- naeural_client/default/instance/view_scene_01_plugin.py +28 -0
- naeural_client/default/session/mqtt_session.py +72 -0
- naeural_client/io_formatter/__init__.py +2 -0
- naeural_client/io_formatter/base/__init__.py +1 -0
- naeural_client/io_formatter/base/base_formatter.py +80 -0
- naeural_client/io_formatter/default/__init__.py +3 -0
- naeural_client/io_formatter/default/a_dummy.py +51 -0
- naeural_client/io_formatter/default/aixp1.py +113 -0
- naeural_client/io_formatter/default/default.py +22 -0
- naeural_client/io_formatter/io_formatter_manager.py +96 -0
- naeural_client/logging/__init__.py +1 -0
- naeural_client/logging/base_logger.py +2056 -0
- naeural_client/logging/logger_mixins/__init__.py +12 -0
- naeural_client/logging/logger_mixins/class_instance_mixin.py +92 -0
- naeural_client/logging/logger_mixins/computer_vision_mixin.py +443 -0
- naeural_client/logging/logger_mixins/datetime_mixin.py +344 -0
- naeural_client/logging/logger_mixins/download_mixin.py +421 -0
- naeural_client/logging/logger_mixins/general_serialization_mixin.py +242 -0
- naeural_client/logging/logger_mixins/json_serialization_mixin.py +481 -0
- naeural_client/logging/logger_mixins/pickle_serialization_mixin.py +301 -0
- naeural_client/logging/logger_mixins/process_mixin.py +63 -0
- naeural_client/logging/logger_mixins/resource_size_mixin.py +81 -0
- naeural_client/logging/logger_mixins/timers_mixin.py +501 -0
- naeural_client/logging/logger_mixins/upload_mixin.py +260 -0
- naeural_client/logging/logger_mixins/utils_mixin.py +675 -0
- naeural_client/logging/small_logger.py +93 -0
- naeural_client/logging/tzlocal/__init__.py +20 -0
- naeural_client/logging/tzlocal/unix.py +231 -0
- naeural_client/logging/tzlocal/utils.py +113 -0
- naeural_client/logging/tzlocal/win32.py +151 -0
- naeural_client/logging/tzlocal/windows_tz.py +718 -0
- naeural_client/plugins_manager_mixin.py +273 -0
- naeural_client/utils/__init__.py +2 -0
- naeural_client/utils/comm_utils.py +44 -0
- naeural_client/utils/dotenv.py +75 -0
- naeural_client-2.0.0.dist-info/METADATA +365 -0
- naeural_client-2.0.0.dist-info/RECORD +78 -0
- naeural_client-2.0.0.dist-info/WHEEL +4 -0
- naeural_client-2.0.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
from .base import Payload
|
2
|
+
from .base import Pipeline
|
3
|
+
from .base import Instance
|
4
|
+
from .base import CustomPluginTemplate
|
5
|
+
from .base import DistributedCustomCodePresets
|
6
|
+
from .default import MqttSession as Session
|
7
|
+
from .utils import load_dotenv
|
8
|
+
from ._ver import __VER__ as version
|
9
|
+
from ._ver import __VER__ as __version__
|
10
|
+
from .base_decentra_object import BaseDecentrAIObject
|
11
|
+
from .plugins_manager_mixin import _PluginsManagerMixin
|
12
|
+
from .logging import Logger
|
13
|
+
from .code_cheker import BaseCodeChecker
|
naeural_client/_ver.py
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
__VER__ = "2.0.0"
|
2
|
+
|
3
|
+
if __name__ == "__main__":
|
4
|
+
with open("pyproject.toml", "rt") as fd:
|
5
|
+
new_lines = []
|
6
|
+
lines = fd.readlines()
|
7
|
+
for line in lines:
|
8
|
+
if "version" in line:
|
9
|
+
line = f'version = "{__VER__}"\n'
|
10
|
+
new_lines.append(line)
|
11
|
+
|
12
|
+
with open("pyproject.toml", "wt") as fd:
|
13
|
+
fd.writelines(new_lines)
|
@@ -0,0 +1,44 @@
|
|
1
|
+
class DistributedCustomCodePresets():
|
2
|
+
PROCESS_REAL_TIME_COLLECTED_DATA__KEEP_UNIQUES_IN_AGGREGATED_COLLECTED_DATA = "PROCESS_REAL_TIME_COLLECTED_DATA__KEEP_UNIQUES_IN_AGGREGATED_COLLECTED_DATA"
|
3
|
+
PROCESS_REAL_TIME_COLLECTED_DATA__KEEP_UNIQUES_IN_NODE_COLLECTED_DATA = "PROCESS_REAL_TIME_COLLECTED_DATA__KEEP_UNIQUES_IN_NODE_COLLECTED_DATA"
|
4
|
+
PROCESS_REAL_TIME_COLLECTED_DATA__KEEP_IN_NODE_COLLECTED_DATA = "PROCESS_REAL_TIME_COLLECTED_DATA__KEEP_IN_NODE_COLLECTED_DATA"
|
5
|
+
FINISH_CONDITION___EACH_NODE_COLLECTED_DATA_MORE_THAN_X = "FINISH_CONDITION___EACH_NODE_COLLECTED_DATA_MORE_THAN_X"
|
6
|
+
FINISH_CONDITION___AGGREGATED_DATA_MORE_THAN_X = "FINISH_CONDITION___AGGREGATED_DATA_MORE_THAN_X"
|
7
|
+
AGGREGATE_COLLECTED_DATA___AGGREGATE_COLLECTED_DATA = "AGGREGATE_COLLECTED_DATA___AGGREGATE_COLLECTED_DATA"
|
8
|
+
AGGREGATE_COLLECTED_DATA___COLLECTED_DATA_PER_NODE = "AGGREGATE_COLLECTED_DATA___COLLECTED_DATA_PER_NODE"
|
9
|
+
|
10
|
+
def __process_real_time_collected_data__keep_uniques_in_aggregated_collected_data(plugin, job_id, collected_data, data):
|
11
|
+
all_data = sum(collected_data.values(), [])
|
12
|
+
filtered_data = list(set(d for d in data if d not in all_data))
|
13
|
+
return filtered_data
|
14
|
+
|
15
|
+
def __process_real_time_collected_data__keep_uniques_in_node_collected_data(plugin, job_id, collected_data, data):
|
16
|
+
filtered_data = list(set(d for d in data if d not in collected_data[job_id]))
|
17
|
+
return filtered_data
|
18
|
+
|
19
|
+
def __process_real_time_collected_data__keep_in_node_collected_data(plugin, job_id, collected_data, data):
|
20
|
+
return data
|
21
|
+
|
22
|
+
def __finish_condition___each_node_collected_data_more_than_x(plugin, collected_data):
|
23
|
+
kwargs = plugin.cfg_finish_condition_kwargs
|
24
|
+
if kwargs is None:
|
25
|
+
raise Exception("`FINISH_CONDITION_KWARGS` must be set!")
|
26
|
+
x = kwargs.get("X")
|
27
|
+
if x is None:
|
28
|
+
raise Exception("`X` must be set in `FINISH_CONDITION_KWARGS`!")
|
29
|
+
return all([len(data) > x for data in collected_data])
|
30
|
+
|
31
|
+
def __finish_condition___aggregated_data_more_than_x(plugin, collected_data):
|
32
|
+
kwargs = plugin.cfg_finish_condition_kwargs
|
33
|
+
if kwargs is None:
|
34
|
+
raise Exception("`FINISH_CONDITION_KWARGS` must be set!")
|
35
|
+
x = kwargs.get("X")
|
36
|
+
if x is None:
|
37
|
+
raise Exception("`X` must be set in `FINISH_CONDITION_KWARGS`!")
|
38
|
+
return len(sum(collected_data.values(), [])) > x
|
39
|
+
|
40
|
+
def __aggregate_collected_data___aggregate_collected_data(plugin, collected_data):
|
41
|
+
return sum(collected_data.values(), [])
|
42
|
+
|
43
|
+
def __aggregate_collected_data___collected_data_per_node(plugin, collected_data):
|
44
|
+
return collected_data
|