neuronum 1.4.2__tar.gz → 1.5.1__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.

@@ -0,0 +1,267 @@
1
+ Metadata-Version: 2.1
2
+ Name: neuronum
3
+ Version: 1.5.1
4
+ Summary: Interact with the Neuronum Network to build & automate interconnected networks of soft- and hardware components
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.6
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: requests
16
+ Requires-Dist: websocket-client
17
+
18
+ ![Neuronum Logo](https://neuronum.net/static/logo_pip.png "Neuronum")
19
+
20
+ [![Website](https://img.shields.io/badge/Website-Neuronum-blue)](https://neuronum.net)
21
+ [![Documentation](https://img.shields.io/badge/Docs-Read%20now-green)](https://github.com/neuronumcybernetics/neuronum)
22
+ [![Tutorials](https://img.shields.io/badge/Tutorials-Watch%20now-red)](https://www.youtube.com/@neuronumnet)
23
+
24
+ `Neuronum` is a cybernetic framework enabling businesses to build & automate interconnected networks of soft- and hardware components
25
+
26
+ ## Features
27
+ - **Cell**: Identity to connect and interact with the Neuronum Network
28
+ - **Transmitters (TX)**: Automate economic data transfer
29
+ - **Circuits (CTX)**: Store data in Key-Value-Label databases
30
+ - **Streams (STX)**: Stream, synchronize and control data in real time
31
+ - **Nodes**: Soft-/Hardware components participating in the Network ecosystem
32
+
33
+ To interact with the Network you will need to create a Neuronum Cell.
34
+ Create your Cell: [Create Cell](https://neuronum.net/createcell)
35
+
36
+
37
+ ### Installation & Connection
38
+ Start with installing the Neuronum library using pip:
39
+ ```python
40
+ pip install neuronum
41
+ ```
42
+
43
+ Configure and test Cell connection:
44
+ ```python
45
+ import neuronum
46
+
47
+ cell = neuronum.Cell(
48
+ host="host::cell", # cell host
49
+ password="your_password", # cell password
50
+ network="neuronum.net", # cell network
51
+ synapse="your_synapse" # cell synapse
52
+ )
53
+ cell.connect() # connect to network
54
+ ```
55
+
56
+ ### Transmitters (TX)
57
+ Transmitters (TX) are used to create predefined templates to receive and send data in a standardized format.
58
+
59
+ Create Transmitter (TX):
60
+ ```python
61
+ descr = "Test Transmitter" # description (max 25 characters)
62
+ key_values = { # defined keys and example values
63
+ "key1": "value1",
64
+ "key2": "value2",
65
+ "key3": "value3",
66
+ }
67
+ stx = "id::stx" # select Stream (STX)
68
+ label = "key1:key2" # label TX data
69
+ partners = ["id::cell", "id::cell"] # authorized Cells
70
+ txID = cell.create_tx(descr, key_values, stx, label, partners) # create TX
71
+ ```
72
+
73
+ Activate Transmitter (TX):
74
+ ```python
75
+ TX = "id::tx" # select Transmitter (TX)
76
+ data = { # enter key-values
77
+ "key1": "value1",
78
+ "key2": "value2",
79
+ "key3": "value3",
80
+ }
81
+ cell.activate_tx(TX, data) # activate TX
82
+ ```
83
+
84
+ Delete Transmitter (TX):
85
+ ```python
86
+ TX = "id::tx" # select Transmitter (TX)
87
+ cell.delete_tx(TX) # delete TX
88
+ ```
89
+
90
+ List Transmitter (TX) from Cell:
91
+ ```python
92
+ cellID = "id::cell" # select Cell
93
+ txList = cell.list_tx(cellID) # list Transmitters (TX)
94
+ ```
95
+
96
+ ### Circuits (CTX)
97
+ Circuits (CTX) store and organize data using a Key-Value-Label system
98
+
99
+ Create Circuit (CTX):
100
+ ```python
101
+ descr = "Test Circuit" # description (max 25 characters)
102
+ partners = ["id::cell", "id::cell"] # authorized Cells
103
+ ctxID = cell.create_ctx(descr, partners) # create Circuit (CTX)
104
+ ```
105
+
106
+ Store data on your private Circuit (CTX):
107
+ ```python
108
+ label = "your_label" # data label (should be unique)
109
+ data = { # data as key-value pairs
110
+ "key1": "value1",
111
+ "key2": "value2",
112
+ "key3": "value3",
113
+ }
114
+ cell.store(label, data) # store data
115
+ ```
116
+
117
+ Store data on a public Circuit (CTX):
118
+ ```python
119
+ CTX = "id::ctx" # select Circuit (CTX
120
+ label = "your_label" # data label (should be unique)
121
+ data = { # data as key-value pairs
122
+ "key1": "value1",
123
+ "key2": "value2",
124
+ "key3": "value3",
125
+ }
126
+ cell.store(label, data, CTX) # store data
127
+ ```
128
+
129
+ Load data from your private Circuit (CTX):
130
+ ```python
131
+ label = "your_label" # select label
132
+ data = cell.load(label) # load data by label
133
+ key1 = data["key1"] # get data from key
134
+ key2 = data["key2"]
135
+ key3 = data["key3"]
136
+ print(key1, key2, key3) # print data
137
+ ```
138
+
139
+ Load data from a public Circuit (CTX):
140
+ ```python
141
+ CTX = "id::ctx" # select Circuit (CTX)
142
+ label = "your_label" # select label
143
+ data = cell.load(label, CTX) # load data by label
144
+ key1 = data["key1"] # get data from key
145
+ key2 = data["key2"]
146
+ key3 = data["key3"]
147
+ print(key1, key2, key3) # print data
148
+ ```
149
+
150
+ Delete data from your private Circuit (CTX):
151
+ ```python
152
+ label = "your_label" # select label
153
+ cell.delete(label) # delete data by label
154
+ ```
155
+
156
+ Delete data from a public Circuit (CTX):
157
+ ```python
158
+ CTX = "id::ctx" # select Circuits (CTX)
159
+ label = "your_label" # select label
160
+ cell.delete(label, CTX) # delete data by label
161
+ ```
162
+
163
+ Clear your private Circuit (CTX):
164
+ ```python
165
+ cell.clear() # clear Circuit (CTX)
166
+ ```
167
+
168
+ Clear Circuit (CTX):
169
+ ```python
170
+ CTX = "id::ctx" # select Circuit (CTX)
171
+ cell.clear(CTX) # clear CTX
172
+ ```
173
+
174
+ Delete Circuit (CTX):
175
+ ```python
176
+ CTX = "id::ctx" # select Circuit (CTX)
177
+ cell.delete_ctx(CTX) # delete CTX
178
+ ```
179
+
180
+ List Circuits (CTX) from Cell:
181
+ ```python
182
+ cellID = "id::cell" # select Cell
183
+ ctxList = cell.list_ctx(cellID) # list Circuits (CTX)
184
+ ```
185
+
186
+ ### Streams (STX)
187
+ Streams (STX) facilitate real-time data synchronization and interaction, ensuring real-time connectivity between Nodes in the Neuronum network
188
+
189
+ Create Stream (STX):
190
+ ```python
191
+ descr = "Test Stream" # description (max 25 characters)
192
+ partners = ["id::cell", "id::cell"] # authorized Cells
193
+ stxID = cell.create_stx(descr, partners) # create Stream (STX)
194
+ ```
195
+
196
+ Stream data to your private Stream (STX):
197
+ ```python
198
+ label = "your_label" # data label
199
+ data = { # data as key-value pairs
200
+ "key1": "value1",
201
+ "key2": "value2",
202
+ "key3": "value3",
203
+ }
204
+ cell.stream(label, data) # stream data
205
+ ```
206
+
207
+ Stream data to a public Stream (STX):
208
+ ```python
209
+ STX = "id::stx" # select Stream (STX)
210
+ label = "your_label" # data label
211
+ data = { # data as key-value pairs
212
+ "key1": "value1",
213
+ "key2": "value2",
214
+ "key3": "value3",
215
+ }
216
+ cell.stream(label, data, STX) # stream data
217
+ ```
218
+
219
+ Sync data from your private Stream (STX):
220
+ ```python
221
+ stream = cell.sync() # synchronize Stream (STX)
222
+ for operation in stream: # load stream operations
223
+ label = operation.get("label") # get the operation details by key
224
+ key1 = operation.get("data").get("key1")
225
+ key2 = operation.get("data").get("key2")
226
+ key3 = operation.get("data").get("key3")
227
+ ts = operation.get("time")
228
+ stxID = operation.get("stxID")
229
+ operator = operation.get("operator")
230
+ ```
231
+
232
+ Sync data from a public Stream (STX):
233
+ ```python
234
+ STX = "id::stx" # select Stream (STX)
235
+ stream = cell.sync(STX) # synchronize Stream (STX)
236
+ for operation in stream: # load stream operations
237
+ label = operation.get("label") # get the operation details by key
238
+ key1 = operation.get("data").get("key1")
239
+ key2 = operation.get("data").get("key2")
240
+ key3 = operation.get("data").get("key3")
241
+ ts = operation.get("time")
242
+ stxID = operation.get("stxID")
243
+ operator = operation.get("operator")
244
+ ```
245
+
246
+ List Streams (STX) from Cell:
247
+ ```python
248
+ cellID = "id::cell" # select Cell
249
+ stxList = cell.list_stx(cellID) # list Streams (STX)
250
+ ```
251
+
252
+ ### Nodes
253
+ Neuronum Nodes are computing hardware running the Neuronum Client Library, enabling seamless data transmission, synchronization, and facilitating public Stream (STX) access
254
+
255
+ Register a Node with its associated Stream (STX):
256
+ ```python
257
+ descr = "node_name" # description (max 25 characters)
258
+ mode = "public" # "public" or "private" Node
259
+ STX = "id::stx" # select Stream (STX)
260
+ nodeID = cell.register_node(descr, mode, STX) # register Node
261
+ ```
262
+
263
+ Delete Node:
264
+ ```python
265
+ nodeID = "id::node" # select Node
266
+ cell.delete_node(nodeID) # delete Node
267
+ ```
@@ -0,0 +1,250 @@
1
+ ![Neuronum Logo](https://neuronum.net/static/logo_pip.png "Neuronum")
2
+
3
+ [![Website](https://img.shields.io/badge/Website-Neuronum-blue)](https://neuronum.net)
4
+ [![Documentation](https://img.shields.io/badge/Docs-Read%20now-green)](https://github.com/neuronumcybernetics/neuronum)
5
+ [![Tutorials](https://img.shields.io/badge/Tutorials-Watch%20now-red)](https://www.youtube.com/@neuronumnet)
6
+
7
+ `Neuronum` is a cybernetic framework enabling businesses to build & automate interconnected networks of soft- and hardware components
8
+
9
+ ## Features
10
+ - **Cell**: Identity to connect and interact with the Neuronum Network
11
+ - **Transmitters (TX)**: Automate economic data transfer
12
+ - **Circuits (CTX)**: Store data in Key-Value-Label databases
13
+ - **Streams (STX)**: Stream, synchronize and control data in real time
14
+ - **Nodes**: Soft-/Hardware components participating in the Network ecosystem
15
+
16
+ To interact with the Network you will need to create a Neuronum Cell.
17
+ Create your Cell: [Create Cell](https://neuronum.net/createcell)
18
+
19
+
20
+ ### Installation & Connection
21
+ Start with installing the Neuronum library using pip:
22
+ ```python
23
+ pip install neuronum
24
+ ```
25
+
26
+ Configure and test Cell connection:
27
+ ```python
28
+ import neuronum
29
+
30
+ cell = neuronum.Cell(
31
+ host="host::cell", # cell host
32
+ password="your_password", # cell password
33
+ network="neuronum.net", # cell network
34
+ synapse="your_synapse" # cell synapse
35
+ )
36
+ cell.connect() # connect to network
37
+ ```
38
+
39
+ ### Transmitters (TX)
40
+ Transmitters (TX) are used to create predefined templates to receive and send data in a standardized format.
41
+
42
+ Create Transmitter (TX):
43
+ ```python
44
+ descr = "Test Transmitter" # description (max 25 characters)
45
+ key_values = { # defined keys and example values
46
+ "key1": "value1",
47
+ "key2": "value2",
48
+ "key3": "value3",
49
+ }
50
+ stx = "id::stx" # select Stream (STX)
51
+ label = "key1:key2" # label TX data
52
+ partners = ["id::cell", "id::cell"] # authorized Cells
53
+ txID = cell.create_tx(descr, key_values, stx, label, partners) # create TX
54
+ ```
55
+
56
+ Activate Transmitter (TX):
57
+ ```python
58
+ TX = "id::tx" # select Transmitter (TX)
59
+ data = { # enter key-values
60
+ "key1": "value1",
61
+ "key2": "value2",
62
+ "key3": "value3",
63
+ }
64
+ cell.activate_tx(TX, data) # activate TX
65
+ ```
66
+
67
+ Delete Transmitter (TX):
68
+ ```python
69
+ TX = "id::tx" # select Transmitter (TX)
70
+ cell.delete_tx(TX) # delete TX
71
+ ```
72
+
73
+ List Transmitter (TX) from Cell:
74
+ ```python
75
+ cellID = "id::cell" # select Cell
76
+ txList = cell.list_tx(cellID) # list Transmitters (TX)
77
+ ```
78
+
79
+ ### Circuits (CTX)
80
+ Circuits (CTX) store and organize data using a Key-Value-Label system
81
+
82
+ Create Circuit (CTX):
83
+ ```python
84
+ descr = "Test Circuit" # description (max 25 characters)
85
+ partners = ["id::cell", "id::cell"] # authorized Cells
86
+ ctxID = cell.create_ctx(descr, partners) # create Circuit (CTX)
87
+ ```
88
+
89
+ Store data on your private Circuit (CTX):
90
+ ```python
91
+ label = "your_label" # data label (should be unique)
92
+ data = { # data as key-value pairs
93
+ "key1": "value1",
94
+ "key2": "value2",
95
+ "key3": "value3",
96
+ }
97
+ cell.store(label, data) # store data
98
+ ```
99
+
100
+ Store data on a public Circuit (CTX):
101
+ ```python
102
+ CTX = "id::ctx" # select Circuit (CTX
103
+ label = "your_label" # data label (should be unique)
104
+ data = { # data as key-value pairs
105
+ "key1": "value1",
106
+ "key2": "value2",
107
+ "key3": "value3",
108
+ }
109
+ cell.store(label, data, CTX) # store data
110
+ ```
111
+
112
+ Load data from your private Circuit (CTX):
113
+ ```python
114
+ label = "your_label" # select label
115
+ data = cell.load(label) # load data by label
116
+ key1 = data["key1"] # get data from key
117
+ key2 = data["key2"]
118
+ key3 = data["key3"]
119
+ print(key1, key2, key3) # print data
120
+ ```
121
+
122
+ Load data from a public Circuit (CTX):
123
+ ```python
124
+ CTX = "id::ctx" # select Circuit (CTX)
125
+ label = "your_label" # select label
126
+ data = cell.load(label, CTX) # load data by label
127
+ key1 = data["key1"] # get data from key
128
+ key2 = data["key2"]
129
+ key3 = data["key3"]
130
+ print(key1, key2, key3) # print data
131
+ ```
132
+
133
+ Delete data from your private Circuit (CTX):
134
+ ```python
135
+ label = "your_label" # select label
136
+ cell.delete(label) # delete data by label
137
+ ```
138
+
139
+ Delete data from a public Circuit (CTX):
140
+ ```python
141
+ CTX = "id::ctx" # select Circuits (CTX)
142
+ label = "your_label" # select label
143
+ cell.delete(label, CTX) # delete data by label
144
+ ```
145
+
146
+ Clear your private Circuit (CTX):
147
+ ```python
148
+ cell.clear() # clear Circuit (CTX)
149
+ ```
150
+
151
+ Clear Circuit (CTX):
152
+ ```python
153
+ CTX = "id::ctx" # select Circuit (CTX)
154
+ cell.clear(CTX) # clear CTX
155
+ ```
156
+
157
+ Delete Circuit (CTX):
158
+ ```python
159
+ CTX = "id::ctx" # select Circuit (CTX)
160
+ cell.delete_ctx(CTX) # delete CTX
161
+ ```
162
+
163
+ List Circuits (CTX) from Cell:
164
+ ```python
165
+ cellID = "id::cell" # select Cell
166
+ ctxList = cell.list_ctx(cellID) # list Circuits (CTX)
167
+ ```
168
+
169
+ ### Streams (STX)
170
+ Streams (STX) facilitate real-time data synchronization and interaction, ensuring real-time connectivity between Nodes in the Neuronum network
171
+
172
+ Create Stream (STX):
173
+ ```python
174
+ descr = "Test Stream" # description (max 25 characters)
175
+ partners = ["id::cell", "id::cell"] # authorized Cells
176
+ stxID = cell.create_stx(descr, partners) # create Stream (STX)
177
+ ```
178
+
179
+ Stream data to your private Stream (STX):
180
+ ```python
181
+ label = "your_label" # data label
182
+ data = { # data as key-value pairs
183
+ "key1": "value1",
184
+ "key2": "value2",
185
+ "key3": "value3",
186
+ }
187
+ cell.stream(label, data) # stream data
188
+ ```
189
+
190
+ Stream data to a public Stream (STX):
191
+ ```python
192
+ STX = "id::stx" # select Stream (STX)
193
+ label = "your_label" # data label
194
+ data = { # data as key-value pairs
195
+ "key1": "value1",
196
+ "key2": "value2",
197
+ "key3": "value3",
198
+ }
199
+ cell.stream(label, data, STX) # stream data
200
+ ```
201
+
202
+ Sync data from your private Stream (STX):
203
+ ```python
204
+ stream = cell.sync() # synchronize Stream (STX)
205
+ for operation in stream: # load stream operations
206
+ label = operation.get("label") # get the operation details by key
207
+ key1 = operation.get("data").get("key1")
208
+ key2 = operation.get("data").get("key2")
209
+ key3 = operation.get("data").get("key3")
210
+ ts = operation.get("time")
211
+ stxID = operation.get("stxID")
212
+ operator = operation.get("operator")
213
+ ```
214
+
215
+ Sync data from a public Stream (STX):
216
+ ```python
217
+ STX = "id::stx" # select Stream (STX)
218
+ stream = cell.sync(STX) # synchronize Stream (STX)
219
+ for operation in stream: # load stream operations
220
+ label = operation.get("label") # get the operation details by key
221
+ key1 = operation.get("data").get("key1")
222
+ key2 = operation.get("data").get("key2")
223
+ key3 = operation.get("data").get("key3")
224
+ ts = operation.get("time")
225
+ stxID = operation.get("stxID")
226
+ operator = operation.get("operator")
227
+ ```
228
+
229
+ List Streams (STX) from Cell:
230
+ ```python
231
+ cellID = "id::cell" # select Cell
232
+ stxList = cell.list_stx(cellID) # list Streams (STX)
233
+ ```
234
+
235
+ ### Nodes
236
+ Neuronum Nodes are computing hardware running the Neuronum Client Library, enabling seamless data transmission, synchronization, and facilitating public Stream (STX) access
237
+
238
+ Register a Node with its associated Stream (STX):
239
+ ```python
240
+ descr = "node_name" # description (max 25 characters)
241
+ mode = "public" # "public" or "private" Node
242
+ STX = "id::stx" # select Stream (STX)
243
+ nodeID = cell.register_node(descr, mode, STX) # register Node
244
+ ```
245
+
246
+ Delete Node:
247
+ ```python
248
+ nodeID = "id::node" # select Node
249
+ cell.delete_node(nodeID) # delete Node
250
+ ```