naeural-client 3.0.0__py3-none-any.whl → 3.0.2__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__ = "3.0.0"
1
+ __VER__ = "3.0.2"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
@@ -80,7 +80,7 @@ class GenericSession(BaseDecentrAIObject):
80
80
  user=None,
81
81
  pwd=None,
82
82
  secured=None,
83
- name='pySDK',
83
+ name='R1SDK',
84
84
  encrypt_comms=True,
85
85
  config={},
86
86
  filter_workers=None,
@@ -318,18 +318,25 @@ class GenericSession(BaseDecentrAIObject):
318
318
  )
319
319
  ## end config
320
320
 
321
- self.formatter_wrapper = IOFormatterWrapper(self.log, plugin_search_locations=self.__formatter_plugins_locations)
321
+ self.formatter_wrapper = IOFormatterWrapper(
322
+ self.log, plugin_search_locations=self.__formatter_plugins_locations
323
+ )
324
+
325
+ obfuscated_pass = self._config[comm_ct.PASS][:3] + '*' * (len(self._config[comm_ct.PASS]) - 3)
322
326
 
323
- 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>'}"
327
+ msg = f"Connection to {self._config[comm_ct.USER]}:{obfuscated_pass}@{self._config[comm_ct.HOST]}:{self._config[comm_ct.PORT]} {'<secured>' if self._config[comm_ct.SECURED] else '<UNSECURED>'}"
324
328
  self.P(msg, color='y')
325
329
  self._connect()
326
330
 
327
331
  msg = f"Created comms session '{self.name}'"
328
332
  msg += f"\n - SDK: {self.log.version}"
329
333
  msg += f"\n - Address: {self.bc_engine.address}"
334
+ msg += f"\n - ETH: {self.bc_engine.eth_address}"
335
+ msg += f"\n - Network: {self.bc_engine.evm_network}"
330
336
  msg += f"\n - Server: {self._config[comm_ct.HOST]}:{self._config[comm_ct.PORT]}"
331
337
  msg += f"\n - Secured: {self._config[comm_ct.SECURED]}"
332
338
  msg += f"\n - User: {self._config[comm_ct.USER]}"
339
+ msg += f"\n - Pass: {obfuscated_pass}"
333
340
  msg += f"\n - Encrypt: {'YES' if self.encrypt_comms else 'NO'}"
334
341
  self.P(msg, color='g')
335
342
 
@@ -528,15 +528,23 @@ class R1FSEngine:
528
528
  if self.ipfs_started:
529
529
  return
530
530
 
531
+ self.P("Starting R1FS...", color='m')
532
+
531
533
  if base64_swarm_key is None:
532
534
  base64_swarm_key = os.getenv(IPFSCt.EE_SWARM_KEY_CONTENT_BASE64_ENV_KEY)
533
535
  if base64_swarm_key is not None:
534
- self.P("Found IPFS swarm key in environment variable.", color='d')
536
+ self.P(f"Found env IPFS swarm key: {str(base64_swarm_key)[:4]}...", color='d')
537
+ if len(base64_swarm_key) < 10:
538
+ self.P(f"Invalid IPFS swarm key: `{base64_swarm_key}`", color='r')
539
+ return False
535
540
 
536
541
  if ipfs_relay is None:
537
542
  ipfs_relay = os.getenv(IPFSCt.EE_IPFS_RELAY_ENV_KEY)
538
543
  if ipfs_relay is not None:
539
- self.P("Found IPFS relay in environment variable.", color='d')
544
+ self.P(f"Found env IPFS relay: {ipfs_relay}", color='d')
545
+ if len(ipfs_relay) < 10:
546
+ self.P(f"Invalid IPFS relay: `{ipfs_relay}`", color='r')
547
+ return False
540
548
 
541
549
 
542
550
  if not base64_swarm_key or not ipfs_relay:
@@ -557,6 +565,8 @@ class R1FSEngine:
557
565
  os.makedirs(ipfs_repo, exist_ok=True)
558
566
  config_path = os.path.join(ipfs_repo, "config")
559
567
  swarm_key_path = os.path.join(ipfs_repo, "swarm.key")
568
+
569
+ # TODO: maybe here we need to update swarm.key if the ~/.ipfs is volume mounted
560
570
 
561
571
  if not os.path.isfile(config_path):
562
572
  # Repository is not initialized; write the swarm key and init.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: naeural_client
