naeural-client 2.6.22__py3-none-any.whl → 2.6.24__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 CHANGED
@@ -1,4 +1,4 @@
1
- __VER__ = "2.6.22"
1
+ __VER__ = "2.6.24"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
@@ -2272,10 +2272,9 @@ class GenericSession(BaseDecentrAIObject):
2272
2272
 
2273
2273
  """
2274
2274
 
2275
- ngrok_use_api = True
2275
+ ngrok_use_api = kwargs.pop('ngrok_use_api', True)
2276
2276
  use_ngrok = True
2277
2277
  kwargs.pop('use_ngrok', None)
2278
- kwargs.pop('ngrok_use_api', None)
2279
2278
 
2280
2279
  if ngrok_edge_label is None:
2281
2280
  raise ValueError("The `ngrok_edge_label` parameter is mandatory when creating a balanced web app, in order for all instances to respond to the same URL.")
@@ -2664,6 +2663,7 @@ class GenericSession(BaseDecentrAIObject):
2664
2663
  supervisor=None,
2665
2664
  df_only=False,
2666
2665
  debug=False,
2666
+ eth=False,
2667
2667
  ):
2668
2668
  """
2669
2669
  This function will return a Pandas dataframe known nodes in the network based on
@@ -2694,6 +2694,10 @@ class GenericSession(BaseDecentrAIObject):
2694
2694
  df_only : bool, optional
2695
2695
  If True, will return only the Pandas dataframe. Defaults to False.
2696
2696
 
2697
+
2698
+ eth: bool, optional
2699
+ If True, will use the nodes eth addresses instead of internal. Defaults to False.
2700
+
2697
2701
  Returns
2698
2702
  -------
2699
2703
 
@@ -2768,6 +2772,8 @@ class GenericSession(BaseDecentrAIObject):
2768
2772
  # again self.get_node_name(best_super) might not work if using the hb data
2769
2773
  best_super_alias = node_info.get(PAYLOAD_DATA.NETMON_EEID, None)
2770
2774
  val = self.bc_engine._add_prefix(val)
2775
+ if eth:
2776
+ val = self.bc_engine.node_address_to_eth_address(val)
2771
2777
  elif key == PAYLOAD_DATA.NETMON_WHITELIST:
2772
2778
  val = client_is_allowed
2773
2779
  elif key in [PAYLOAD_DATA.NETMON_STATUS_KEY, PAYLOAD_DATA.NETMON_NODE_VERSION]:
@@ -16,7 +16,8 @@ CLI_COMMANDS = {
16
16
  "--all": "Get all known nodes including those that have been gone missing (flag)", # DONE
17
17
  "--online" : "Get only online nodes as seen by a active supervisor (flag)", # DONE
18
18
  "--peered": "Get only peered nodes - ie nodes that can be used by current client address (flag)", # DONE
19
- "--supervisor" : "Use a specific supervisor node"
19
+ "--supervisor" : "Use a specific supervisor node",
20
+ "--eth": "Use a specific node (flag)",
20
21
  }
21
22
  },
