neuronum 1.5.0__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.

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