neuronum 5.8.2__py3-none-any.whl → 5.8.4__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.
Potentially problematic release.
This version of neuronum might be problematic. Click here for more details.
- cli/main.py +32 -7
- {neuronum-5.8.2.dist-info → neuronum-5.8.4.dist-info}/METADATA +2 -2
- neuronum-5.8.4.dist-info/RECORD +10 -0
- neuronum-5.8.2.dist-info/RECORD +0 -10
- {neuronum-5.8.2.dist-info → neuronum-5.8.4.dist-info}/WHEEL +0 -0
- {neuronum-5.8.2.dist-info → neuronum-5.8.4.dist-info}/entry_points.txt +0 -0
- {neuronum-5.8.2.dist-info → neuronum-5.8.4.dist-info}/licenses/LICENSE.md +0 -0
- {neuronum-5.8.2.dist-info → neuronum-5.8.4.dist-info}/top_level.txt +0 -0
cli/main.py
CHANGED
|
@@ -402,6 +402,7 @@ import asyncio
|
|
|
402
402
|
import neuronum
|
|
403
403
|
import os
|
|
404
404
|
from dotenv import load_dotenv
|
|
405
|
+
import time
|
|
405
406
|
|
|
406
407
|
load_dotenv()
|
|
407
408
|
host = os.getenv("HOST")
|
|
@@ -427,6 +428,7 @@ async def main():
|
|
|
427
428
|
"key3": "value3",
|
|
428
429
|
}}
|
|
429
430
|
await cell.stream(label, data, STX)
|
|
431
|
+
time.sleep(5)
|
|
430
432
|
|
|
431
433
|
asyncio.run(main())
|
|
432
434
|
""")
|
|
@@ -466,6 +468,7 @@ import asyncio
|
|
|
466
468
|
import neuronum
|
|
467
469
|
import os
|
|
468
470
|
from dotenv import load_dotenv
|
|
471
|
+
import time
|
|
469
472
|
|
|
470
473
|
load_dotenv()
|
|
471
474
|
host = os.getenv("HOST")
|
|
@@ -488,6 +491,7 @@ async def main():
|
|
|
488
491
|
"message": "Hello, Neuronum!"
|
|
489
492
|
}}
|
|
490
493
|
await cell.stream(label, data)
|
|
494
|
+
time.sleep(5)
|
|
491
495
|
|
|
492
496
|
asyncio.run(main())
|
|
493
497
|
""")
|
|
@@ -614,8 +618,9 @@ def start_node(d):
|
|
|
614
618
|
)
|
|
615
619
|
else:
|
|
616
620
|
process = subprocess.Popen(
|
|
617
|
-
[
|
|
618
|
-
|
|
621
|
+
["python", str(script_path)],
|
|
622
|
+
stdout = None,
|
|
623
|
+
stderr = None
|
|
619
624
|
)
|
|
620
625
|
|
|
621
626
|
processes.append(process.pid)
|
|
@@ -766,7 +771,11 @@ def restart_node(d):
|
|
|
766
771
|
start_new_session=True
|
|
767
772
|
)
|
|
768
773
|
else:
|
|
769
|
-
process = subprocess.Popen(
|
|
774
|
+
process = subprocess.Popen(
|
|
775
|
+
["python", str(script_path)],
|
|
776
|
+
stdout = None,
|
|
777
|
+
stderr = None
|
|
778
|
+
)
|
|
770
779
|
|
|
771
780
|
processes.append(process.pid)
|
|
772
781
|
|
|
@@ -832,10 +841,23 @@ async def async_stop_node():
|
|
|
832
841
|
|
|
833
842
|
@click.command()
|
|
834
843
|
def update_node():
|
|
844
|
+
click.echo("Update your Node")
|
|
835
845
|
node_type = questionary.select(
|
|
836
|
-
"
|
|
837
|
-
choices=["public", "private"]
|
|
846
|
+
"Who can view your Node?:",
|
|
847
|
+
choices=["public", "private", "partners"]
|
|
838
848
|
).ask()
|
|
849
|
+
partners = "None"
|
|
850
|
+
if node_type == "partners":
|
|
851
|
+
prompt_msg = (
|
|
852
|
+
"Enter the list of partners who can view this Node.\n"
|
|
853
|
+
"Format: partner::cell, partner::cell, partner::cell\n"
|
|
854
|
+
"Press Enter to leave the list unchanged"
|
|
855
|
+
)
|
|
856
|
+
partners = click.prompt(
|
|
857
|
+
prompt_msg,
|
|
858
|
+
default="None",
|
|
859
|
+
show_default=False
|
|
860
|
+
).strip()
|
|
839
861
|
descr = click.prompt(
|
|
840
862
|
"Update Node description: Type up to 25 characters, or press Enter to leave it unchanged",
|
|
841
863
|
default="None",
|
|
@@ -844,9 +866,9 @@ def update_node():
|
|
|
844
866
|
if descr and len(descr) > 25:
|
|
845
867
|
click.echo("Description too long. Max 25 characters allowed.")
|
|
846
868
|
return
|
|
847
|
-
asyncio.run(async_update_node(node_type, descr))
|
|
869
|
+
asyncio.run(async_update_node(node_type, descr, partners))
|
|
848
870
|
|
|
849
|
-
async def async_update_node(node_type: str, descr: str) -> None:
|
|
871
|
+
async def async_update_node(node_type: str, descr: str, partners:str) -> None:
|
|
850
872
|
env_data = {}
|
|
851
873
|
|
|
852
874
|
try:
|
|
@@ -878,6 +900,9 @@ async def async_update_node(node_type: str, descr: str) -> None:
|
|
|
878
900
|
except Exception as e:
|
|
879
901
|
click.echo(f"Error reading NODE.md file: {e}")
|
|
880
902
|
return
|
|
903
|
+
|
|
904
|
+
if node_type == "partners":
|
|
905
|
+
node_type = partners
|
|
881
906
|
|
|
882
907
|
url = f"https://{network}/api/update_node"
|
|
883
908
|
node = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: neuronum
|
|
3
|
-
Version: 5.8.
|
|
3
|
+
Version: 5.8.4
|
|
4
4
|
Summary: Official client library to interact with the Neuronum Network
|
|
5
5
|
Home-page: https://neuronum.net
|
|
6
6
|
Author: Neuronum Cybernetics
|
|
@@ -34,7 +34,7 @@ Dynamic: summary
|
|
|
34
34
|
<h1 align="center">
|
|
35
35
|
<img src="https://neuronum.net/static/neuronum.svg" alt="Neuronum" width="80">
|
|
36
36
|
</h1>
|
|
37
|
-
<h4 align="center">Neuronum:
|
|
37
|
+
<h4 align="center">Neuronum: Build Apps that Connect the World</h4>
|
|
38
38
|
|
|
39
39
|
<p align="center">
|
|
40
40
|
<a href="https://neuronum.net">
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
cli/main.py,sha256=Yec9ovjqM6iI6IyUU8nhgrpcd7rIMocSoZI8QWY1KC4,35684
|
|
3
|
+
neuronum/__init__.py,sha256=Drsm263_w3_VWgl1YsKLUr8WwVodqV3TSjqpxLjyq_M,46
|
|
4
|
+
neuronum/neuronum.py,sha256=L8Oz1qcTyOiYMTGfiSKgN5Nu9jcl25jFeJOh0XItPjw,17201
|
|
5
|
+
neuronum-5.8.4.dist-info/licenses/LICENSE.md,sha256=zGst0rjgnp6oFuRVwFwB1Ql4sDXt_nw9xbUR49Gf99A,2008
|
|
6
|
+
neuronum-5.8.4.dist-info/METADATA,sha256=T9p6cUzgU3c2P9uvagnunGkRVrvC7DKAZZV26JdSQlQ,5367
|
|
7
|
+
neuronum-5.8.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
neuronum-5.8.4.dist-info/entry_points.txt,sha256=XKYBcRNxGeJpZZkDPsa8HA_RaJ7Km_R_JaUq5T9Nk2U,42
|
|
9
|
+
neuronum-5.8.4.dist-info/top_level.txt,sha256=ru8Fr84cHm6oHr_DcJ8-uaq3RTiuCRFIr6AC8V0zPu4,13
|
|
10
|
+
neuronum-5.8.4.dist-info/RECORD,,
|
neuronum-5.8.2.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
cli/main.py,sha256=FE2uIdfNYwAauv-rNm_jD5YPs5K2S3f-0JIlvjAJkWw,34841
|
|
3
|
-
neuronum/__init__.py,sha256=Drsm263_w3_VWgl1YsKLUr8WwVodqV3TSjqpxLjyq_M,46
|
|
4
|
-
neuronum/neuronum.py,sha256=L8Oz1qcTyOiYMTGfiSKgN5Nu9jcl25jFeJOh0XItPjw,17201
|
|
5
|
-
neuronum-5.8.2.dist-info/licenses/LICENSE.md,sha256=zGst0rjgnp6oFuRVwFwB1Ql4sDXt_nw9xbUR49Gf99A,2008
|
|
6
|
-
neuronum-5.8.2.dist-info/METADATA,sha256=XY5GeeQ0rHBWz0pbNhlijEHkPdNVpK2mPsXgNFoVuGQ,5374
|
|
7
|
-
neuronum-5.8.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
neuronum-5.8.2.dist-info/entry_points.txt,sha256=XKYBcRNxGeJpZZkDPsa8HA_RaJ7Km_R_JaUq5T9Nk2U,42
|
|
9
|
-
neuronum-5.8.2.dist-info/top_level.txt,sha256=ru8Fr84cHm6oHr_DcJ8-uaq3RTiuCRFIr6AC8V0zPu4,13
|
|
10
|
-
neuronum-5.8.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|