22
23
  "supervisors": {
@@ -10,6 +10,7 @@ def _get_netstats(
10
10
  supervisor=None,
11
11
  supervisors_only=False,
12
12
  return_session=False,
13
+ eth=False,
13
14
  ):
14
15
  t1 = time()
15
16
  from naeural_client import Session
@@ -17,6 +18,7 @@ def _get_netstats(
17
18
  dct_info = sess.get_network_known_nodes(
18
19
  online_only=online_only, allowed_only=allowed_only, supervisor=supervisor,
19
20
  supervisors_only=supervisors_only,
21
+ eth=eth,
20
22
  )
21
23
  df = dct_info[SESSION_CT.NETSTATS_REPORT]
22
24
  supervisor = dct_info[SESSION_CT.NETSTATS_REPORTER]
@@ -47,6 +49,7 @@ def get_nodes(args):
47
49
  online_only=args.online or args.peered,
48
50
  allowed_only=args.peered,
49
51
  supervisor=supervisor_addr,
52
+ eth=args.eth,
50
53
  )
51
54
  df, supervisor, super_alias, nr_supers, elapsed = res
52
55
  if args.online:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: naeural_client
3
- Version: 2.6.22
3
+ Version: 2.6.24
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
@@ -93,9 +93,9 @@ docker run -d --name=r1node naeural/edge_node:develop
93
93
  if you want to have a persistent volume for the node, you can use the following command:
94
94
 
95
95
  ```bash
96
- docker run -d --name=r1node -v r1vol:/edge_node/_local_cache naeural/edge_node:develop
96
+ docker run -d --name=r1node --rm --pull=always -v r1vol:/edge_node/_local_cache naeural/edge_node:develop
97
97
  ```
98
- This way the node will store its data in the `r1vol` volume, and you can stop and start the node without losing data you might have stored in the node via deployed jobs from your SDK.
98
+ This way the node will store its data in the `r1vol` volume, and you can stop and start the node without losing data you might have stored in the node via deployed jobs from your SDK. We also added the `--pull=always` flag to ensure that the latest version of the node is always pulled from the Docker Hub.
99
99
 
100
100
  After a few seconds, the node will be online. Retrieve the node's address by running:
101
101
 
@@ -1,10 +1,10 @@
1
1
  naeural_client/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
2
- naeural_client/_ver.py,sha256=uV6NtleXBwDxC6_Df2f6tFuRoR4ewO0-kBc_XsfmyC0,331
2
+ naeural_client/_ver.py,sha256=sWoUittCitgXSrjKA9XzssfGD3VSmC7d_xj1j4vyhww,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=Vw08ywfW03aN0_5kmXOF5-VkRthl7FwAXqJu3M3NDMs,104275
7
+ naeural_client/base/generic_session.py,sha256=IrZqKNGrlyuNnncKzJkCzvreSFwRgalMH-LpLHZ-54Q,104513
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
@@ -21,8 +21,8 @@ naeural_client/certs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
21
21
  naeural_client/certs/r9092118.ala.eu-central-1.emqxsl.com.crt,sha256=y-6io0tseyx9-a4Pmde1z1gPULtJNSYUpG_YFkYaMKU,1337
22
22
  naeural_client/cli/README.md,sha256=WPdI_EjzAbUW1aPyj1sSR8rLydcJKZtoiaEtklQrjHo,74
23
23
  naeural_client/cli/cli.py,sha256=c0ZavVwArQEGv8tueTnz3aGKTuUe6Sqmm5oTUFUVIUE,3816
24
- naeural_client/cli/cli_commands.py,sha256=VffU1tpG1CGae6z4GtcAdktAlEAfIiXq9n2oHAx1kAI,1944
25
- naeural_client/cli/nodes.py,sha256=9KA-O6C6fwNEx2Cu9rPBXC_ijU4J6ucZcnPw7ubc7bc,4785
24
+ naeural_client/cli/cli_commands.py,sha256=rORdskjcuWkoJ0VJH8Ednfp-b2_SX-xZ6B-cO6KLAPQ,2012
25
+ naeural_client/cli/nodes.py,sha256=SYWe58F7ygxr2EpEJjh6b_VDvEEEnxwiw7SmAqQggn8,4829
26
26
  naeural_client/code_cheker/__init__.py,sha256=pwkdeZGVL16ZA4Qf2mRahEhoOvKhL7FyuQbMFLr1E5M,33
27
27
  naeural_client/code_cheker/base.py,sha256=lT5DRIFO5rqzsMNCmdMRfkAeevmezozehyfgmhnKpuI,19074
28
28
  naeural_client/code_cheker/checker.py,sha256=QWupeM7ToancVIq1tRUxRNUrI8B5l5eoY0kDU4-O5aE,7365
@@ -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=v7xHikr6Z5Sbvf3opYeMhYzGWD2pe0HlRwa-aGJzUh8,6323
83
83
  naeural_client/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
84
- naeural_client-2.6.22.dist-info/METADATA,sha256=paBqYhJ3UWNkCe2pDDziqCRhH1vBqX4HVCBzk06vafc,11764
85
- naeural_client-2.6.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
86
- naeural_client-2.6.22.dist-info/entry_points.txt,sha256=PNdyotDaQBAslZREx5luVyj0kqpQnwNACwkFNTPIHU4,55
87
- naeural_client-2.6.22.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
88
- naeural_client-2.6.22.dist-info/RECORD,,
84
+ naeural_client-2.6.24.dist-info/METADATA,sha256=-GGBISabxTk3Z4p7zbfqAlYRm4K7eAmqa-9q5tl7q6U,11906
85
+ naeural_client-2.6.24.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
86
+ naeural_client-2.6.24.dist-info/entry_points.txt,sha256=PNdyotDaQBAslZREx5luVyj0kqpQnwNACwkFNTPIHU4,55
87
+ naeural_client-2.6.24.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
88
+ naeural_client-2.6.24.dist-info/RECORD,,