neuronum 2.0.5__tar.gz → 2.0.7__tar.gz
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.
- {neuronum-2.0.5 → neuronum-2.0.7}/PKG-INFO +4 -4
- {neuronum-2.0.5 → neuronum-2.0.7}/README.md +3 -3
- {neuronum-2.0.5 → neuronum-2.0.7}/cli/main.py +35 -27
- {neuronum-2.0.5 → neuronum-2.0.7}/neuronum.egg-info/PKG-INFO +4 -4
- {neuronum-2.0.5 → neuronum-2.0.7}/setup.py +1 -1
- {neuronum-2.0.5 → neuronum-2.0.7}/LICENSE +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/cellai/__init__.py +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/cellai/cellai.py +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/cli/__init__.py +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/neuronum/__init__.py +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/neuronum/neuronum.py +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/neuronum.egg-info/SOURCES.txt +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/neuronum.egg-info/dependency_links.txt +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/neuronum.egg-info/entry_points.txt +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/neuronum.egg-info/requires.txt +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/neuronum.egg-info/top_level.txt +0 -0
- {neuronum-2.0.5 → neuronum-2.0.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: neuronum
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
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.7?**
|
|
39
|
+
- **Nodes/Node-CLI**: Updated logic: Node Type and Description are now declared during `neuronum register-node` instead of `neuronum init-node`
|
|
40
40
|
|
|
41
41
|
### New Feature Set
|
|
42
42
|
- **Cells/Cell-CLI**: Create and manage Neuronum Cells from the command line
|
|
@@ -44,7 +44,7 @@ Build, deploy and automate serverless data infrastructures for an interconnected
|
|
|
44
44
|
- **Transmitters (TX)**: Automate economic data transfer
|
|
45
45
|
- **Circuits (CTX)**: Store data in Key-Value-Label databases
|
|
46
46
|
- **Streams (STX)**: Stream, synchronize and control data in real time
|
|
47
|
-
- **Contracts/Tokens**: Automate
|
|
47
|
+
- **Contracts/Tokens**: Automate service exchange and authorization between Cells and Nodes
|
|
48
48
|
- **Cellai**: A local running task assistant in development (version 0.0.1)
|
|
49
49
|
|
|
50
50
|
### Installation
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Build, deploy and automate serverless data infrastructures for an interconnected world with `Neuronum`
|
|
6
6
|
|
|
7
|
-
### **What's New in neuronum==2.0.
|
|
8
|
-
- **Nodes/Node-CLI**:
|
|
7
|
+
### **What's New in neuronum==2.0.7?**
|
|
8
|
+
- **Nodes/Node-CLI**: Updated logic: Node Type and Description are now declared during `neuronum register-node` instead of `neuronum init-node`
|
|
9
9
|
|
|
10
10
|
### New Feature Set
|
|
11
11
|
- **Cells/Cell-CLI**: Create and manage Neuronum Cells from the command line
|
|
@@ -13,7 +13,7 @@ Build, deploy and automate serverless data infrastructures for an interconnected
|
|
|
13
13
|
- **Transmitters (TX)**: Automate economic data transfer
|
|
14
14
|
- **Circuits (CTX)**: Store data in Key-Value-Label databases
|
|
15
15
|
- **Streams (STX)**: Stream, synchronize and control data in real time
|
|
16
|
-
- **Contracts/Tokens**: Automate
|
|
16
|
+
- **Contracts/Tokens**: Automate service exchange and authorization between Cells and Nodes
|
|
17
17
|
- **Cellai**: A local running task assistant in development (version 0.0.1)
|
|
18
18
|
|
|
19
19
|
### Installation
|
|
@@ -7,6 +7,7 @@ import os
|
|
|
7
7
|
import neuronum
|
|
8
8
|
import json
|
|
9
9
|
import platform
|
|
10
|
+
import glob
|
|
10
11
|
|
|
11
12
|
@click.group()
|
|
12
13
|
def cli():
|
|
@@ -244,17 +245,10 @@ def delete_cell():
|
|
|
244
245
|
|
|
245
246
|
|
|
246
247
|
@click.command()
|
|
247
|
-
@click.option('--sync',
|
|
248
|
-
@click.option('--stream',
|
|
248
|
+
@click.option('--sync', multiple=True, default=None, help="Optional stream IDs for sync.")
|
|
249
|
+
@click.option('--stream', multiple=True, default=None, help="Optional stream ID for stream.")
|
|
249
250
|
def init_node(sync, stream):
|
|
250
251
|
|
|
251
|
-
node_type = questionary.select(
|
|
252
|
-
"Choose Node type:",
|
|
253
|
-
choices=["public", "private"]
|
|
254
|
-
).ask()
|
|
255
|
-
|
|
256
|
-
descr = click.prompt("Node description (max. 25 characters)")
|
|
257
|
-
|
|
258
252
|
credentials_folder_path = Path.home() / ".neuronum"
|
|
259
253
|
env_path = credentials_folder_path / ".env"
|
|
260
254
|
|
|
@@ -278,8 +272,8 @@ def init_node(sync, stream):
|
|
|
278
272
|
click.echo(f"Error reading .env file: {e}")
|
|
279
273
|
return
|
|
280
274
|
|
|
281
|
-
url = f"https://{network}/api/init_node
|
|
282
|
-
node = {"
|
|
275
|
+
url = f"https://{network}/api/init_node"
|
|
276
|
+
node = {"host": host, "password": password, "synapse": synapse}
|
|
283
277
|
|
|
284
278
|
try:
|
|
285
279
|
response = requests.post(url, json=node)
|
|
@@ -330,11 +324,12 @@ def init_node(sync, stream):
|
|
|
330
324
|
nodemd_path = project_path / "NODE.md"
|
|
331
325
|
nodemd_path.write_text("## Use this NODE.md file to add instructions on how to interact with your node\n")
|
|
332
326
|
|
|
333
|
-
stx = sync
|
|
327
|
+
stx = sync[0] if sync else (stream[0] if stream else "n9gW3LxQcecI::stx")
|
|
334
328
|
|
|
335
329
|
if sync:
|
|
336
|
-
|
|
337
|
-
|
|
330
|
+
for stx in sync:
|
|
331
|
+
sync_path = project_path / f"sync_{stx.replace('::stx', '')}.py"
|
|
332
|
+
sync_path.write_text(f"""\
|
|
338
333
|
import neuronum
|
|
339
334
|
import os
|
|
340
335
|
from dotenv import load_dotenv
|
|
@@ -365,8 +360,9 @@ for operation in stream:
|
|
|
365
360
|
|
|
366
361
|
|
|
367
362
|
if stream:
|
|
368
|
-
|
|
369
|
-
|
|
363
|
+
for stx in stream:
|
|
364
|
+
stream_path = project_path / f"stream_{stx.replace('::stx', '')}.py"
|
|
365
|
+
stream_path.write_text(f"""\
|
|
370
366
|
import neuronum
|
|
371
367
|
import os
|
|
372
368
|
from dotenv import load_dotenv
|
|
@@ -435,7 +431,8 @@ def start_node():
|
|
|
435
431
|
click.echo("Starting Node...")
|
|
436
432
|
|
|
437
433
|
project_path = Path.cwd()
|
|
438
|
-
|
|
434
|
+
|
|
435
|
+
script_files = ["main.py"] + glob.glob("sync_*.py") + glob.glob("stream_*.py")
|
|
439
436
|
|
|
440
437
|
processes = []
|
|
441
438
|
|
|
@@ -467,17 +464,20 @@ def stop_node():
|
|
|
467
464
|
system_name = platform.system()
|
|
468
465
|
|
|
469
466
|
for pid in pids:
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
467
|
+
try:
|
|
468
|
+
if system_name == "Windows":
|
|
469
|
+
subprocess.run(
|
|
470
|
+
["taskkill", "/F", "/PID", str(pid)],
|
|
471
|
+
stdout=subprocess.DEVNULL,
|
|
472
|
+
stderr=subprocess.DEVNULL
|
|
473
|
+
)
|
|
474
|
+
else:
|
|
475
|
+
os.kill(pid, 9)
|
|
476
|
+
except ProcessLookupError:
|
|
477
|
+
click.echo(f"Warning: Process {pid} already stopped or does not exist.")
|
|
478
478
|
|
|
479
479
|
os.remove("node_pid.txt")
|
|
480
|
-
click.echo("Node stopped successfully!")
|
|
480
|
+
click.echo(f"Node stopped successfully! {len(pids)} processes terminated.")
|
|
481
481
|
|
|
482
482
|
except FileNotFoundError:
|
|
483
483
|
click.echo("Error: No active node process found.")
|
|
@@ -506,6 +506,13 @@ def register_node():
|
|
|
506
506
|
except Exception as e:
|
|
507
507
|
print(f"Error reading .env file: {e}")
|
|
508
508
|
return
|
|
509
|
+
|
|
510
|
+
node_type = questionary.select(
|
|
511
|
+
"Choose Node type:",
|
|
512
|
+
choices=["public", "private"]
|
|
513
|
+
).ask()
|
|
514
|
+
|
|
515
|
+
descr = click.prompt("Node description (max. 25 characters)")
|
|
509
516
|
|
|
510
517
|
try:
|
|
511
518
|
with open("NODE.md", "r") as f:
|
|
@@ -518,10 +525,11 @@ def register_node():
|
|
|
518
525
|
print(f"Error reading NODE.md file: {e}")
|
|
519
526
|
return
|
|
520
527
|
|
|
521
|
-
url = f"https://{network}/api/register_node"
|
|
528
|
+
url = f"https://{network}/api/register_node/{node_type}"
|
|
522
529
|
|
|
523
530
|
node = {
|
|
524
531
|
"nodeID": nodeID,
|
|
532
|
+
"descr": descr,
|
|
525
533
|
"host": host,
|
|
526
534
|
"password": password,
|
|
527
535
|
"synapse": synapse,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: neuronum
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
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.7?**
|
|
39
|
+
- **Nodes/Node-CLI**: Updated logic: Node Type and Description are now declared during `neuronum register-node` instead of `neuronum init-node`
|
|
40
40
|
|
|
41
41
|
### New Feature Set
|
|
42
42
|
- **Cells/Cell-CLI**: Create and manage Neuronum Cells from the command line
|
|
@@ -44,7 +44,7 @@ Build, deploy and automate serverless data infrastructures for an interconnected
|
|
|
44
44
|
- **Transmitters (TX)**: Automate economic data transfer
|
|
45
45
|
- **Circuits (CTX)**: Store data in Key-Value-Label databases
|
|
46
46
|
- **Streams (STX)**: Stream, synchronize and control data in real time
|
|
47
|
-
- **Contracts/Tokens**: Automate
|
|
47
|
+
- **Contracts/Tokens**: Automate service exchange and authorization between Cells and Nodes
|
|
48
48
|
- **Cellai**: A local running task assistant in development (version 0.0.1)
|
|
49
49
|
|
|
50
50
|
### Installation
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|