naeural-client 3.0.1__py3-none-any.whl → 3.0.3__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/ipfs/r1fs.py +20 -6
- {naeural_client-3.0.1.dist-info → naeural_client-3.0.3.dist-info}/METADATA +1 -1
- {naeural_client-3.0.1.dist-info → naeural_client-3.0.3.dist-info}/RECORD +7 -7
- {naeural_client-3.0.1.dist-info → naeural_client-3.0.3.dist-info}/WHEEL +0 -0
- {naeural_client-3.0.1.dist-info → naeural_client-3.0.3.dist-info}/entry_points.txt +0 -0
- {naeural_client-3.0.1.dist-info → naeural_client-3.0.3.dist-info}/licenses/LICENSE +0 -0
naeural_client/_ver.py
CHANGED
naeural_client/ipfs/r1fs.py
CHANGED
@@ -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
|
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
|
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:
|
@@ -551,12 +559,14 @@ class R1FSEngine:
|
|
551
559
|
msg += f"\n Download: {self.__downloads_dir}"
|
552
560
|
msg += f"\n Upload: {self.__uploads_dir}"
|
553
561
|
msg += f"\n SwarmKey: {hidden_base64_swarm_key}"
|
554
|
-
self.P(msg, color='
|
562
|
+
self.P(msg, color='d')
|
555
563
|
|
556
564
|
ipfs_repo = os.path.expanduser("~/.ipfs")
|
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.
|
@@ -609,12 +619,16 @@ class R1FSEngine:
|
|
609
619
|
try:
|
610
620
|
my_id = self.__get_id()
|
611
621
|
assert my_id != ERROR_TAG, "Failed to get IPFS ID."
|
612
|
-
|
613
|
-
|
622
|
+
msg = f"Connecting to R1FS relay"
|
623
|
+
msg += f"\n IPFS ID: {my_id}"
|
624
|
+
msg += f"\n IPFS Addr: {self.__ipfs_address}"
|
625
|
+
msg += f"\n IPFS Agent: {self.__ipfs_agent}"
|
626
|
+
msg += f"\n Relay: {ipfs_relay}"
|
627
|
+
self.P(msg, color='m')
|
614
628
|
result = self.__run_command(["ipfs", "swarm", "connect", ipfs_relay])
|
615
629
|
relay_ip = ipfs_relay.split("/")[2]
|
616
630
|
if "connect" in result.lower() and "success" in result.lower():
|
617
|
-
self.P(f"
|
631
|
+
self.P(f"{my_id} connected to: {relay_ip}", color='g', boxed=True)
|
618
632
|
self.__ipfs_started = True
|
619
633
|
else:
|
620
634
|
self.P("Relay connection result did not indicate success.", color='r')
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: naeural_client
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.3
|
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,5 +1,5 @@
|
|
1
1
|
naeural_client/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
|
2
|
-
naeural_client/_ver.py,sha256=
|
2
|
+
naeural_client/_ver.py,sha256=zsIkCPDIjjFJe67LB09iUq1RO3eenvp4bjNse_1gIps,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
|
@@ -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=
|
65
|
+
naeural_client/ipfs/r1fs.py,sha256=osLLpNgKi43fj-uqldMc62MoN2ryRnbPWtI5uedRM0Y,19225
|
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.
|
100
|
-
naeural_client-3.0.
|
101
|
-
naeural_client-3.0.
|
102
|
-
naeural_client-3.0.
|
103
|
-
naeural_client-3.0.
|
99
|
+
naeural_client-3.0.3.dist-info/METADATA,sha256=HwVdrMiths1CWxOo0iE3zR6qww8bknBZ5wNkNF4riRY,12353
|
100
|
+
naeural_client-3.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
101
|
+
naeural_client-3.0.3.dist-info/entry_points.txt,sha256=CTua17GUrRa4aXeafezGC9TiWKGKQzwTjQmB2jyj22g,91
|
102
|
+
naeural_client-3.0.3.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
|
103
|
+
naeural_client-3.0.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|