neuronum 5.4.1__tar.gz → 5.4.3__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-5.4.1/LICENSE → neuronum-5.4.3/LICENSE.md +27 -1
- neuronum-5.4.3/PKG-INFO +146 -0
- neuronum-5.4.3/README.md +114 -0
- {neuronum-5.4.1 → neuronum-5.4.3}/cli/main.py +0 -37
- {neuronum-5.4.1 → neuronum-5.4.3}/neuronum/neuronum.py +4 -7
- neuronum-5.4.3/neuronum.egg-info/PKG-INFO +146 -0
- {neuronum-5.4.1 → neuronum-5.4.3}/neuronum.egg-info/SOURCES.txt +1 -3
- {neuronum-5.4.1 → neuronum-5.4.3}/neuronum.egg-info/requires.txt +0 -1
- {neuronum-5.4.1 → neuronum-5.4.3}/neuronum.egg-info/top_level.txt +0 -1
- {neuronum-5.4.1 → neuronum-5.4.3}/setup.py +2 -3
- neuronum-5.4.1/PKG-INFO +0 -144
- neuronum-5.4.1/README.md +0 -111
- neuronum-5.4.1/cellai/cellai.py +0 -118
- neuronum-5.4.1/cli/__init__.py +0 -0
- neuronum-5.4.1/neuronum.egg-info/PKG-INFO +0 -144
- {neuronum-5.4.1/cellai → neuronum-5.4.3/cli}/__init__.py +0 -0
- {neuronum-5.4.1 → neuronum-5.4.3}/neuronum/__init__.py +0 -0
- {neuronum-5.4.1 → neuronum-5.4.3}/neuronum.egg-info/dependency_links.txt +0 -0
- {neuronum-5.4.1 → neuronum-5.4.3}/neuronum.egg-info/entry_points.txt +0 -0
- {neuronum-5.4.1 → neuronum-5.4.3}/setup.cfg +0 -0
|
@@ -1,6 +1,29 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<img src="https://neuronum.net/static/neuronum.svg" alt="Neuronum" width="80">
|
|
3
|
+
</h1>
|
|
4
|
+
<h4 align="center">LICENSE of the Neuronum library</h4>
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://neuronum.net">
|
|
8
|
+
<img src="https://img.shields.io/badge/Website-Neuronum-blue" alt="Website">
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://github.com/neuronumcybernetics/neuronum">
|
|
11
|
+
<img src="https://img.shields.io/badge/Docs-Read%20now-green" alt="Documentation">
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://pypi.org/project/neuronum/">
|
|
14
|
+
<img src="https://img.shields.io/pypi/v/neuronum.svg" alt="PyPI Version">
|
|
15
|
+
</a>
|
|
16
|
+
<img src="https://img.shields.io/badge/Python-3.8%2B-yellow" alt="Python Version">
|
|
17
|
+
<a href="https://github.com/neuronumcybernetics/neuronum/blob/main/LICENSE.md">
|
|
18
|
+
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
|
|
19
|
+
</a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
1
24
|
MIT License
|
|
2
25
|
|
|
3
|
-
Copyright (c)
|
|
26
|
+
Copyright (c) 2025 Neuronum Cybernetics UG (limited liability)
|
|
4
27
|
|
|
5
28
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
29
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -19,3 +42,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
42
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
43
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
44
|
SOFTWARE.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
neuronum-5.4.3/PKG-INFO
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: neuronum
|
|
3
|
+
Version: 5.4.3
|
|
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.md
|
|
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
|
+
<h1 align="center">
|
|
34
|
+
<img src="https://neuronum.net/static/neuronum.svg" alt="Neuronum" width="80">
|
|
35
|
+
</h1>
|
|
36
|
+
<h4 align="center">Build, connect, and automate serverless data infrastructures with Neuronum</h4>
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<a href="https://neuronum.net">
|
|
40
|
+
<img src="https://img.shields.io/badge/Website-Neuronum-blue" alt="Website">
|
|
41
|
+
</a>
|
|
42
|
+
<a href="https://github.com/neuronumcybernetics/neuronum">
|
|
43
|
+
<img src="https://img.shields.io/badge/Docs-Read%20now-green" alt="Documentation">
|
|
44
|
+
</a>
|
|
45
|
+
<a href="https://pypi.org/project/neuronum/">
|
|
46
|
+
<img src="https://img.shields.io/pypi/v/neuronum.svg" alt="PyPI Version">
|
|
47
|
+
</a>
|
|
48
|
+
<img src="https://img.shields.io/badge/Python-3.8%2B-yellow" alt="Python Version">
|
|
49
|
+
<a href="https://github.com/neuronumcybernetics/neuronum/blob/main/LICENSE.md">
|
|
50
|
+
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
|
|
51
|
+
</a>
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### **About Neuronum**
|
|
57
|
+
Neuronum is a python framework to build serverless connected app & data gateways automating the processing and distribution of real-time data transmission, storage, and streaming.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### **Features**
|
|
61
|
+
**Cell & Nodes**
|
|
62
|
+
- Cell: Account to connect and interact with Neuronum. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/cell)
|
|
63
|
+
- Nodes: Soft- and Hardware components hosting gateways. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/nodes)
|
|
64
|
+
|
|
65
|
+
**Gateways**
|
|
66
|
+
- Transmitters (TX): Securely transmit and receive data packages. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/transmitters)
|
|
67
|
+
- Circuits (CTX): Store data in cloud-based key-value-label databases. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/circuits)
|
|
68
|
+
- Streams (STX): Stream, synchronize, and control data in real time. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/streams)
|
|
69
|
+
|
|
70
|
+
### Requirements
|
|
71
|
+
- Python >= 3.8
|
|
72
|
+
- neuronum >= 5.4.0
|
|
73
|
+
|
|
74
|
+
------------------
|
|
75
|
+
|
|
76
|
+
### **Connect To Neuronum**
|
|
77
|
+
Installation (optional but recommended: create a virtual environment)
|
|
78
|
+
```sh
|
|
79
|
+
pip install neuronum # install Neuronum dependencies
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Create your Cell:
|
|
83
|
+
```sh
|
|
84
|
+
neuronum create-cell # create Cell / Cell type / Cell network
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
or
|
|
88
|
+
|
|
89
|
+
Connect your Cell:
|
|
90
|
+
```sh
|
|
91
|
+
neuronum connect-cell # connect Cell
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
------------------
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### **Build On Neuronum** **[(Build with Node Examples)](https://github.com/neuronumcybernetics/neuronum/tree/main/features/nodes)**
|
|
98
|
+
Initialize a Node (app template):
|
|
99
|
+
```sh
|
|
100
|
+
neuronum init-node --app # initialize a Node with app template
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Change into Node folder
|
|
104
|
+
```sh
|
|
105
|
+
cd node_node_id # change directory
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Start your Node:
|
|
109
|
+
```sh
|
|
110
|
+
neuronum start-node # start Node
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
------------------
|
|
114
|
+
|
|
115
|
+
### **Interact with Neuronum**
|
|
116
|
+
#### **Web-based**
|
|
117
|
+
1. [Visit Neuronum](https://neuronum.net)
|
|
118
|
+
2. [Connect your Cell](https://neuronum.net/connect)
|
|
119
|
+
3. [Explore Transmitters](https://neuronum.net/explore)
|
|
120
|
+
4. Activate Transmitters
|
|
121
|
+
|
|
122
|
+
#### **Code-based**
|
|
123
|
+
Activate Transmitters (TX) to send requests and receive responses
|
|
124
|
+
```python
|
|
125
|
+
import asyncio
|
|
126
|
+
import neuronum
|
|
127
|
+
|
|
128
|
+
cell = neuronum.Cell( # set Cell connection
|
|
129
|
+
host="host", # Cell host
|
|
130
|
+
password="password", # Cell password
|
|
131
|
+
network="neuronum.net", # Cell network -> neuronum.net
|
|
132
|
+
synapse="synapse" # Cell synapse
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
async def main():
|
|
136
|
+
|
|
137
|
+
TX = txID # select the Transmitter TX
|
|
138
|
+
data = {
|
|
139
|
+
"say": "hello",
|
|
140
|
+
}
|
|
141
|
+
tx_response = await cell.activate_tx(TX, data) # activate TX - > get response back
|
|
142
|
+
print(tx_response) # print Cell list
|
|
143
|
+
|
|
144
|
+
asyncio.run(main())
|
|
145
|
+
```
|
|
146
|
+
|
neuronum-5.4.3/README.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<img src="https://neuronum.net/static/neuronum.svg" alt="Neuronum" width="80">
|
|
3
|
+
</h1>
|
|
4
|
+
<h4 align="center">Build, connect, and automate serverless data infrastructures with Neuronum</h4>
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://neuronum.net">
|
|
8
|
+
<img src="https://img.shields.io/badge/Website-Neuronum-blue" alt="Website">
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://github.com/neuronumcybernetics/neuronum">
|
|
11
|
+
<img src="https://img.shields.io/badge/Docs-Read%20now-green" alt="Documentation">
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://pypi.org/project/neuronum/">
|
|
14
|
+
<img src="https://img.shields.io/pypi/v/neuronum.svg" alt="PyPI Version">
|
|
15
|
+
</a>
|
|
16
|
+
<img src="https://img.shields.io/badge/Python-3.8%2B-yellow" alt="Python Version">
|
|
17
|
+
<a href="https://github.com/neuronumcybernetics/neuronum/blob/main/LICENSE.md">
|
|
18
|
+
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
|
|
19
|
+
</a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### **About Neuronum**
|
|
25
|
+
Neuronum is a python framework to build serverless connected app & data gateways automating the processing and distribution of real-time data transmission, storage, and streaming.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### **Features**
|
|
29
|
+
**Cell & Nodes**
|
|
30
|
+
- Cell: Account to connect and interact with Neuronum. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/cell)
|
|
31
|
+
- Nodes: Soft- and Hardware components hosting gateways. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/nodes)
|
|
32
|
+
|
|
33
|
+
**Gateways**
|
|
34
|
+
- Transmitters (TX): Securely transmit and receive data packages. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/transmitters)
|
|
35
|
+
- Circuits (CTX): Store data in cloud-based key-value-label databases. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/circuits)
|
|
36
|
+
- Streams (STX): Stream, synchronize, and control data in real time. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/streams)
|
|
37
|
+
|
|
38
|
+
### Requirements
|
|
39
|
+
- Python >= 3.8
|
|
40
|
+
- neuronum >= 5.4.0
|
|
41
|
+
|
|
42
|
+
------------------
|
|
43
|
+
|
|
44
|
+
### **Connect To Neuronum**
|
|
45
|
+
Installation (optional but recommended: create a virtual environment)
|
|
46
|
+
```sh
|
|
47
|
+
pip install neuronum # install Neuronum dependencies
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Create your Cell:
|
|
51
|
+
```sh
|
|
52
|
+
neuronum create-cell # create Cell / Cell type / Cell network
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
or
|
|
56
|
+
|
|
57
|
+
Connect your Cell:
|
|
58
|
+
```sh
|
|
59
|
+
neuronum connect-cell # connect Cell
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
------------------
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### **Build On Neuronum** **[(Build with Node Examples)](https://github.com/neuronumcybernetics/neuronum/tree/main/features/nodes)**
|
|
66
|
+
Initialize a Node (app template):
|
|
67
|
+
```sh
|
|
68
|
+
neuronum init-node --app # initialize a Node with app template
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Change into Node folder
|
|
72
|
+
```sh
|
|
73
|
+
cd node_node_id # change directory
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Start your Node:
|
|
77
|
+
```sh
|
|
78
|
+
neuronum start-node # start Node
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
------------------
|
|
82
|
+
|
|
83
|
+
### **Interact with Neuronum**
|
|
84
|
+
#### **Web-based**
|
|
85
|
+
1. [Visit Neuronum](https://neuronum.net)
|
|
86
|
+
2. [Connect your Cell](https://neuronum.net/connect)
|
|
87
|
+
3. [Explore Transmitters](https://neuronum.net/explore)
|
|
88
|
+
4. Activate Transmitters
|
|
89
|
+
|
|
90
|
+
#### **Code-based**
|
|
91
|
+
Activate Transmitters (TX) to send requests and receive responses
|
|
92
|
+
```python
|
|
93
|
+
import asyncio
|
|
94
|
+
import neuronum
|
|
95
|
+
|
|
96
|
+
cell = neuronum.Cell( # set Cell connection
|
|
97
|
+
host="host", # Cell host
|
|
98
|
+
password="password", # Cell password
|
|
99
|
+
network="neuronum.net", # Cell network -> neuronum.net
|
|
100
|
+
synapse="synapse" # Cell synapse
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
async def main():
|
|
104
|
+
|
|
105
|
+
TX = txID # select the Transmitter TX
|
|
106
|
+
data = {
|
|
107
|
+
"say": "hello",
|
|
108
|
+
}
|
|
109
|
+
tx_response = await cell.activate_tx(TX, data) # activate TX - > get response back
|
|
110
|
+
print(tx_response) # print Cell list
|
|
111
|
+
|
|
112
|
+
asyncio.run(main())
|
|
113
|
+
```
|
|
114
|
+
|
|
@@ -872,42 +872,6 @@ async def async_delete_node():
|
|
|
872
872
|
click.echo(f"Neuronum Node '{nodeID}' deleted!")
|
|
873
873
|
|
|
874
874
|
|
|
875
|
-
@click.command()
|
|
876
|
-
def call_cellai():
|
|
877
|
-
try:
|
|
878
|
-
credentials_folder_path = Path.home() / ".neuronum"
|
|
879
|
-
env_path = credentials_folder_path / ".env"
|
|
880
|
-
|
|
881
|
-
env_data = {}
|
|
882
|
-
|
|
883
|
-
try:
|
|
884
|
-
with open(env_path, "r") as f:
|
|
885
|
-
for line in f:
|
|
886
|
-
key, value = line.strip().split("=")
|
|
887
|
-
env_data[key] = value
|
|
888
|
-
|
|
889
|
-
host = env_data.get("HOST", "")
|
|
890
|
-
password = env_data.get("PASSWORD", "")
|
|
891
|
-
network = env_data.get("NETWORK", "")
|
|
892
|
-
synapse = env_data.get("SYNAPSE", "")
|
|
893
|
-
except FileNotFoundError:
|
|
894
|
-
click.echo("No cell connected. Connect your cell with command neuronum connect-cell")
|
|
895
|
-
return
|
|
896
|
-
except Exception as e:
|
|
897
|
-
click.echo(f"Error reading .env file: {e}")
|
|
898
|
-
return
|
|
899
|
-
|
|
900
|
-
from cellai import cellai
|
|
901
|
-
asyncio.run(cellai.main(host, password, network, synapse))
|
|
902
|
-
|
|
903
|
-
except FileNotFoundError:
|
|
904
|
-
click.echo("Error: .env with credentials not found")
|
|
905
|
-
except ImportError:
|
|
906
|
-
click.echo("Cellai not found. Please check the necessary dependencies.")
|
|
907
|
-
except Exception as e:
|
|
908
|
-
click.echo(f"Unexpected error: {e}")
|
|
909
|
-
|
|
910
|
-
|
|
911
875
|
cli.add_command(create_cell)
|
|
912
876
|
cli.add_command(connect_cell)
|
|
913
877
|
cli.add_command(view_cell)
|
|
@@ -920,7 +884,6 @@ cli.add_command(connect_node)
|
|
|
920
884
|
cli.add_command(update_node)
|
|
921
885
|
cli.add_command(disconnect_node)
|
|
922
886
|
cli.add_command(delete_node)
|
|
923
|
-
cli.add_command(call_cellai)
|
|
924
887
|
|
|
925
888
|
|
|
926
889
|
if __name__ == "__main__":
|
|
@@ -172,13 +172,10 @@ class Cell:
|
|
|
172
172
|
async with session.post(url, json=TX) as response:
|
|
173
173
|
response.raise_for_status()
|
|
174
174
|
data = await response.json()
|
|
175
|
-
if data.get("success") ==
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if "json" in data:
|
|
180
|
-
return data
|
|
181
|
-
elif "html" in data:
|
|
175
|
+
if data.get("success") == True:
|
|
176
|
+
if "json" in data.get("response"):
|
|
177
|
+
return data.get("response").get("json")
|
|
178
|
+
elif "html" in data.get("response"):
|
|
182
179
|
return "Info: HTML response available. Please activate TX in browser."
|
|
183
180
|
else:
|
|
184
181
|
return "Info: Response received but contains no usable content."
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: neuronum
|
|
3
|
+
Version: 5.4.3
|
|
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.md
|
|
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
|
+
<h1 align="center">
|
|
34
|
+
<img src="https://neuronum.net/static/neuronum.svg" alt="Neuronum" width="80">
|
|
35
|
+
</h1>
|
|
36
|
+
<h4 align="center">Build, connect, and automate serverless data infrastructures with Neuronum</h4>
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<a href="https://neuronum.net">
|
|
40
|
+
<img src="https://img.shields.io/badge/Website-Neuronum-blue" alt="Website">
|
|
41
|
+
</a>
|
|
42
|
+
<a href="https://github.com/neuronumcybernetics/neuronum">
|
|
43
|
+
<img src="https://img.shields.io/badge/Docs-Read%20now-green" alt="Documentation">
|
|
44
|
+
</a>
|
|
45
|
+
<a href="https://pypi.org/project/neuronum/">
|
|
46
|
+
<img src="https://img.shields.io/pypi/v/neuronum.svg" alt="PyPI Version">
|
|
47
|
+
</a>
|
|
48
|
+
<img src="https://img.shields.io/badge/Python-3.8%2B-yellow" alt="Python Version">
|
|
49
|
+
<a href="https://github.com/neuronumcybernetics/neuronum/blob/main/LICENSE.md">
|
|
50
|
+
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
|
|
51
|
+
</a>
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### **About Neuronum**
|
|
57
|
+
Neuronum is a python framework to build serverless connected app & data gateways automating the processing and distribution of real-time data transmission, storage, and streaming.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### **Features**
|
|
61
|
+
**Cell & Nodes**
|
|
62
|
+
- Cell: Account to connect and interact with Neuronum. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/cell)
|
|
63
|
+
- Nodes: Soft- and Hardware components hosting gateways. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/nodes)
|
|
64
|
+
|
|
65
|
+
**Gateways**
|
|
66
|
+
- Transmitters (TX): Securely transmit and receive data packages. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/transmitters)
|
|
67
|
+
- Circuits (CTX): Store data in cloud-based key-value-label databases. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/circuits)
|
|
68
|
+
- Streams (STX): Stream, synchronize, and control data in real time. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/streams)
|
|
69
|
+
|
|
70
|
+
### Requirements
|
|
71
|
+
- Python >= 3.8
|
|
72
|
+
- neuronum >= 5.4.0
|
|
73
|
+
|
|
74
|
+
------------------
|
|
75
|
+
|
|
76
|
+
### **Connect To Neuronum**
|
|
77
|
+
Installation (optional but recommended: create a virtual environment)
|
|
78
|
+
```sh
|
|
79
|
+
pip install neuronum # install Neuronum dependencies
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Create your Cell:
|
|
83
|
+
```sh
|
|
84
|
+
neuronum create-cell # create Cell / Cell type / Cell network
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
or
|
|
88
|
+
|
|
89
|
+
Connect your Cell:
|
|
90
|
+
```sh
|
|
91
|
+
neuronum connect-cell # connect Cell
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
------------------
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### **Build On Neuronum** **[(Build with Node Examples)](https://github.com/neuronumcybernetics/neuronum/tree/main/features/nodes)**
|
|
98
|
+
Initialize a Node (app template):
|
|
99
|
+
```sh
|
|
100
|
+
neuronum init-node --app # initialize a Node with app template
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Change into Node folder
|
|
104
|
+
```sh
|
|
105
|
+
cd node_node_id # change directory
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Start your Node:
|
|
109
|
+
```sh
|
|
110
|
+
neuronum start-node # start Node
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
------------------
|
|
114
|
+
|
|
115
|
+
### **Interact with Neuronum**
|
|
116
|
+
#### **Web-based**
|
|
117
|
+
1. [Visit Neuronum](https://neuronum.net)
|
|
118
|
+
2. [Connect your Cell](https://neuronum.net/connect)
|
|
119
|
+
3. [Explore Transmitters](https://neuronum.net/explore)
|
|
120
|
+
4. Activate Transmitters
|
|
121
|
+
|
|
122
|
+
#### **Code-based**
|
|
123
|
+
Activate Transmitters (TX) to send requests and receive responses
|
|
124
|
+
```python
|
|
125
|
+
import asyncio
|
|
126
|
+
import neuronum
|
|
127
|
+
|
|
128
|
+
cell = neuronum.Cell( # set Cell connection
|
|
129
|
+
host="host", # Cell host
|
|
130
|
+
password="password", # Cell password
|
|
131
|
+
network="neuronum.net", # Cell network -> neuronum.net
|
|
132
|
+
synapse="synapse" # Cell synapse
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
async def main():
|
|
136
|
+
|
|
137
|
+
TX = txID # select the Transmitter TX
|
|
138
|
+
data = {
|
|
139
|
+
"say": "hello",
|
|
140
|
+
}
|
|
141
|
+
tx_response = await cell.activate_tx(TX, data) # activate TX - > get response back
|
|
142
|
+
print(tx_response) # print Cell list
|
|
143
|
+
|
|
144
|
+
asyncio.run(main())
|
|
145
|
+
```
|
|
146
|
+
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='neuronum',
|
|
5
|
-
version='5.4.
|
|
5
|
+
version='5.4.3',
|
|
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",
|
|
@@ -26,7 +26,6 @@ setup(
|
|
|
26
26
|
'questionary',
|
|
27
27
|
'python-dotenv',
|
|
28
28
|
'requests',
|
|
29
|
-
'rapidfuzz',
|
|
30
29
|
],
|
|
31
30
|
entry_points={
|
|
32
31
|
"console_scripts": [
|
neuronum-5.4.1/PKG-INFO
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: neuronum
|
|
3
|
-
Version: 5.4.1
|
|
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
|
-
Requires-Dist: rapidfuzz
|
|
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
|
-
<h1 align="center">
|
|
35
|
-
<img src="https://neuronum.net/static/neuronum.svg" alt="Neuronum" width="100">
|
|
36
|
-
</h1>
|
|
37
|
-
<h4 align="center">Build, connect, and automate serverless data infrastructures with Neuronum</h4>
|
|
38
|
-
|
|
39
|
-
<p align="center">
|
|
40
|
-
<a href="https://neuronum.net">
|
|
41
|
-
<img src="https://img.shields.io/badge/Website-Neuronum-blue" alt="Website">
|
|
42
|
-
</a>
|
|
43
|
-
<a href="https://github.com/neuronumcybernetics/neuronum">
|
|
44
|
-
<img src="https://img.shields.io/badge/Docs-Read%20now-green" alt="Documentation">
|
|
45
|
-
</a>
|
|
46
|
-
<img src="https://img.shields.io/badge/Version-5.4.0-blueviolet" alt="Lib Version">
|
|
47
|
-
<img src="https://img.shields.io/badge/Python-3.9%2B-yellow" alt="Python Version">
|
|
48
|
-
</p>
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## **Getting Started Goals**
|
|
53
|
-
- Learn about Neuronum
|
|
54
|
-
- Connect to Neuronum
|
|
55
|
-
- Build on Neuronum
|
|
56
|
-
- Interact with Neuronum
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### **About Neuronum**
|
|
60
|
-
Neuronum is a framework to build serverless connected app & data gateways automating the processing and distribution of data transmission, storage, and streaming.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### **Features**
|
|
64
|
-
**Cell & Nodes**
|
|
65
|
-
- Cell: Account to connect and interact with Neuronum
|
|
66
|
-
- Nodes: Soft- and Hardware components hosting gateways
|
|
67
|
-
|
|
68
|
-
**Gateways**
|
|
69
|
-
- Transmitters (TX): Securely transmit and receive data packages
|
|
70
|
-
- Circuits (CTX): Store data in cloud-based key-value-label databases
|
|
71
|
-
- Streams (STX): Stream, synchronize, and control data in real time
|
|
72
|
-
|
|
73
|
-
**Cellai**
|
|
74
|
-
- Cellai is a CLI-based assistant that helps you interact with Neuronum
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
#### Requirements
|
|
78
|
-
- Python >= 3.9 -> https://www.python.org/downloads/
|
|
79
|
-
- neuronum >= 5.4.0 -> https://pypi.org/project/neuronum/
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
------------------
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
### **Connect to Neuronum**
|
|
86
|
-
Installation
|
|
87
|
-
```sh
|
|
88
|
-
pip install neuronum # install neuronum dependencies
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Create Cell:
|
|
92
|
-
```sh
|
|
93
|
-
neuronum create-cell # create Cell / Cell type / Cell network
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
or
|
|
97
|
-
|
|
98
|
-
Connect Cell:
|
|
99
|
-
```sh
|
|
100
|
-
neuronum connect-cell # connect Cell
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
------------------
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
### **Build on Neuronum**
|
|
107
|
-
Initialize Node (app template):
|
|
108
|
-
```sh
|
|
109
|
-
neuronum init-node --app # initialize a Node with app template
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Change into Node folder
|
|
113
|
-
```sh
|
|
114
|
-
cd node_node_id # change directory
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Start Node:
|
|
118
|
-
```sh
|
|
119
|
-
neuronum start-node # start Node
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
**Node Examples**
|
|
123
|
-
Visit: https://github.com/neuronumcybernetics/neuronum/tree/main/how_tos/nodes
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
------------------
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### **Interact with Neuronum**
|
|
130
|
-
Web-based:
|
|
131
|
-
1. Visit: https://neuronum.net
|
|
132
|
-
2. Connect your Cell
|
|
133
|
-
3. Explore Transmitters
|
|
134
|
-
4. Activate Transmitters
|
|
135
|
-
|
|
136
|
-
Code-based:
|
|
137
|
-
```python
|
|
138
|
-
TX = txID # select the Transmitter TX
|
|
139
|
-
data = {
|
|
140
|
-
"say": "hello",
|
|
141
|
-
}
|
|
142
|
-
tx_response = await cell.activate_tx(TX, data) # activate TX - > get response back
|
|
143
|
-
print(tx_response)
|
|
144
|
-
```
|
neuronum-5.4.1/README.md
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
<h1 align="center">
|
|
2
|
-
<img src="https://neuronum.net/static/neuronum.svg" alt="Neuronum" width="100">
|
|
3
|
-
</h1>
|
|
4
|
-
<h4 align="center">Build, connect, and automate serverless data infrastructures with Neuronum</h4>
|
|
5
|
-
|
|
6
|
-
<p align="center">
|
|
7
|
-
<a href="https://neuronum.net">
|
|
8
|
-
<img src="https://img.shields.io/badge/Website-Neuronum-blue" alt="Website">
|
|
9
|
-
</a>
|
|
10
|
-
<a href="https://github.com/neuronumcybernetics/neuronum">
|
|
11
|
-
<img src="https://img.shields.io/badge/Docs-Read%20now-green" alt="Documentation">
|
|
12
|
-
</a>
|
|
13
|
-
<img src="https://img.shields.io/badge/Version-5.4.0-blueviolet" alt="Lib Version">
|
|
14
|
-
<img src="https://img.shields.io/badge/Python-3.9%2B-yellow" alt="Python Version">
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## **Getting Started Goals**
|
|
20
|
-
- Learn about Neuronum
|
|
21
|
-
- Connect to Neuronum
|
|
22
|
-
- Build on Neuronum
|
|
23
|
-
- Interact with Neuronum
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### **About Neuronum**
|
|
27
|
-
Neuronum is a framework to build serverless connected app & data gateways automating the processing and distribution of data transmission, storage, and streaming.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### **Features**
|
|
31
|
-
**Cell & Nodes**
|
|
32
|
-
- Cell: Account to connect and interact with Neuronum
|
|
33
|
-
- Nodes: Soft- and Hardware components hosting gateways
|
|
34
|
-
|
|
35
|
-
**Gateways**
|
|
36
|
-
- Transmitters (TX): Securely transmit and receive data packages
|
|
37
|
-
- Circuits (CTX): Store data in cloud-based key-value-label databases
|
|
38
|
-
- Streams (STX): Stream, synchronize, and control data in real time
|
|
39
|
-
|
|
40
|
-
**Cellai**
|
|
41
|
-
- Cellai is a CLI-based assistant that helps you interact with Neuronum
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
#### Requirements
|
|
45
|
-
- Python >= 3.9 -> https://www.python.org/downloads/
|
|
46
|
-
- neuronum >= 5.4.0 -> https://pypi.org/project/neuronum/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
------------------
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### **Connect to Neuronum**
|
|
53
|
-
Installation
|
|
54
|
-
```sh
|
|
55
|
-
pip install neuronum # install neuronum dependencies
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Create Cell:
|
|
59
|
-
```sh
|
|
60
|
-
neuronum create-cell # create Cell / Cell type / Cell network
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
or
|
|
64
|
-
|
|
65
|
-
Connect Cell:
|
|
66
|
-
```sh
|
|
67
|
-
neuronum connect-cell # connect Cell
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
------------------
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
### **Build on Neuronum**
|
|
74
|
-
Initialize Node (app template):
|
|
75
|
-
```sh
|
|
76
|
-
neuronum init-node --app # initialize a Node with app template
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Change into Node folder
|
|
80
|
-
```sh
|
|
81
|
-
cd node_node_id # change directory
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Start Node:
|
|
85
|
-
```sh
|
|
86
|
-
neuronum start-node # start Node
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Node Examples**
|
|
90
|
-
Visit: https://github.com/neuronumcybernetics/neuronum/tree/main/how_tos/nodes
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
------------------
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
### **Interact with Neuronum**
|
|
97
|
-
Web-based:
|
|
98
|
-
1. Visit: https://neuronum.net
|
|
99
|
-
2. Connect your Cell
|
|
100
|
-
3. Explore Transmitters
|
|
101
|
-
4. Activate Transmitters
|
|
102
|
-
|
|
103
|
-
Code-based:
|
|
104
|
-
```python
|
|
105
|
-
TX = txID # select the Transmitter TX
|
|
106
|
-
data = {
|
|
107
|
-
"say": "hello",
|
|
108
|
-
}
|
|
109
|
-
tx_response = await cell.activate_tx(TX, data) # activate TX - > get response back
|
|
110
|
-
print(tx_response)
|
|
111
|
-
```
|
neuronum-5.4.1/cellai/cellai.py
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import asyncio
|
|
2
|
-
from rapidfuzz import process
|
|
3
|
-
import neuronum
|
|
4
|
-
import datetime
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def log_interaction(user_input, output, log_path=Path("cellai.log")):
|
|
9
|
-
log_path = Path(log_path)
|
|
10
|
-
|
|
11
|
-
timestamp = datetime.datetime.now().isoformat()
|
|
12
|
-
with open(log_path, "a", encoding="utf-8") as log_file:
|
|
13
|
-
log_file.write(f"[{timestamp}]\n")
|
|
14
|
-
log_file.write(f"USER: {user_input}")
|
|
15
|
-
log_file.write(f"{output}\n\n")
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
async def main(host, password, network, synapse):
|
|
19
|
-
cell = neuronum.Cell(
|
|
20
|
-
host=host,
|
|
21
|
-
password=password,
|
|
22
|
-
network=network,
|
|
23
|
-
synapse=synapse
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
tx = await cell.list_tx()
|
|
27
|
-
nodes = await cell.list_nodes()
|
|
28
|
-
|
|
29
|
-
transmitters = tx
|
|
30
|
-
transmitters_by_id = {t["txID"]: t for t in transmitters}
|
|
31
|
-
|
|
32
|
-
info_to_gateway = []
|
|
33
|
-
for node in nodes:
|
|
34
|
-
for g in node["Node.md"]["gateways"]:
|
|
35
|
-
info_to_gateway.append({
|
|
36
|
-
"nodeID": node["nodeID"],
|
|
37
|
-
"gateway": g,
|
|
38
|
-
"info": g["info"],
|
|
39
|
-
"descr": node["descr"]
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
print("Cellai: Ready for your instruction!")
|
|
43
|
-
loop = asyncio.get_event_loop()
|
|
44
|
-
|
|
45
|
-
while True:
|
|
46
|
-
try:
|
|
47
|
-
user_input = await loop.run_in_executor(None, input, ">> ")
|
|
48
|
-
user_input = user_input.strip()
|
|
49
|
-
if user_input.lower() in {"exit", "quit"}:
|
|
50
|
-
log_interaction(user_input, "Session ended by user.")
|
|
51
|
-
break
|
|
52
|
-
|
|
53
|
-
match, score, idx = process.extractOne(user_input, [x["info"] for x in info_to_gateway])
|
|
54
|
-
best = info_to_gateway[idx]
|
|
55
|
-
|
|
56
|
-
output_log = (
|
|
57
|
-
f"\nMatched: {match} ({score:.1f}%)\n"
|
|
58
|
-
f"Node: {best['descr']} [{best['nodeID']}]\n"
|
|
59
|
-
f"Gateway: {best['gateway']['id']} ({best['gateway']['type']})"
|
|
60
|
-
)
|
|
61
|
-
print(output_log)
|
|
62
|
-
|
|
63
|
-
if best['gateway']['type'] == "transmitter":
|
|
64
|
-
tx_id = best['gateway']['id']
|
|
65
|
-
tx_data = transmitters_by_id.get(tx_id)
|
|
66
|
-
if tx_data:
|
|
67
|
-
print(f"Executing transmitter: {tx_data['descr']}")
|
|
68
|
-
|
|
69
|
-
dynamic_payload = {}
|
|
70
|
-
for key in tx_data["data"].keys():
|
|
71
|
-
prompt = f"Enter value for '{key}': "
|
|
72
|
-
value = await loop.run_in_executor(None, input, prompt)
|
|
73
|
-
dynamic_payload[key] = value
|
|
74
|
-
|
|
75
|
-
print(f"Payload: {dynamic_payload}")
|
|
76
|
-
TX = tx_id
|
|
77
|
-
tx_response = await cell.activate_tx(TX, dynamic_payload)
|
|
78
|
-
print(tx_response["json"])
|
|
79
|
-
output_log += f"\nTransmitter executed: {tx_data['descr']}\nPayload: {dynamic_payload}\nResponse: {tx_response['json']}"
|
|
80
|
-
else:
|
|
81
|
-
warning = "Transmitter not found."
|
|
82
|
-
print(warning)
|
|
83
|
-
output_log += f"{warning}"
|
|
84
|
-
|
|
85
|
-
elif best['gateway']['type'] == "stream":
|
|
86
|
-
STX = best['gateway']['id']
|
|
87
|
-
print(f"Starting stream sync for STX: {STX}")
|
|
88
|
-
async for operation in cell.sync(STX):
|
|
89
|
-
label = operation.get("label")
|
|
90
|
-
data = operation.get("data")
|
|
91
|
-
ts = operation.get("time")
|
|
92
|
-
stxID = operation.get("stxID")
|
|
93
|
-
operator = operation.get("operator")
|
|
94
|
-
line = f"[{ts}] {label} | Operator: {operator} | STX: {stxID}\nData: {data}"
|
|
95
|
-
print(line)
|
|
96
|
-
output_log += f"\n{line}"
|
|
97
|
-
elif best['gateway']['type'] == "circuit":
|
|
98
|
-
CTX = best['gateway']['id']
|
|
99
|
-
label = await loop.run_in_executor(None, input, "Enter label to load from circuit: ")
|
|
100
|
-
label = label.strip()
|
|
101
|
-
data = await cell.load(label, CTX)
|
|
102
|
-
print(data)
|
|
103
|
-
output_log += f"\nCircuit loaded from CTX: {CTX} with label '{label}'\nData: {data}"
|
|
104
|
-
else:
|
|
105
|
-
msg = "Unknown gateway type."
|
|
106
|
-
print(msg)
|
|
107
|
-
output_log += f"{msg}"
|
|
108
|
-
|
|
109
|
-
log_interaction(user_input, output_log)
|
|
110
|
-
|
|
111
|
-
except KeyboardInterrupt:
|
|
112
|
-
print("\nExiting.")
|
|
113
|
-
log_interaction("KeyboardInterrupt", "Session exited with Ctrl+C")
|
|
114
|
-
break
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if __name__ == "__main__":
|
|
118
|
-
asyncio.run(main(host, password, network, synapse))
|
neuronum-5.4.1/cli/__init__.py
DELETED
|
File without changes
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: neuronum
|
|
3
|
-
Version: 5.4.1
|
|
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
|
-
Requires-Dist: rapidfuzz
|
|
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
|
-
<h1 align="center">
|
|
35
|
-
<img src="https://neuronum.net/static/neuronum.svg" alt="Neuronum" width="100">
|
|
36
|
-
</h1>
|
|
37
|
-
<h4 align="center">Build, connect, and automate serverless data infrastructures with Neuronum</h4>
|
|
38
|
-
|
|
39
|
-
<p align="center">
|
|
40
|
-
<a href="https://neuronum.net">
|
|
41
|
-
<img src="https://img.shields.io/badge/Website-Neuronum-blue" alt="Website">
|
|
42
|
-
</a>
|
|
43
|
-
<a href="https://github.com/neuronumcybernetics/neuronum">
|
|
44
|
-
<img src="https://img.shields.io/badge/Docs-Read%20now-green" alt="Documentation">
|
|
45
|
-
</a>
|
|
46
|
-
<img src="https://img.shields.io/badge/Version-5.4.0-blueviolet" alt="Lib Version">
|
|
47
|
-
<img src="https://img.shields.io/badge/Python-3.9%2B-yellow" alt="Python Version">
|
|
48
|
-
</p>
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## **Getting Started Goals**
|
|
53
|
-
- Learn about Neuronum
|
|
54
|
-
- Connect to Neuronum
|
|
55
|
-
- Build on Neuronum
|
|
56
|
-
- Interact with Neuronum
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### **About Neuronum**
|
|
60
|
-
Neuronum is a framework to build serverless connected app & data gateways automating the processing and distribution of data transmission, storage, and streaming.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### **Features**
|
|
64
|
-
**Cell & Nodes**
|
|
65
|
-
- Cell: Account to connect and interact with Neuronum
|
|
66
|
-
- Nodes: Soft- and Hardware components hosting gateways
|
|
67
|
-
|
|
68
|
-
**Gateways**
|
|
69
|
-
- Transmitters (TX): Securely transmit and receive data packages
|
|
70
|
-
- Circuits (CTX): Store data in cloud-based key-value-label databases
|
|
71
|
-
- Streams (STX): Stream, synchronize, and control data in real time
|
|
72
|
-
|
|
73
|
-
**Cellai**
|
|
74
|
-
- Cellai is a CLI-based assistant that helps you interact with Neuronum
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
#### Requirements
|
|
78
|
-
- Python >= 3.9 -> https://www.python.org/downloads/
|
|
79
|
-
- neuronum >= 5.4.0 -> https://pypi.org/project/neuronum/
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
------------------
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
### **Connect to Neuronum**
|
|
86
|
-
Installation
|
|
87
|
-
```sh
|
|
88
|
-
pip install neuronum # install neuronum dependencies
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Create Cell:
|
|
92
|
-
```sh
|
|
93
|
-
neuronum create-cell # create Cell / Cell type / Cell network
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
or
|
|
97
|
-
|
|
98
|
-
Connect Cell:
|
|
99
|
-
```sh
|
|
100
|
-
neuronum connect-cell # connect Cell
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
------------------
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
### **Build on Neuronum**
|
|
107
|
-
Initialize Node (app template):
|
|
108
|
-
```sh
|
|
109
|
-
neuronum init-node --app # initialize a Node with app template
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Change into Node folder
|
|
113
|
-
```sh
|
|
114
|
-
cd node_node_id # change directory
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Start Node:
|
|
118
|
-
```sh
|
|
119
|
-
neuronum start-node # start Node
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
**Node Examples**
|
|
123
|
-
Visit: https://github.com/neuronumcybernetics/neuronum/tree/main/how_tos/nodes
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
------------------
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### **Interact with Neuronum**
|
|
130
|
-
Web-based:
|
|
131
|
-
1. Visit: https://neuronum.net
|
|
132
|
-
2. Connect your Cell
|
|
133
|
-
3. Explore Transmitters
|
|
134
|
-
4. Activate Transmitters
|
|
135
|
-
|
|
136
|
-
Code-based:
|
|
137
|
-
```python
|
|
138
|
-
TX = txID # select the Transmitter TX
|
|
139
|
-
data = {
|
|
140
|
-
"say": "hello",
|
|
141
|
-
}
|
|
142
|
-
tx_response = await cell.activate_tx(TX, data) # activate TX - > get response back
|
|
143
|
-
print(tx_response)
|
|
144
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|