naeural-client 2.5.16__py3-none-any.whl → 2.5.21__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/_ver.py +1 -1
- naeural_client/base/generic_session.py +8 -3
- naeural_client/bc/base.py +13 -4
- {naeural_client-2.5.16.dist-info → naeural_client-2.5.21.dist-info}/METADATA +1 -1
- {naeural_client-2.5.16.dist-info → naeural_client-2.5.21.dist-info}/RECORD +8 -8
- {naeural_client-2.5.16.dist-info → naeural_client-2.5.21.dist-info}/WHEEL +0 -0
- {naeural_client-2.5.16.dist-info → naeural_client-2.5.21.dist-info}/entry_points.txt +0 -0
- {naeural_client-2.5.16.dist-info → naeural_client-2.5.21.dist-info}/licenses/LICENSE +0 -0
naeural_client/_ver.py
CHANGED
@@ -250,6 +250,8 @@ class GenericSession(BaseDecentrAIObject):
|
|
250
250
|
# end bc_engine
|
251
251
|
self.formatter_wrapper = IOFormatterWrapper(self.log, plugin_search_locations=self.__formatter_plugins_locations)
|
252
252
|
|
253
|
+
msg = f"Connection to {self._config[comm_ct.USER]}:*****@{self._config[comm_ct.HOST]}:{self._config[comm_ct.PORT]} {'<secured>' if self._config[comm_ct.SECURED] else '<UNSECURED>'}"
|
254
|
+
self.P(msg, color='y')
|
253
255
|
self._connect()
|
254
256
|
|
255
257
|
self.P("Created {} comms session '{}' from <{}> SDKv{}.".format(
|
@@ -657,8 +659,7 @@ class GenericSession(BaseDecentrAIObject):
|
|
657
659
|
if True:
|
658
660
|
def __start_blockchain(self, bc_engine, blockchain_config, user_config=False):
|
659
661
|
if bc_engine is not None:
|
660
|
-
self.bc_engine = bc_engine
|
661
|
-
self.bc_engine.set_eth_flat(self.__eth_enabled)
|
662
|
+
self.bc_engine = bc_engine
|
662
663
|
return
|
663
664
|
|
664
665
|
try:
|
@@ -668,10 +669,13 @@ class GenericSession(BaseDecentrAIObject):
|
|
668
669
|
config=blockchain_config,
|
669
670
|
verbosity=self._verbosity,
|
670
671
|
user_config=user_config,
|
671
|
-
eth_enabled=self.__eth_enabled,
|
672
|
+
eth_enabled=self.__eth_enabled,
|
672
673
|
)
|
673
674
|
except:
|
674
675
|
raise ValueError("Failure in private blockchain setup:\n{}".format(traceback.format_exc()))
|
676
|
+
|
677
|
+
# extra setup flag for re-connections with same multiton instance
|
678
|
+
self.bc_engine.set_eth_flag(self.__eth_enabled)
|
675
679
|
return
|
676
680
|
|
677
681
|
def __start_main_loop_thread(self):
|
@@ -1023,6 +1027,7 @@ class GenericSession(BaseDecentrAIObject):
|
|
1023
1027
|
if secured is not None and self._config.get(comm_ct.SECURED, None) is None:
|
1024
1028
|
secured = str(secured).strip().upper() in ['TRUE', '1']
|
1025
1029
|
self._config[comm_ct.SECURED] = secured
|
1030
|
+
|
1026
1031
|
return
|
1027
1032
|
|
1028
1033
|
def __get_node_address(self, node):
|
naeural_client/bc/base.py
CHANGED
@@ -374,7 +374,10 @@ class BaseBlockEngine:
|
|
374
374
|
return self.__name
|
375
375
|
|
376
376
|
def _init(self):
|
377
|
-
self.P(
|
377
|
+
self.P(
|
378
|
+
f"Initializing BC-engine (ETH_ENABLED={self.__eth_enabled})...",
|
379
|
+
boxed=True, box_char='*', verbosity=1
|
380
|
+
)
|
378
381
|
|
379
382
|
if True:
|
380
383
|
self.P("Initializing private blockchain:\n{}".format(
|
@@ -410,7 +413,10 @@ class BaseBlockEngine:
|
|
410
413
|
self.__eth_address = self._get_eth_address()
|
411
414
|
self.__eth_account = self._get_eth_account()
|
412
415
|
### end Ethereum
|
413
|
-
self.
|
416
|
+
if self.__eth_enabled:
|
417
|
+
self.P("Address: {} / ETH: {}".format(self.address, self.eth_address), boxed=True, verbosity=1)
|
418
|
+
else:
|
419
|
+
self.P("Address: {}".format(self.address), boxed=True, verbosity=1)
|
414
420
|
self.P("Allowed list of senders: {}".format(self.allowed_list), verbosity=1)
|
415
421
|
return
|
416
422
|
|
@@ -1224,8 +1230,11 @@ class BaseBlockEngine:
|
|
1224
1230
|
|
1225
1231
|
### Ethereum
|
1226
1232
|
|
1227
|
-
def set_eth_flag(self, value):
|
1228
|
-
self.__eth_enabled
|
1233
|
+
def set_eth_flag(self, value):
|
1234
|
+
if value != self.__eth_enabled:
|
1235
|
+
self.__eth_enabled = value
|
1236
|
+
self.log.P("Changed eth_enabled to {}".format(value), color='d')
|
1237
|
+
return
|
1229
1238
|
|
1230
1239
|
@property
|
1231
1240
|
def eth_address(self):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: naeural_client
|
3
|
-
Version: 2.5.
|
3
|
+
Version: 2.5.21
|
4
4
|
Summary: `naeural_client` is the Python SDK required for client app development for the Naeural Edge Protocol Edge Protocol framework
|
5
5
|
Project-URL: Homepage, https://github.com/NaeuralEdgeProtocol/naeural_client
|
6
6
|
Project-URL: Bug Tracker, https://github.com/NaeuralEdgeProtocol/naeural_client/issues
|
@@ -1,10 +1,10 @@
|
|
1
1
|
naeural_client/__init__.py,sha256=GP8WSrn87sjTPO-QRNL2PG8JK5Mixbiea_HrtbG8RAQ,592
|
2
|
-
naeural_client/_ver.py,sha256=
|
2
|
+
naeural_client/_ver.py,sha256=SravwvIPR1vcM9gnXJSuVUGoBIsHUZhB13pHC38waec,331
|
3
3
|
naeural_client/base_decentra_object.py,sha256=C4iwZTkhKNBS4VHlJs5DfElRYLo4Q9l1V1DNVSk1fyQ,4412
|
4
4
|
naeural_client/plugins_manager_mixin.py,sha256=X1JdGLDz0gN1rPnTN_5mJXR8JmqoBFQISJXmPR9yvCo,11106
|
5
5
|
naeural_client/base/__init__.py,sha256=hACh83_cIv7-PwYMM3bQm2IBmNqiHw-3PAfDfAEKz9A,259
|
6
6
|
naeural_client/base/distributed_custom_code_presets.py,sha256=cvz5R88P6Z5V61Ce1vHVVh8bOkgXd6gve_vdESDNAsg,2544
|
7
|
-
naeural_client/base/generic_session.py,sha256=
|
7
|
+
naeural_client/base/generic_session.py,sha256=fIEipstnB8IHpmOHdnJIB2xYvgyfx2UtGTrr4JYhzcs,88920
|
8
8
|
naeural_client/base/instance.py,sha256=kcZJmjLBtx8Bjj_ysIOx1JmLA-qSpG7E28j5rq6IYus,20444
|
9
9
|
naeural_client/base/pipeline.py,sha256=b4uNHrEIOlAtw4PGUx20dxwBhDck5__SrVXaHcSi8ZA,58251
|
10
10
|
naeural_client/base/plugin_template.py,sha256=qGaXByd_JZFpjvH9GXNbT7KaitRxIJB6-1IhbKrZjq4,138123
|
@@ -14,7 +14,7 @@ naeural_client/base/webapp_pipeline.py,sha256=QmPLVmhP0CPdi0YuvbZEH4APYz2Amtw3gy
|
|
14
14
|
naeural_client/base/payload/__init__.py,sha256=y8fBI8tG2ObNfaXFWjyWZXwu878FRYj_I8GIbHT4GKE,29
|
15
15
|
naeural_client/base/payload/payload.py,sha256=x-au7l67Z_vfn_4R2C_pjZCaFuUVXHngJiGOfIAYVdE,2690
|
16
16
|
naeural_client/bc/__init__.py,sha256=FQj23D1PrY06NUOARiKQi4cdj0-VxnoYgYDEht8lpr8,158
|
17
|
-
naeural_client/bc/base.py,sha256=
|
17
|
+
naeural_client/bc/base.py,sha256=11oGNVBUEalxqEcRNhVTl_aqSuQcVNBpmehjOM7RCtU,33055
|
18
18
|
naeural_client/bc/chain.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
19
|
naeural_client/bc/ec.py,sha256=mWjodWCRgC3omVXOA9jtNdtPVNn2kMKV3Dcjt9oFUCQ,22974
|
20
20
|
naeural_client/certs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -81,8 +81,8 @@ naeural_client/utils/__init__.py,sha256=mAnke3-MeRzz3nhQvhuHqLnpaaCSmDxicd7Ck9uw
|
|
81
81
|
naeural_client/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,1072
|
82
82
|
naeural_client/utils/config.py,sha256=aUVyi5rZjvnbUwM5mmj0E2IHvURdrlHSgleqZvJBNuU,5202
|
83
83
|
naeural_client/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
|
84
|
-
naeural_client-2.5.
|
85
|
-
naeural_client-2.5.
|
86
|
-
naeural_client-2.5.
|
87
|
-
naeural_client-2.5.
|
88
|
-
naeural_client-2.5.
|
84
|
+
naeural_client-2.5.21.dist-info/METADATA,sha256=oSTBfAYjo5_V2AxgfYLvmrQmtzCgyANDVDRDEyC9gzM,14494
|
85
|
+
naeural_client-2.5.21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
86
|
+
naeural_client-2.5.21.dist-info/entry_points.txt,sha256=PNdyotDaQBAslZREx5luVyj0kqpQnwNACwkFNTPIHU4,55
|
87
|
+
naeural_client-2.5.21.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
|
88
|
+
naeural_client-2.5.21.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|