3
- Version: 3.0.0
3
+ Version: 3.0.2
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=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
2
- naeural_client/_ver.py,sha256=MqerdK9jgr7au4o00knSFo3zGjY-2Lg5pJXY___ZpQA,330
2
+ naeural_client/_ver.py,sha256=Jp4pzQvoZquonZED1qdWIaCRup_j3uh5kyryYLrWmKQ,330
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=sD8vijOFS8C1RJOBwrlNOFp0S8kWLhtBuWPmWCSvKfU,115164
7
+ naeural_client/base/generic_session.py,sha256=VCJb2gni2qtqqrYn68iG0MfaqsSQVBkj_XcHV3dLngg,115453
8
8
  naeural_client/base/instance.py,sha256=kcZJmjLBtx8Bjj_ysIOx1JmLA-qSpG7E28j5rq6IYus,20444
9
9
  naeural_client/base/pipeline.py,sha256=b4BJlqZ4vsGNqYPjJD9Uzrv5G8CVYG_jbND5rh_s8E0,59702
10
10
  naeural_client/base/plugin_template.py,sha256=7YAFaND2iXoZLgtunjYkFf_TBGieFr3VdNLO3vCqzmM,138795
@@ -62,7 +62,7 @@ naeural_client/io_formatter/default/aixp1.py,sha256=MX0TeUR4APA-qN3vUC6uzcz8Pssz
62
62
  naeural_client/io_formatter/default/default.py,sha256=gEy78cP2D5s0y8vQh4aHuxqz7D10gGfuiKF311QhrpE,494
63
63
  naeural_client/ipfs/__init__.py,sha256=vXEDLUNUO6lOTMGa8iQ9Zf7ajIQq9GZuvYraAHt3meE,38
64
64
  naeural_client/ipfs/ifps_keygen,sha256=PcoYuo4c89_C9FWrKq9K_28ruhKqnxNn1s3nLHiF1tc,879
65
- naeural_client/ipfs/r1fs.py,sha256=IKJZG3jiodvXT6tfRWKQtg4oALQ9H9OhW85q1JGnd58,18653
65
+ naeural_client/ipfs/r1fs.py,sha256=9y7QuQnQiDFXiNBiu7EyhXMRre1KP6Y9BviN3HRWJS4,19057
66
66
  naeural_client/ipfs/ipfs_setup/ipfs.service,sha256=isTJQsktPy4i1yaDA9AC1OKdlTYvsCCRRAVX-EmGqAs,248
67
67
  naeural_client/ipfs/ipfs_setup/launch_service.sh,sha256=GWhZyNqtohLxJg8Q_c8YnNZduu1ddXDU-IFRRMaEyiY,141
68
68
  naeural_client/ipfs/ipfs_setup/restart.sh,sha256=9xHMgkUoAMI25jeaoDVFbCa_LjojYm3ubljW58RatKE,22
@@ -96,8 +96,8 @@ naeural_client/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_L
96
96
  naeural_client/utils/config.py,sha256=lAbWe3UMi40BOdsAIZIb-fYtb4LwG3MIYg0EOA1ITr8,10340
97
97
  naeural_client/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
98
98
  naeural_client/utils/oracle_sync/oracle_tester.py,sha256=X-923ccjkr6_kzbbiuAAcWSIhMtBDOH2VURjTh55apQ,27235
99
- naeural_client-3.0.0.dist-info/METADATA,sha256=tFFs2d77B_LkChWon4_SsC6V5AQIMAatH4gmJVHA_3c,12353
100
- naeural_client-3.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
101
- naeural_client-3.0.0.dist-info/entry_points.txt,sha256=CTua17GUrRa4aXeafezGC9TiWKGKQzwTjQmB2jyj22g,91
102
- naeural_client-3.0.0.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
103
- naeural_client-3.0.0.dist-info/RECORD,,
99
+ naeural_client-3.0.2.dist-info/METADATA,sha256=WNIw5OtpsOKplp2N1TYdJgzP5XDkvY8iQbAMKUZRR_M,12353
100
+ naeural_client-3.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
101
+ naeural_client-3.0.2.dist-info/entry_points.txt,sha256=CTua17GUrRa4aXeafezGC9TiWKGKQzwTjQmB2jyj22g,91
102
+ naeural_client-3.0.2.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
103
+ naeural_client-3.0.2.dist-info/RECORD,,