neuronum 2.0.7__py3-none-any.whl → 2.0.8__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 +35 -12
- neuronum/neuronum.py +0 -1
- {neuronum-2.0.7.dist-info → neuronum-2.0.8.dist-info}/METADATA +3 -3
- neuronum-2.0.8.dist-info/RECORD +12 -0
- neuronum-2.0.7.dist-info/RECORD +0 -12
- {neuronum-2.0.7.dist-info → neuronum-2.0.8.dist-info}/WHEEL +0 -0
- {neuronum-2.0.7.dist-info → neuronum-2.0.8.dist-info}/entry_points.txt +0 -0
- {neuronum-2.0.7.dist-info → neuronum-2.0.8.dist-info}/licenses/LICENSE +0 -0
- {neuronum-2.0.7.dist-info → neuronum-2.0.8.dist-info}/top_level.txt +0 -0
cli/main.py
CHANGED
|
@@ -324,7 +324,7 @@ def init_node(sync, stream):
|
|
|
324
324
|
nodemd_path = project_path / "NODE.md"
|
|
325
325
|
nodemd_path.write_text("## Use this NODE.md file to add instructions on how to interact with your node\n")
|
|
326
326
|
|
|
327
|
-
stx = sync[0] if sync else (stream[0] if stream else "
|
|
327
|
+
stx = sync[0] if sync else (stream[0] if stream else host.replace("::cell", "::stx"))
|
|
328
328
|
|
|
329
329
|
if sync:
|
|
330
330
|
for stx in sync:
|
|
@@ -392,8 +392,8 @@ while True:
|
|
|
392
392
|
""")
|
|
393
393
|
|
|
394
394
|
if not sync and not stream:
|
|
395
|
-
|
|
396
|
-
|
|
395
|
+
sync_path = project_path / f"sync_{stx.replace('::stx', '')}.py"
|
|
396
|
+
sync_path.write_text(f"""\
|
|
397
397
|
import neuronum
|
|
398
398
|
import os
|
|
399
399
|
from dotenv import load_dotenv
|
|
@@ -414,12 +414,36 @@ cell = neuronum.Cell(
|
|
|
414
414
|
STX = "{stx}"
|
|
415
415
|
stream = cell.sync(STX)
|
|
416
416
|
for operation in stream:
|
|
417
|
-
label = operation.get("label")
|
|
418
417
|
message = operation.get("data").get("message")
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
418
|
+
print(message)
|
|
419
|
+
""")
|
|
420
|
+
|
|
421
|
+
stream_path = project_path / f"stream_{stx.replace('::stx', '')}.py"
|
|
422
|
+
stream_path.write_text(f"""\
|
|
423
|
+
import neuronum
|
|
424
|
+
import os
|
|
425
|
+
from dotenv import load_dotenv
|
|
426
|
+
|
|
427
|
+
load_dotenv()
|
|
428
|
+
host = os.getenv("HOST")
|
|
429
|
+
password = os.getenv("PASSWORD")
|
|
430
|
+
network = os.getenv("NETWORK")
|
|
431
|
+
synapse = os.getenv("SYNAPSE")
|
|
432
|
+
|
|
433
|
+
cell = neuronum.Cell(
|
|
434
|
+
host=host,
|
|
435
|
+
password=password,
|
|
436
|
+
network=network,
|
|
437
|
+
synapse=synapse
|
|
438
|
+
)
|
|
439
|
+
|
|
440
|
+
STX = "{stx}"
|
|
441
|
+
label = "Welcome to Neuronum"
|
|
442
|
+
while True:
|
|
443
|
+
data = {{
|
|
444
|
+
"message": "Hello, Neuronum!"
|
|
445
|
+
}}
|
|
446
|
+
cell.stream(label, data, STX)
|
|
423
447
|
""")
|
|
424
448
|
|
|
425
449
|
click.echo(f"Neuronum Node '{nodeID}' initialized!")
|
|
@@ -432,7 +456,7 @@ def start_node():
|
|
|
432
456
|
|
|
433
457
|
project_path = Path.cwd()
|
|
434
458
|
|
|
435
|
-
script_files =
|
|
459
|
+
script_files = glob.glob("sync_*.py") + glob.glob("stream_*.py")
|
|
436
460
|
|
|
437
461
|
processes = []
|
|
438
462
|
|
|
@@ -449,8 +473,7 @@ def start_node():
|
|
|
449
473
|
with open("node_pid.txt", "w") as f:
|
|
450
474
|
f.write("\n".join(map(str, processes)))
|
|
451
475
|
|
|
452
|
-
click.echo(f"Node started successfully!
|
|
453
|
-
|
|
476
|
+
click.echo(f"Node started successfully!")
|
|
454
477
|
|
|
455
478
|
|
|
456
479
|
@click.command()
|
|
@@ -477,7 +500,7 @@ def stop_node():
|
|
|
477
500
|
click.echo(f"Warning: Process {pid} already stopped or does not exist.")
|
|
478
501
|
|
|
479
502
|
os.remove("node_pid.txt")
|
|
480
|
-
click.echo(f"Node stopped successfully!
|
|
503
|
+
click.echo(f"Node stopped successfully!")
|
|
481
504
|
|
|
482
505
|
except FileNotFoundError:
|
|
483
506
|
click.echo("Error: No active node process found.")
|
neuronum/neuronum.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: neuronum
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.8
|
|
4
4
|
Summary: Official client library to interact with the Neuronum Network
|
|
5
5
|
Home-page: https://neuronum.net
|
|
6
6
|
Author: Neuronum Cybernetics
|
|
@@ -35,8 +35,8 @@ Dynamic: summary
|
|
|
35
35
|
|
|
36
36
|
Build, deploy and automate serverless data infrastructures for an interconnected world with `Neuronum`
|
|
37
37
|
|
|
38
|
-
### **What's New in neuronum==2.0.
|
|
39
|
-
- **Nodes/Node-CLI**:
|
|
38
|
+
### **What's New in neuronum==2.0.8?**
|
|
39
|
+
- **Nodes/Node-CLI**: Improved default template for `neuronum init-node`
|
|
40
40
|
|
|
41
41
|
### New Feature Set
|
|
42
42
|
- **Cells/Cell-CLI**: Create and manage Neuronum Cells from the command line
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
cellai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
cellai/cellai.py,sha256=g5oBz-Xx6T4-JWzUs-TJ4y9nHtDmA_IpXh_188OqAZA,281
|
|
3
|
+
cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
cli/main.py,sha256=QUxzQlC6j3CXJ9PDsh00DTMrWAScYC7uUeOmWkbVYZk,21356
|
|
5
|
+
neuronum/__init__.py,sha256=Drsm263_w3_VWgl1YsKLUr8WwVodqV3TSjqpxLjyq_M,46
|
|
6
|
+
neuronum/neuronum.py,sha256=MmParpql70ggrbuiEhNV2cs_hdjR5fbSdyP5K9N_2l8,17492
|
|
7
|
+
neuronum-2.0.8.dist-info/licenses/LICENSE,sha256=UiZjNHiCyRP6WoZfbYQh9cv4JW96wIofKXmzBJrYSUk,1125
|
|
8
|
+
neuronum-2.0.8.dist-info/METADATA,sha256=_wkHu-0a-zv-oypm91-WO0a40RAsTb2oxjlg1fIoSGI,13930
|
|
9
|
+
neuronum-2.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
neuronum-2.0.8.dist-info/entry_points.txt,sha256=XKYBcRNxGeJpZZkDPsa8HA_RaJ7Km_R_JaUq5T9Nk2U,42
|
|
11
|
+
neuronum-2.0.8.dist-info/top_level.txt,sha256=gqN5tyGnBKMPSzvWQONO4rpTf4gQPMi77O3KAKx88LQ,20
|
|
12
|
+
neuronum-2.0.8.dist-info/RECORD,,
|
neuronum-2.0.7.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
cellai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
cellai/cellai.py,sha256=g5oBz-Xx6T4-JWzUs-TJ4y9nHtDmA_IpXh_188OqAZA,281
|
|
3
|
-
cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
cli/main.py,sha256=V7FlBttuTOIFqynklAZxoHuE3e3uiyqQ9j6QSkrzibo,20970
|
|
5
|
-
neuronum/__init__.py,sha256=Drsm263_w3_VWgl1YsKLUr8WwVodqV3TSjqpxLjyq_M,46
|
|
6
|
-
neuronum/neuronum.py,sha256=rkc16omTxjWBEgBXP0rCeab1S3lYDKz1zx_i-tdFjlY,17544
|
|
7
|
-
neuronum-2.0.7.dist-info/licenses/LICENSE,sha256=UiZjNHiCyRP6WoZfbYQh9cv4JW96wIofKXmzBJrYSUk,1125
|
|
8
|
-
neuronum-2.0.7.dist-info/METADATA,sha256=RvuuNmTRR21rmzRkP0T0oVERKp7yafL9pgXumtvDI80,14001
|
|
9
|
-
neuronum-2.0.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
-
neuronum-2.0.7.dist-info/entry_points.txt,sha256=XKYBcRNxGeJpZZkDPsa8HA_RaJ7Km_R_JaUq5T9Nk2U,42
|
|
11
|
-
neuronum-2.0.7.dist-info/top_level.txt,sha256=gqN5tyGnBKMPSzvWQONO4rpTf4gQPMi77O3KAKx88LQ,20
|
|
12
|
-
neuronum-2.0.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|