neuronum 3.0.2__tar.gz → 4.0.0__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-4.0.0/PKG-INFO +158 -0
- neuronum-4.0.0/README.md +126 -0
- {neuronum-3.0.2 → neuronum-4.0.0}/cli/main.py +18 -55
- {neuronum-3.0.2 → neuronum-4.0.0}/neuronum/neuronum.py +0 -175
- neuronum-4.0.0/neuronum.egg-info/PKG-INFO +158 -0
- {neuronum-3.0.2 → neuronum-4.0.0}/neuronum.egg-info/SOURCES.txt +0 -2
- {neuronum-3.0.2 → neuronum-4.0.0}/neuronum.egg-info/requires.txt +0 -1
- {neuronum-3.0.2 → neuronum-4.0.0}/neuronum.egg-info/top_level.txt +0 -1
- {neuronum-3.0.2 → neuronum-4.0.0}/setup.py +2 -3
- neuronum-3.0.2/PKG-INFO +0 -125
- neuronum-3.0.2/README.md +0 -92
- neuronum-3.0.2/cellai/cellai.py +0 -7
- neuronum-3.0.2/cli/__init__.py +0 -0
- neuronum-3.0.2/neuronum.egg-info/PKG-INFO +0 -125
- {neuronum-3.0.2 → neuronum-4.0.0}/LICENSE +0 -0
- {neuronum-3.0.2/cellai → neuronum-4.0.0/cli}/__init__.py +0 -0
- {neuronum-3.0.2 → neuronum-4.0.0}/neuronum/__init__.py +0 -0
- {neuronum-3.0.2 → neuronum-4.0.0}/neuronum.egg-info/dependency_links.txt +0 -0
- {neuronum-3.0.2 → neuronum-4.0.0}/neuronum.egg-info/entry_points.txt +0 -0
- {neuronum-3.0.2 → neuronum-4.0.0}/setup.cfg +0 -0
neuronum-4.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: neuronum
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Summary: Official client library to interact with the Neuronum Network
|
|
5
|
+
Home-page: https://neuronum.net
|
|
6
|
+
Author: Neuronum Cybernetics
|
|
7
|
+
Author-email: welcome@neuronum.net
|
|
8
|
+
Project-URL: GitHub, https://github.com/neuronumcybernetics/neuronum
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: aiohttp
|
|
16
|
+
Requires-Dist: websockets
|
|
17
|
+
Requires-Dist: click
|
|
18
|
+
Requires-Dist: questionary
|
|
19
|
+
Requires-Dist: python-dotenv
|
|
20
|
+
Requires-Dist: requests
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: description
|
|
25
|
+
Dynamic: description-content-type
|
|
26
|
+
Dynamic: home-page
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: project-url
|
|
29
|
+
Dynamic: requires-dist
|
|
30
|
+
Dynamic: requires-python
|
|
31
|
+
Dynamic: summary
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
[](https://neuronum.net) [](https://github.com/neuronumcybernetics/neuronum)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### **Getting Started Goals**
|
|
39
|
+
- Learn about Neuronum
|
|
40
|
+
- Connect to Neuronum
|
|
41
|
+
- Build on Neuronum
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### **About Neuronum**
|
|
45
|
+
Neuronum is a central serverless data gateway automating the processing and distribution of data transmission, storage, and streaming.
|
|
46
|
+
In practice, Neuronum forms an interconnected network of soft- and hardware components (Nodes) exchanging data in real time.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### **Network Attributes**
|
|
50
|
+
**Cell & Nodes**
|
|
51
|
+
- Cell: Account to connect and interact with the Neuronum Network
|
|
52
|
+
- Nodes: Software and Hardware components connected to Neuronum
|
|
53
|
+
|
|
54
|
+
**Data Gateways**
|
|
55
|
+
- Transmitters (TX): Automate data transfer in standardized formats
|
|
56
|
+
- Circuits (CTX): Store data in cloud-based key-value-label databases
|
|
57
|
+
- Streams (STX): Stream, synchronize, and control data in real time
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
#### Requirements
|
|
61
|
+
- Python >= 3.8 -> https://www.python.org/downloads/
|
|
62
|
+
- neuronum >= 4.0.0 -> https://pypi.org/project/neuronum/
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
------------------
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### **Connect to Neuronum**
|
|
69
|
+
Installation
|
|
70
|
+
```sh
|
|
71
|
+
pip install neuronum # install neuronum dependencies
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Create Cell:
|
|
75
|
+
```sh
|
|
76
|
+
neuronum create-cell # create Cell / Cell type / Cell network
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Connect Cell:
|
|
80
|
+
```sh
|
|
81
|
+
neuronum connect-cell # connect Cell
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
View connected Cell:
|
|
85
|
+
```sh
|
|
86
|
+
neuronum view-cell # view Cell / output = Connected Cell: 'your_cell'"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Disconnect Cell:
|
|
90
|
+
```sh
|
|
91
|
+
neuronum disconnect-cell # disconnect Cell
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Delete Cell:
|
|
95
|
+
```sh
|
|
96
|
+
neuronum delete-cell # delete Cell
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
------------------
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### **Build on Neuronum**
|
|
105
|
+
Initialize Node (default template):
|
|
106
|
+
```sh
|
|
107
|
+
neuronum init-node # initialize a Node with default template
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Initialize Node (stream template):
|
|
111
|
+
```sh
|
|
112
|
+
neuronum init-node --stream id::stx # initialize a Node with stream template
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Initialize Node (sync template):
|
|
116
|
+
```sh
|
|
117
|
+
neuronum init-node --sync id::stx # initialize a Node with sync template
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
cd to Node folder:
|
|
121
|
+
```sh
|
|
122
|
+
cd node_node_id # change to Node folder
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Start Node:
|
|
126
|
+
```sh
|
|
127
|
+
neuronum start-node # start Node
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Start Node (detached mode):
|
|
131
|
+
```sh
|
|
132
|
+
neuronum start-node --d # start Node in "detached" mode
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Stop Node:
|
|
136
|
+
```sh
|
|
137
|
+
neuronum stop-node # stop Node
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Connect Node:
|
|
141
|
+
```sh
|
|
142
|
+
neuronum connect-node # connect your Node / Node type / Node description
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Update Node:
|
|
146
|
+
```sh
|
|
147
|
+
neuronum update-node # update your Node
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Disconnect Node:
|
|
151
|
+
```sh
|
|
152
|
+
neuronum disconnect-node # disconnect your Node
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Delete Node:
|
|
156
|
+
```sh
|
|
157
|
+
neuronum delete-node # delete your Node
|
|
158
|
+
```
|
neuronum-4.0.0/README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
[](https://neuronum.net) [](https://github.com/neuronumcybernetics/neuronum)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### **Getting Started Goals**
|
|
7
|
+
- Learn about Neuronum
|
|
8
|
+
- Connect to Neuronum
|
|
9
|
+
- Build on Neuronum
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### **About Neuronum**
|
|
13
|
+
Neuronum is a central serverless data gateway automating the processing and distribution of data transmission, storage, and streaming.
|
|
14
|
+
In practice, Neuronum forms an interconnected network of soft- and hardware components (Nodes) exchanging data in real time.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### **Network Attributes**
|
|
18
|
+
**Cell & Nodes**
|
|
19
|
+
- Cell: Account to connect and interact with the Neuronum Network
|
|
20
|
+
- Nodes: Software and Hardware components connected to Neuronum
|
|
21
|
+
|
|
22
|
+
**Data Gateways**
|
|
23
|
+
- Transmitters (TX): Automate data transfer in standardized formats
|
|
24
|
+
- Circuits (CTX): Store data in cloud-based key-value-label databases
|
|
25
|
+
- Streams (STX): Stream, synchronize, and control data in real time
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#### Requirements
|
|
29
|
+
- Python >= 3.8 -> https://www.python.org/downloads/
|
|
30
|
+
- neuronum >= 4.0.0 -> https://pypi.org/project/neuronum/
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
------------------
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### **Connect to Neuronum**
|
|
37
|
+
Installation
|
|
38
|
+
```sh
|
|
39
|
+
pip install neuronum # install neuronum dependencies
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Create Cell:
|
|
43
|
+
```sh
|
|
44
|
+
neuronum create-cell # create Cell / Cell type / Cell network
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Connect Cell:
|
|
48
|
+
```sh
|
|
49
|
+
neuronum connect-cell # connect Cell
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
View connected Cell:
|
|
53
|
+
```sh
|
|
54
|
+
neuronum view-cell # view Cell / output = Connected Cell: 'your_cell'"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Disconnect Cell:
|
|
58
|
+
```sh
|
|
59
|
+
neuronum disconnect-cell # disconnect Cell
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Delete Cell:
|
|
63
|
+
```sh
|
|
64
|
+
neuronum delete-cell # delete Cell
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
------------------
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### **Build on Neuronum**
|
|
73
|
+
Initialize Node (default template):
|
|
74
|
+
```sh
|
|
75
|
+
neuronum init-node # initialize a Node with default template
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Initialize Node (stream template):
|
|
79
|
+
```sh
|
|
80
|
+
neuronum init-node --stream id::stx # initialize a Node with stream template
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Initialize Node (sync template):
|
|
84
|
+
```sh
|
|
85
|
+
neuronum init-node --sync id::stx # initialize a Node with sync template
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
cd to Node folder:
|
|
89
|
+
```sh
|
|
90
|
+
cd node_node_id # change to Node folder
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Start Node:
|
|
94
|
+
```sh
|
|
95
|
+
neuronum start-node # start Node
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Start Node (detached mode):
|
|
99
|
+
```sh
|
|
100
|
+
neuronum start-node --d # start Node in "detached" mode
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Stop Node:
|
|
104
|
+
```sh
|
|
105
|
+
neuronum stop-node # stop Node
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Connect Node:
|
|
109
|
+
```sh
|
|
110
|
+
neuronum connect-node # connect your Node / Node type / Node description
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Update Node:
|
|
114
|
+
```sh
|
|
115
|
+
neuronum update-node # update your Node
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Disconnect Node:
|
|
119
|
+
```sh
|
|
120
|
+
neuronum disconnect-node # disconnect your Node
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Delete Node:
|
|
124
|
+
```sh
|
|
125
|
+
neuronum delete-node # delete your Node
|
|
126
|
+
```
|
|
@@ -304,14 +304,12 @@ async def async_init_node(sync, stream):
|
|
|
304
304
|
tx = await cell.list_tx()
|
|
305
305
|
ctx = await cell.list_ctx()
|
|
306
306
|
stx = await cell.list_stx()
|
|
307
|
-
contracts = await cell.list_contracts()
|
|
308
307
|
nodes = await cell.list_nodes()
|
|
309
308
|
|
|
310
309
|
await asyncio.to_thread((project_path / "cells.json").write_text, json.dumps(cells, indent=4))
|
|
311
310
|
await asyncio.to_thread((project_path / "transmitters.json").write_text, json.dumps(tx, indent=4))
|
|
312
311
|
await asyncio.to_thread((project_path / "circuits.json").write_text, json.dumps(ctx, indent=4))
|
|
313
312
|
await asyncio.to_thread((project_path / "streams.json").write_text, json.dumps(stx, indent=4))
|
|
314
|
-
await asyncio.to_thread((project_path / "contracts.json").write_text, json.dumps(contracts, indent=4))
|
|
315
313
|
await asyncio.to_thread((project_path / "nodes.json").write_text, json.dumps(nodes, indent=4))
|
|
316
314
|
|
|
317
315
|
env_path = project_path / ".env"
|
|
@@ -334,8 +332,8 @@ async def async_init_node(sync, stream):
|
|
|
334
332
|
"link": "https://www.python.org/downloads/"
|
|
335
333
|
},
|
|
336
334
|
{
|
|
337
|
-
"name": "
|
|
338
|
-
"version": ">=
|
|
335
|
+
"name": "neuronum",
|
|
336
|
+
"version": ">= 4.0.0",
|
|
339
337
|
"link": "https://pypi.org/project/neuronum/"
|
|
340
338
|
}
|
|
341
339
|
],
|
|
@@ -483,57 +481,36 @@ async def main():
|
|
|
483
481
|
asyncio.run(main())
|
|
484
482
|
""")
|
|
485
483
|
|
|
486
|
-
scan_path = project_path / f"scan.py"
|
|
487
|
-
scan_path.write_text(f"""\
|
|
488
|
-
import asyncio
|
|
489
|
-
import neuronum
|
|
490
|
-
import os
|
|
491
|
-
from dotenv import load_dotenv
|
|
492
|
-
|
|
493
|
-
load_dotenv()
|
|
494
|
-
host = os.getenv("HOST")
|
|
495
|
-
password = os.getenv("PASSWORD")
|
|
496
|
-
network = os.getenv("NETWORK")
|
|
497
|
-
synapse = os.getenv("SYNAPSE")
|
|
498
|
-
|
|
499
|
-
cell = neuronum.Cell(
|
|
500
|
-
host=host,
|
|
501
|
-
password=password,
|
|
502
|
-
network=network,
|
|
503
|
-
synapse=synapse
|
|
504
|
-
)
|
|
505
|
-
|
|
506
|
-
async def main():
|
|
507
|
-
async for cp in cell.scan():
|
|
508
|
-
print(cp)
|
|
509
|
-
|
|
510
|
-
asyncio.run(main())
|
|
511
|
-
""")
|
|
512
|
-
|
|
513
484
|
click.echo(f"Neuronum Node '{nodeID}' initialized!")
|
|
514
485
|
|
|
515
486
|
|
|
516
487
|
@click.command()
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
"Scan for Neuronum Cells and Nodes (Ensure Bluetooth is enabled)",
|
|
520
|
-
choices=["On", "Off"]
|
|
521
|
-
).ask()
|
|
522
|
-
|
|
488
|
+
@click.option('--d', is_flag=True, help="Start node in detached mode")
|
|
489
|
+
def start_node(d):
|
|
523
490
|
click.echo("Starting Node...")
|
|
524
491
|
|
|
525
492
|
project_path = Path.cwd()
|
|
526
493
|
script_files = glob.glob("sync_*.py") + glob.glob("stream_*.py")
|
|
527
494
|
|
|
528
|
-
if scan_type == "On":
|
|
529
|
-
script_files += glob.glob("scan.py")
|
|
530
|
-
|
|
531
495
|
processes = []
|
|
496
|
+
system_name = platform.system()
|
|
532
497
|
|
|
533
498
|
for script in script_files:
|
|
534
499
|
script_path = project_path / script
|
|
535
500
|
if script_path.exists():
|
|
536
|
-
|
|
501
|
+
python_cmd = "pythonw" if system_name == "Windows" else "python"
|
|
502
|
+
|
|
503
|
+
if d:
|
|
504
|
+
process = subprocess.Popen(
|
|
505
|
+
["nohup", python_cmd, str(script_path), "&"] if system_name != "Windows"
|
|
506
|
+
else [python_cmd, str(script_path)],
|
|
507
|
+
stdout=subprocess.DEVNULL,
|
|
508
|
+
stderr=subprocess.DEVNULL,
|
|
509
|
+
start_new_session=True
|
|
510
|
+
)
|
|
511
|
+
else:
|
|
512
|
+
process = subprocess.Popen(["python", str(script_path)], start_new_session=True)
|
|
513
|
+
|
|
537
514
|
processes.append(process.pid)
|
|
538
515
|
|
|
539
516
|
if not processes:
|
|
@@ -546,7 +523,6 @@ def start_node():
|
|
|
546
523
|
click.echo("Node started successfully!")
|
|
547
524
|
|
|
548
525
|
|
|
549
|
-
|
|
550
526
|
@click.command()
|
|
551
527
|
def stop_node():
|
|
552
528
|
asyncio.run(async_stop_node())
|
|
@@ -720,14 +696,12 @@ async def async_update_node():
|
|
|
720
696
|
tx = await cell.list_tx()
|
|
721
697
|
ctx = await cell.list_ctx()
|
|
722
698
|
stx = await cell.list_stx()
|
|
723
|
-
contracts = await cell.list_contracts()
|
|
724
699
|
nodes = await cell.list_nodes()
|
|
725
700
|
|
|
726
701
|
await asyncio.to_thread(Path("cells.json").write_text, json.dumps(cells, indent=4))
|
|
727
702
|
await asyncio.to_thread(Path("transmitters.json").write_text, json.dumps(tx, indent=4))
|
|
728
703
|
await asyncio.to_thread(Path("circuits.json").write_text, json.dumps(ctx, indent=4))
|
|
729
704
|
await asyncio.to_thread(Path("streams.json").write_text, json.dumps(stx, indent=4))
|
|
730
|
-
await asyncio.to_thread(Path("contracts.json").write_text, json.dumps(contracts, indent=4))
|
|
731
705
|
await asyncio.to_thread(Path("nodes.json").write_text, json.dumps(nodes, indent=4))
|
|
732
706
|
|
|
733
707
|
click.echo(f"Neuronum Node '{nodeID}' updated! Visit: {node_url}")
|
|
@@ -827,16 +801,6 @@ async def async_delete_node():
|
|
|
827
801
|
click.echo(f"Neuronum Node '{nodeID}' deleted!")
|
|
828
802
|
|
|
829
803
|
|
|
830
|
-
|
|
831
|
-
@click.command()
|
|
832
|
-
def call_cellai():
|
|
833
|
-
try:
|
|
834
|
-
from cellai import cellai
|
|
835
|
-
cellai.main()
|
|
836
|
-
except ImportError:
|
|
837
|
-
click.echo("Cellai not found. Please check the necessary dependencies.")
|
|
838
|
-
|
|
839
|
-
|
|
840
804
|
cli.add_command(create_cell)
|
|
841
805
|
cli.add_command(connect_cell)
|
|
842
806
|
cli.add_command(view_cell)
|
|
@@ -849,7 +813,6 @@ cli.add_command(connect_node)
|
|
|
849
813
|
cli.add_command(update_node)
|
|
850
814
|
cli.add_command(disconnect_node)
|
|
851
815
|
cli.add_command(delete_node)
|
|
852
|
-
cli.add_command(call_cellai)
|
|
853
816
|
|
|
854
817
|
|
|
855
818
|
if __name__ == "__main__":
|
|
@@ -4,7 +4,6 @@ import ssl
|
|
|
4
4
|
import websockets
|
|
5
5
|
import json
|
|
6
6
|
import asyncio
|
|
7
|
-
from bleak import BleakScanner
|
|
8
7
|
|
|
9
8
|
class Cell:
|
|
10
9
|
def __init__(self, host: str, password: str, network: str, synapse: str):
|
|
@@ -410,7 +409,6 @@ class Cell:
|
|
|
410
409
|
await writer.wait_closed()
|
|
411
410
|
|
|
412
411
|
|
|
413
|
-
|
|
414
412
|
async def sync(self, stx: Optional[str] = None) -> AsyncGenerator[str, None]:
|
|
415
413
|
full_url = f"wss://{self.network}/sync/{stx}"
|
|
416
414
|
|
|
@@ -446,177 +444,4 @@ class Cell:
|
|
|
446
444
|
print(f"An unexpected error occurred: {e}")
|
|
447
445
|
|
|
448
446
|
|
|
449
|
-
async def sign_contract(self, contractID: str):
|
|
450
|
-
full_url = f"https://{self.network}/api/sign_contract"
|
|
451
|
-
|
|
452
|
-
sign_contract_payload = {
|
|
453
|
-
"contractID": contractID,
|
|
454
|
-
"cell": self.to_dict()
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
async with aiohttp.ClientSession() as session:
|
|
458
|
-
try:
|
|
459
|
-
async with session.post(full_url, json=sign_contract_payload) as response:
|
|
460
|
-
response.raise_for_status()
|
|
461
|
-
data = await response.json()
|
|
462
|
-
return data.get("token")
|
|
463
|
-
|
|
464
|
-
except aiohttp.ClientError as e:
|
|
465
|
-
print(f"Error sending request: {e}")
|
|
466
|
-
except Exception as e:
|
|
467
|
-
print(f"Unexpected error: {e}")
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
async def validate_token(self, token: str, cp: str, contractID: str):
|
|
471
|
-
full_url = f"https://{self.network}/api/validate_token"
|
|
472
|
-
|
|
473
|
-
validate_payload = {
|
|
474
|
-
"token": token,
|
|
475
|
-
"cp": cp,
|
|
476
|
-
"contractID": contractID,
|
|
477
|
-
"cell": self.to_dict()
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
async with aiohttp.ClientSession() as session:
|
|
481
|
-
try:
|
|
482
|
-
async with session.post(full_url, json=validate_payload) as response:
|
|
483
|
-
response.raise_for_status()
|
|
484
|
-
data = await response.json()
|
|
485
|
-
return data.get("validity")
|
|
486
|
-
|
|
487
|
-
except aiohttp.ClientError as e:
|
|
488
|
-
print(f"Error sending request: {e}")
|
|
489
|
-
except Exception as e:
|
|
490
|
-
print(f"Unexpected error: {e}")
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
async def request_token(self, cp: str, contractID: str):
|
|
494
|
-
full_url = f"https://{self.network}/api/request_token"
|
|
495
|
-
|
|
496
|
-
request_token_payload = {
|
|
497
|
-
"cp": cp,
|
|
498
|
-
"contractID": contractID,
|
|
499
|
-
"cell": self.to_dict()
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
async with aiohttp.ClientSession() as session:
|
|
503
|
-
try:
|
|
504
|
-
async with session.post(full_url, json=request_token_payload) as response:
|
|
505
|
-
response.raise_for_status()
|
|
506
|
-
data = await response.json()
|
|
507
|
-
print(f"Response from Neuronum: {data}")
|
|
508
|
-
return data
|
|
509
|
-
|
|
510
|
-
except aiohttp.ClientError as e:
|
|
511
|
-
print(f"Error sending request: {e}")
|
|
512
|
-
except Exception as e:
|
|
513
|
-
print(f"Unexpected error: {e}")
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
async def present_token(self, token: str, cp: str, contractID: str):
|
|
517
|
-
full_url = f"https://{self.network}/api/present_token"
|
|
518
|
-
|
|
519
|
-
present_token_payload = {
|
|
520
|
-
"token": token,
|
|
521
|
-
"cp": cp,
|
|
522
|
-
"contractID": contractID,
|
|
523
|
-
"cell": self.to_dict()
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
async with aiohttp.ClientSession() as session:
|
|
527
|
-
try:
|
|
528
|
-
async with session.post(full_url, json=present_token_payload) as response:
|
|
529
|
-
response.raise_for_status()
|
|
530
|
-
data = await response.json()
|
|
531
|
-
print(f"Response from Neuronum: {data}")
|
|
532
|
-
return data
|
|
533
|
-
|
|
534
|
-
except aiohttp.ClientError as e:
|
|
535
|
-
print(f"Error sending request: {e}")
|
|
536
|
-
except Exception as e:
|
|
537
|
-
print(f"Unexpected error: {e}")
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
async def create_contract(self, descr: str, details: dict, partners: list):
|
|
541
|
-
full_url = f"https://{self.network}/api/create_contract"
|
|
542
|
-
|
|
543
|
-
create_contract_payload = {
|
|
544
|
-
"cell": self.to_dict(),
|
|
545
|
-
"descr": descr,
|
|
546
|
-
"details": details,
|
|
547
|
-
"partners": partners
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
async with aiohttp.ClientSession() as session:
|
|
551
|
-
try:
|
|
552
|
-
async with session.post(full_url, json=create_contract_payload) as response:
|
|
553
|
-
response.raise_for_status()
|
|
554
|
-
data = await response.json()
|
|
555
|
-
return data.get("contractID")
|
|
556
|
-
|
|
557
|
-
except aiohttp.ClientError as e:
|
|
558
|
-
print(f"Error sending request: {e}")
|
|
559
|
-
except Exception as e:
|
|
560
|
-
print(f"Unexpected error: {e}")
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
async def delete_contract(self, contractID: str):
|
|
564
|
-
full_url = f"https://{self.network}/api/delete_contract"
|
|
565
|
-
|
|
566
|
-
request_payload = {
|
|
567
|
-
"cell": self.to_dict(),
|
|
568
|
-
"contractID": contractID
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
async with aiohttp.ClientSession() as session:
|
|
572
|
-
try:
|
|
573
|
-
async with session.post(full_url, json=request_payload) as response:
|
|
574
|
-
response.raise_for_status()
|
|
575
|
-
data = await response.json()
|
|
576
|
-
print(f"Response from Neuronum: {data}")
|
|
577
|
-
return data
|
|
578
|
-
|
|
579
|
-
except aiohttp.ClientError as e:
|
|
580
|
-
print(f"Error sending request: {e}")
|
|
581
|
-
except Exception as e:
|
|
582
|
-
print(f"Unexpected error: {e}")
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
async def list_contracts(self):
|
|
586
|
-
full_url = f"https://{self.network}/api/list_contracts"
|
|
587
|
-
|
|
588
|
-
list_contracts_payload = {
|
|
589
|
-
"cell": self.to_dict()
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
async with aiohttp.ClientSession() as session:
|
|
593
|
-
try:
|
|
594
|
-
async with session.get(full_url, json=list_contracts_payload) as response:
|
|
595
|
-
response.raise_for_status()
|
|
596
|
-
data = await response.json()
|
|
597
|
-
return data.get("Contracts", [])
|
|
598
|
-
|
|
599
|
-
except aiohttp.ClientError as e:
|
|
600
|
-
print(f"Error sending request: {e}")
|
|
601
|
-
except Exception as e:
|
|
602
|
-
print(f"Unexpected error: {e}")
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
def device_found(self, device, advertisement_data):
|
|
606
|
-
if device.name and (device.name.endswith("::cell") or device.name.endswith("::node")):
|
|
607
|
-
asyncio.create_task(self.queue.put(f"{device.name} - {device.address}"))
|
|
608
|
-
|
|
609
|
-
async def scan(self):
|
|
610
|
-
print("Scanning for Neuronum Cells & Nodes")
|
|
611
|
-
|
|
612
|
-
scanner = BleakScanner(self.device_found)
|
|
613
|
-
await scanner.start()
|
|
614
|
-
|
|
615
|
-
try:
|
|
616
|
-
while True:
|
|
617
|
-
yield await self.queue.get()
|
|
618
|
-
except asyncio.CancelledError:
|
|
619
|
-
await scanner.stop()
|
|
620
|
-
|
|
621
|
-
|
|
622
447
|
__all__ = ['Cell']
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: neuronum
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Summary: Official client library to interact with the Neuronum Network
|
|
5
|
+
Home-page: https://neuronum.net
|
|
6
|
+
Author: Neuronum Cybernetics
|
|
7
|
+
Author-email: welcome@neuronum.net
|
|
8
|
+
Project-URL: GitHub, https://github.com/neuronumcybernetics/neuronum
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: aiohttp
|
|
16
|
+
Requires-Dist: websockets
|
|
17
|
+
Requires-Dist: click
|
|
18
|
+
Requires-Dist: questionary
|
|
19
|
+
Requires-Dist: python-dotenv
|
|
20
|
+
Requires-Dist: requests
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: description
|
|
25
|
+
Dynamic: description-content-type
|
|
26
|
+
Dynamic: home-page
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: project-url
|
|
29
|
+
Dynamic: requires-dist
|
|
30
|
+
Dynamic: requires-python
|
|
31
|
+
Dynamic: summary
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
[](https://neuronum.net) [](https://github.com/neuronumcybernetics/neuronum)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### **Getting Started Goals**
|
|
39
|
+
- Learn about Neuronum
|
|
40
|
+
- Connect to Neuronum
|
|
41
|
+
- Build on Neuronum
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### **About Neuronum**
|
|
45
|
+
Neuronum is a central serverless data gateway automating the processing and distribution of data transmission, storage, and streaming.
|
|
46
|
+
In practice, Neuronum forms an interconnected network of soft- and hardware components (Nodes) exchanging data in real time.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### **Network Attributes**
|
|
50
|
+
**Cell & Nodes**
|
|
51
|
+
- Cell: Account to connect and interact with the Neuronum Network
|
|
52
|
+
- Nodes: Software and Hardware components connected to Neuronum
|
|
53
|
+
|
|
54
|
+
**Data Gateways**
|
|
55
|
+
- Transmitters (TX): Automate data transfer in standardized formats
|
|
56
|
+
- Circuits (CTX): Store data in cloud-based key-value-label databases
|
|
57
|
+
- Streams (STX): Stream, synchronize, and control data in real time
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
#### Requirements
|
|
61
|
+
- Python >= 3.8 -> https://www.python.org/downloads/
|
|
62
|
+
- neuronum >= 4.0.0 -> https://pypi.org/project/neuronum/
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
------------------
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### **Connect to Neuronum**
|
|
69
|
+
Installation
|
|
70
|
+
```sh
|
|
71
|
+
pip install neuronum # install neuronum dependencies
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Create Cell:
|
|
75
|
+
```sh
|
|
76
|
+
neuronum create-cell # create Cell / Cell type / Cell network
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Connect Cell:
|
|
80
|
+
```sh
|
|
81
|
+
neuronum connect-cell # connect Cell
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
View connected Cell:
|
|
85
|
+
```sh
|
|
86
|
+
neuronum view-cell # view Cell / output = Connected Cell: 'your_cell'"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Disconnect Cell:
|
|
90
|
+
```sh
|
|
91
|
+
neuronum disconnect-cell # disconnect Cell
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Delete Cell:
|
|
95
|
+
```sh
|
|
96
|
+
neuronum delete-cell # delete Cell
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
------------------
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### **Build on Neuronum**
|
|
105
|
+
Initialize Node (default template):
|
|
106
|
+
```sh
|
|
107
|
+
neuronum init-node # initialize a Node with default template
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Initialize Node (stream template):
|
|
111
|
+
```sh
|
|
112
|
+
neuronum init-node --stream id::stx # initialize a Node with stream template
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Initialize Node (sync template):
|
|
116
|
+
```sh
|
|
117
|
+
neuronum init-node --sync id::stx # initialize a Node with sync template
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
cd to Node folder:
|
|
121
|
+
```sh
|
|
122
|
+
cd node_node_id # change to Node folder
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Start Node:
|
|
126
|
+
```sh
|
|
127
|
+
neuronum start-node # start Node
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Start Node (detached mode):
|
|
131
|
+
```sh
|
|
132
|
+
neuronum start-node --d # start Node in "detached" mode
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Stop Node:
|
|
136
|
+
```sh
|
|
137
|
+
neuronum stop-node # stop Node
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Connect Node:
|
|
141
|
+
```sh
|
|
142
|
+
neuronum connect-node # connect your Node / Node type / Node description
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Update Node:
|
|
146
|
+
```sh
|
|
147
|
+
neuronum update-node # update your Node
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Disconnect Node:
|
|
151
|
+
```sh
|
|
152
|
+
neuronum disconnect-node # disconnect your Node
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Delete Node:
|
|
156
|
+
```sh
|
|
157
|
+
neuronum delete-node # delete your Node
|
|
158
|
+
```
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='neuronum',
|
|
5
|
-
version='
|
|
5
|
+
version='4.0.0',
|
|
6
6
|
author='Neuronum Cybernetics',
|
|
7
7
|
author_email='welcome@neuronum.net',
|
|
8
8
|
description='Official client library to interact with the Neuronum Network',
|
|
@@ -12,7 +12,7 @@ setup(
|
|
|
12
12
|
project_urls={
|
|
13
13
|
"GitHub": "https://github.com/neuronumcybernetics/neuronum",
|
|
14
14
|
},
|
|
15
|
-
packages=find_packages(include=["neuronum", "
|
|
15
|
+
packages=find_packages(include=["neuronum", "cli"]),
|
|
16
16
|
classifiers=[
|
|
17
17
|
"Programming Language :: Python :: 3",
|
|
18
18
|
"License :: OSI Approved :: MIT License",
|
|
@@ -25,7 +25,6 @@ setup(
|
|
|
25
25
|
'click',
|
|
26
26
|
'questionary',
|
|
27
27
|
'python-dotenv',
|
|
28
|
-
'bleak',
|
|
29
28
|
'requests',
|
|
30
29
|
],
|
|
31
30
|
entry_points={
|
neuronum-3.0.2/PKG-INFO
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: neuronum
|
|
3
|
-
Version: 3.0.2
|
|
4
|
-
Summary: Official client library to interact with the Neuronum Network
|
|
5
|
-
Home-page: https://neuronum.net
|
|
6
|
-
Author: Neuronum Cybernetics
|
|
7
|
-
Author-email: welcome@neuronum.net
|
|
8
|
-
Project-URL: GitHub, https://github.com/neuronumcybernetics/neuronum
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Requires-Python: >=3.8
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE
|
|
15
|
-
Requires-Dist: aiohttp
|
|
16
|
-
Requires-Dist: websockets
|
|
17
|
-
Requires-Dist: click
|
|
18
|
-
Requires-Dist: questionary
|
|
19
|
-
Requires-Dist: python-dotenv
|
|
20
|
-
Requires-Dist: bleak
|
|
21
|
-
Requires-Dist: requests
|
|
22
|
-
Dynamic: author
|
|
23
|
-
Dynamic: author-email
|
|
24
|
-
Dynamic: classifier
|
|
25
|
-
Dynamic: description
|
|
26
|
-
Dynamic: description-content-type
|
|
27
|
-
Dynamic: home-page
|
|
28
|
-
Dynamic: license-file
|
|
29
|
-
Dynamic: project-url
|
|
30
|
-
Dynamic: requires-dist
|
|
31
|
-
Dynamic: requires-python
|
|
32
|
-
Dynamic: summary
|
|
33
|
-
|
|
34
|
-

|
|
35
|
-
|
|
36
|
-
[](https://neuronum.net) [](https://github.com/neuronumcybernetics/neuronum)
|
|
37
|
-
|
|
38
|
-
A Getting Started into the Neuronum Network: Build, deploy and automate serverless data infrastructures for an interconnected world
|
|
39
|
-
|
|
40
|
-
### **What's New in neuronum 3.0.2**
|
|
41
|
-
- Added CLI feature in `neuronum connect-node`: Select whether your Node will be publicly or privately listed
|
|
42
|
-
|
|
43
|
-
### **New Feature Set**
|
|
44
|
-
- **Cell/Cell-CLI**: Create and manage your Neuronum Cell, a unique identity for interacting with the Network, directly from the command line.
|
|
45
|
-
- **Nodes/Node-CLI**: Setup and manage Neuronum Nodes, the software and hardware components that power the Network, via the command line.
|
|
46
|
-
- **Transmitters (TX)**: Automate economic data transfer using predefined templates for standardized data exchange.
|
|
47
|
-
- **Circuits (CTX)**: Store, manage, and retrieve structured data with Circuits, a cloud-based Key-Value-Label database.
|
|
48
|
-
- **Streams (STX)**: Stream, synchronize, and control data in real time, enabling dynamic and responsive data flows.
|
|
49
|
-
- **Contracts/Tokens**: Automate service exchange and authorization, ensuring secure interactions between Cells and Nodes.
|
|
50
|
-
- **Scan**: Discover Cells and Nodes via BLE-based scanning, powered by Bleak, for seamless network integration.
|
|
51
|
-
- **Cellai**: A local AI assistant currently in development (version 0.0.1). While still evolving, Cellai is designed to automate communication between Cells and Nodes, optimizing intelligent data flow and network interactions in future releases.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## Getting Started Goals
|
|
55
|
-
- **Neuronum Cell**: Create a Cell to start interacting with the Network
|
|
56
|
-
- **Neuronum Node**: Setup a Node that streams and syncs the message: Hello, Neuronum! in real-time
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### Requirements
|
|
60
|
-
- Python >= 3.8 -> https://www.python.org/downloads/
|
|
61
|
-
- neuronum >= 3.0.0 -> https://pypi.org/project/neuronum/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
### Installation
|
|
65
|
-
Install the Neuronum library:
|
|
66
|
-
```sh
|
|
67
|
-
$ pip install neuronum # install the neuronum dependencies
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### Neuronum Cell
|
|
71
|
-
Create your Cell:
|
|
72
|
-
```sh
|
|
73
|
-
$ neuronum create-cell # create Cell / select network and type
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Connect your Cell:
|
|
77
|
-
```sh
|
|
78
|
-
$ neuronum connect-cell # connect Cell
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
View connected Cell:
|
|
82
|
-
```sh
|
|
83
|
-
$ neuronum view-cell # view Cell ID / output = Connected Cell: 'your_cell_id'"
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Neuronum Node
|
|
87
|
-
Initialize your Node:
|
|
88
|
-
```sh
|
|
89
|
-
$ neuronum init-node # initialize a Node with default template
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
cd into Node Folder:
|
|
93
|
-
```sh
|
|
94
|
-
$ cd node_nodeID # change directory
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Start your Node:
|
|
98
|
-
```sh
|
|
99
|
-
$ neuronum start-node # start Node / scan = Off / output = "Hello, Neuronum!"
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Stop your Node:
|
|
103
|
-
```sh
|
|
104
|
-
$ neuronum stop-node # stop Node
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Connect your Node:
|
|
108
|
-
```sh
|
|
109
|
-
$ neuronum connect-node # connect your Node / Node description = Test Node
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Update your Node:
|
|
113
|
-
```sh
|
|
114
|
-
$ neuronum update-node # update your Node
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Disconnect your Node:
|
|
118
|
-
```sh
|
|
119
|
-
$ neuronum disconnect-node # disconnect your Node
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Delete your Node:
|
|
123
|
-
```sh
|
|
124
|
-
$ neuronum delete-node # delete your Node
|
|
125
|
-
```
|
neuronum-3.0.2/README.md
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
[](https://neuronum.net) [](https://github.com/neuronumcybernetics/neuronum)
|
|
4
|
-
|
|
5
|
-
A Getting Started into the Neuronum Network: Build, deploy and automate serverless data infrastructures for an interconnected world
|
|
6
|
-
|
|
7
|
-
### **What's New in neuronum 3.0.2**
|
|
8
|
-
- Added CLI feature in `neuronum connect-node`: Select whether your Node will be publicly or privately listed
|
|
9
|
-
|
|
10
|
-
### **New Feature Set**
|
|
11
|
-
- **Cell/Cell-CLI**: Create and manage your Neuronum Cell, a unique identity for interacting with the Network, directly from the command line.
|
|
12
|
-
- **Nodes/Node-CLI**: Setup and manage Neuronum Nodes, the software and hardware components that power the Network, via the command line.
|
|
13
|
-
- **Transmitters (TX)**: Automate economic data transfer using predefined templates for standardized data exchange.
|
|
14
|
-
- **Circuits (CTX)**: Store, manage, and retrieve structured data with Circuits, a cloud-based Key-Value-Label database.
|
|
15
|
-
- **Streams (STX)**: Stream, synchronize, and control data in real time, enabling dynamic and responsive data flows.
|
|
16
|
-
- **Contracts/Tokens**: Automate service exchange and authorization, ensuring secure interactions between Cells and Nodes.
|
|
17
|
-
- **Scan**: Discover Cells and Nodes via BLE-based scanning, powered by Bleak, for seamless network integration.
|
|
18
|
-
- **Cellai**: A local AI assistant currently in development (version 0.0.1). While still evolving, Cellai is designed to automate communication between Cells and Nodes, optimizing intelligent data flow and network interactions in future releases.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## Getting Started Goals
|
|
22
|
-
- **Neuronum Cell**: Create a Cell to start interacting with the Network
|
|
23
|
-
- **Neuronum Node**: Setup a Node that streams and syncs the message: Hello, Neuronum! in real-time
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### Requirements
|
|
27
|
-
- Python >= 3.8 -> https://www.python.org/downloads/
|
|
28
|
-
- neuronum >= 3.0.0 -> https://pypi.org/project/neuronum/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### Installation
|
|
32
|
-
Install the Neuronum library:
|
|
33
|
-
```sh
|
|
34
|
-
$ pip install neuronum # install the neuronum dependencies
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Neuronum Cell
|
|
38
|
-
Create your Cell:
|
|
39
|
-
```sh
|
|
40
|
-
$ neuronum create-cell # create Cell / select network and type
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Connect your Cell:
|
|
44
|
-
```sh
|
|
45
|
-
$ neuronum connect-cell # connect Cell
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
View connected Cell:
|
|
49
|
-
```sh
|
|
50
|
-
$ neuronum view-cell # view Cell ID / output = Connected Cell: 'your_cell_id'"
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Neuronum Node
|
|
54
|
-
Initialize your Node:
|
|
55
|
-
```sh
|
|
56
|
-
$ neuronum init-node # initialize a Node with default template
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
cd into Node Folder:
|
|
60
|
-
```sh
|
|
61
|
-
$ cd node_nodeID # change directory
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Start your Node:
|
|
65
|
-
```sh
|
|
66
|
-
$ neuronum start-node # start Node / scan = Off / output = "Hello, Neuronum!"
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Stop your Node:
|
|
70
|
-
```sh
|
|
71
|
-
$ neuronum stop-node # stop Node
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Connect your Node:
|
|
75
|
-
```sh
|
|
76
|
-
$ neuronum connect-node # connect your Node / Node description = Test Node
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Update your Node:
|
|
80
|
-
```sh
|
|
81
|
-
$ neuronum update-node # update your Node
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Disconnect your Node:
|
|
85
|
-
```sh
|
|
86
|
-
$ neuronum disconnect-node # disconnect your Node
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Delete your Node:
|
|
90
|
-
```sh
|
|
91
|
-
$ neuronum delete-node # delete your Node
|
|
92
|
-
```
|
neuronum-3.0.2/cellai/cellai.py
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
def main():
|
|
2
|
-
print("Hello, it's your task assistant Cellai")
|
|
3
|
-
print("I'm still in development, but my creators are happy to share updates.")
|
|
4
|
-
print("Feel free to reach out to them at <welcome@neuronum.net> for more details.")
|
|
5
|
-
|
|
6
|
-
if __name__ == "__main__":
|
|
7
|
-
main()
|
neuronum-3.0.2/cli/__init__.py
DELETED
|
File without changes
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: neuronum
|
|
3
|
-
Version: 3.0.2
|
|
4
|
-
Summary: Official client library to interact with the Neuronum Network
|
|
5
|
-
Home-page: https://neuronum.net
|
|
6
|
-
Author: Neuronum Cybernetics
|
|
7
|
-
Author-email: welcome@neuronum.net
|
|
8
|
-
Project-URL: GitHub, https://github.com/neuronumcybernetics/neuronum
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Requires-Python: >=3.8
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE
|
|
15
|
-
Requires-Dist: aiohttp
|
|
16
|
-
Requires-Dist: websockets
|
|
17
|
-
Requires-Dist: click
|
|
18
|
-
Requires-Dist: questionary
|
|
19
|
-
Requires-Dist: python-dotenv
|
|
20
|
-
Requires-Dist: bleak
|
|
21
|
-
Requires-Dist: requests
|
|
22
|
-
Dynamic: author
|
|
23
|
-
Dynamic: author-email
|
|
24
|
-
Dynamic: classifier
|
|
25
|
-
Dynamic: description
|
|
26
|
-
Dynamic: description-content-type
|
|
27
|
-
Dynamic: home-page
|
|
28
|
-
Dynamic: license-file
|
|
29
|
-
Dynamic: project-url
|
|
30
|
-
Dynamic: requires-dist
|
|
31
|
-
Dynamic: requires-python
|
|
32
|
-
Dynamic: summary
|
|
33
|
-
|
|
34
|
-

|
|
35
|
-
|
|
36
|
-
[](https://neuronum.net) [](https://github.com/neuronumcybernetics/neuronum)
|
|
37
|
-
|
|
38
|
-
A Getting Started into the Neuronum Network: Build, deploy and automate serverless data infrastructures for an interconnected world
|
|
39
|
-
|
|
40
|
-
### **What's New in neuronum 3.0.2**
|
|
41
|
-
- Added CLI feature in `neuronum connect-node`: Select whether your Node will be publicly or privately listed
|
|
42
|
-
|
|
43
|
-
### **New Feature Set**
|
|
44
|
-
- **Cell/Cell-CLI**: Create and manage your Neuronum Cell, a unique identity for interacting with the Network, directly from the command line.
|
|
45
|
-
- **Nodes/Node-CLI**: Setup and manage Neuronum Nodes, the software and hardware components that power the Network, via the command line.
|
|
46
|
-
- **Transmitters (TX)**: Automate economic data transfer using predefined templates for standardized data exchange.
|
|
47
|
-
- **Circuits (CTX)**: Store, manage, and retrieve structured data with Circuits, a cloud-based Key-Value-Label database.
|
|
48
|
-
- **Streams (STX)**: Stream, synchronize, and control data in real time, enabling dynamic and responsive data flows.
|
|
49
|
-
- **Contracts/Tokens**: Automate service exchange and authorization, ensuring secure interactions between Cells and Nodes.
|
|
50
|
-
- **Scan**: Discover Cells and Nodes via BLE-based scanning, powered by Bleak, for seamless network integration.
|
|
51
|
-
- **Cellai**: A local AI assistant currently in development (version 0.0.1). While still evolving, Cellai is designed to automate communication between Cells and Nodes, optimizing intelligent data flow and network interactions in future releases.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## Getting Started Goals
|
|
55
|
-
- **Neuronum Cell**: Create a Cell to start interacting with the Network
|
|
56
|
-
- **Neuronum Node**: Setup a Node that streams and syncs the message: Hello, Neuronum! in real-time
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### Requirements
|
|
60
|
-
- Python >= 3.8 -> https://www.python.org/downloads/
|
|
61
|
-
- neuronum >= 3.0.0 -> https://pypi.org/project/neuronum/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
### Installation
|
|
65
|
-
Install the Neuronum library:
|
|
66
|
-
```sh
|
|
67
|
-
$ pip install neuronum # install the neuronum dependencies
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### Neuronum Cell
|
|
71
|
-
Create your Cell:
|
|
72
|
-
```sh
|
|
73
|
-
$ neuronum create-cell # create Cell / select network and type
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Connect your Cell:
|
|
77
|
-
```sh
|
|
78
|
-
$ neuronum connect-cell # connect Cell
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
View connected Cell:
|
|
82
|
-
```sh
|
|
83
|
-
$ neuronum view-cell # view Cell ID / output = Connected Cell: 'your_cell_id'"
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Neuronum Node
|
|
87
|
-
Initialize your Node:
|
|
88
|
-
```sh
|
|
89
|
-
$ neuronum init-node # initialize a Node with default template
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
cd into Node Folder:
|
|
93
|
-
```sh
|
|
94
|
-
$ cd node_nodeID # change directory
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Start your Node:
|
|
98
|
-
```sh
|
|
99
|
-
$ neuronum start-node # start Node / scan = Off / output = "Hello, Neuronum!"
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Stop your Node:
|
|
103
|
-
```sh
|
|
104
|
-
$ neuronum stop-node # stop Node
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Connect your Node:
|
|
108
|
-
```sh
|
|
109
|
-
$ neuronum connect-node # connect your Node / Node description = Test Node
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Update your Node:
|
|
113
|
-
```sh
|
|
114
|
-
$ neuronum update-node # update your Node
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Disconnect your Node:
|
|
118
|
-
```sh
|
|
119
|
-
$ neuronum disconnect-node # disconnect your Node
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Delete your Node:
|
|
123
|
-
```sh
|
|
124
|
-
$ neuronum delete-node # delete your Node
|
|
125
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|