neuronum 1.4.1__tar.gz → 1.5.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.

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