neuronum 1.5.1__tar.gz → 1.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of neuronum might be problematic. Click here for more details.
- {neuronum-1.5.1 → neuronum-1.7.0}/PKG-INFO +124 -49
- {neuronum-1.5.1 → neuronum-1.7.0}/README.md +118 -46
- neuronum-1.7.0/cli/__init__.py +0 -0
- neuronum-1.7.0/cli/main.py +589 -0
- {neuronum-1.5.1 → neuronum-1.7.0}/neuronum/neuronum.py +145 -90
- {neuronum-1.5.1 → neuronum-1.7.0}/neuronum.egg-info/PKG-INFO +124 -49
- {neuronum-1.5.1 → neuronum-1.7.0}/neuronum.egg-info/SOURCES.txt +3 -0
- neuronum-1.7.0/neuronum.egg-info/entry_points.txt +2 -0
- neuronum-1.7.0/neuronum.egg-info/requires.txt +5 -0
- {neuronum-1.5.1 → neuronum-1.7.0}/neuronum.egg-info/top_level.txt +1 -0
- {neuronum-1.5.1 → neuronum-1.7.0}/setup.py +11 -3
- neuronum-1.5.1/neuronum.egg-info/requires.txt +0 -2
- {neuronum-1.5.1 → neuronum-1.7.0}/LICENSE +0 -0
- {neuronum-1.5.1 → neuronum-1.7.0}/neuronum/__init__.py +0 -0
- {neuronum-1.5.1 → neuronum-1.7.0}/neuronum.egg-info/dependency_links.txt +0 -0
- {neuronum-1.5.1 → neuronum-1.7.0}/setup.cfg +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: neuronum
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 1.7.0
|
|
4
|
+
Summary: Official client library to interact with the Neuronum Network
|
|
5
5
|
Home-page: https://neuronum.net
|
|
6
6
|
Author: Neuronum Cybernetics
|
|
7
7
|
Author-email: welcome@neuronum.net
|
|
@@ -9,52 +9,98 @@ Project-URL: GitHub, https://github.com/neuronumcybernetics/neuronum
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Requires-Dist: requests
|
|
16
16
|
Requires-Dist: websocket-client
|
|
17
|
+
Requires-Dist: click
|
|
18
|
+
Requires-Dist: questionary
|
|
19
|
+
Requires-Dist: python-dotenv
|
|
17
20
|
|
|
18
21
|

|
|
19
22
|
|
|
20
|
-
[](https://neuronum.net)
|
|
21
|
-
[](https://github.com/neuronumcybernetics/neuronum)
|
|
22
|
-
[](https://www.youtube.com/@neuronumnet)
|
|
23
|
+
[](https://neuronum.net) [](https://github.com/neuronumcybernetics/neuronum)
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
Build, deploy and automate IoT connectivity with `Neuronum`
|
|
25
26
|
|
|
26
27
|
## Features
|
|
27
|
-
- **Cell**:
|
|
28
|
+
- **Cells/Cell-CLI**: Create and manage Neuronum Cells from the command line
|
|
29
|
+
- **Nodes/Node-CLI**: Setup and manage Neuronum Nodes from the command line
|
|
28
30
|
- **Transmitters (TX)**: Automate economic data transfer
|
|
29
31
|
- **Circuits (CTX)**: Store data in Key-Value-Label databases
|
|
30
32
|
- **Streams (STX)**: Stream, synchronize and control data in real time
|
|
31
|
-
- **
|
|
33
|
+
- **Contracts/Tokens**: Automate services exchange and authorization between Cells and Nodes
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
### Installation
|
|
36
|
+
Install the Neuronum library using pip:
|
|
37
|
+
```sh
|
|
38
|
+
$ pip install neuronum
|
|
39
|
+
```
|
|
35
40
|
|
|
41
|
+
### Cells/Cell-CLI
|
|
42
|
+
To interact with the Neuronum Network, you must first create a Neuronum Cell
|
|
36
43
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
pip install neuronum
|
|
44
|
+
Create Cell:
|
|
45
|
+
```sh
|
|
46
|
+
$ neuronum create-cell
|
|
41
47
|
```
|
|
42
48
|
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
49
|
+
Connect Cell:
|
|
50
|
+
```sh
|
|
51
|
+
$ neuronum connect-cell
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
View connected Cell:
|
|
55
|
+
```sh
|
|
56
|
+
$ neuronum view-cell
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Disconnect Cell:
|
|
60
|
+
```sh
|
|
61
|
+
$ neuronum disconnect-cell
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Delete Cell:
|
|
65
|
+
```sh
|
|
66
|
+
$ neuronum delete-cell
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Nodes/Node-CLI
|
|
70
|
+
Neuronum Nodes are soft- and hardware components that power the Neuronum Network, enabling seamless communication between Nodes and Cells
|
|
71
|
+
|
|
72
|
+
Initialize a Node:
|
|
73
|
+
```sh
|
|
74
|
+
$ neuronum init-node # neuronum init-node --sync id::stx (optional)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Start a Node:
|
|
78
|
+
```sh
|
|
79
|
+
$ neuronum start-node
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Stop a Node:
|
|
83
|
+
```sh
|
|
84
|
+
$ neuronum stop-node
|
|
85
|
+
```
|
|
46
86
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
87
|
+
Register a Node on the Neuronum Network:
|
|
88
|
+
```sh
|
|
89
|
+
$ neuronum register-node
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Update a Node:
|
|
93
|
+
```sh
|
|
94
|
+
$ neuronum update-node
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Delete a Node:
|
|
98
|
+
```sh
|
|
99
|
+
$ neuronum delete-node
|
|
54
100
|
```
|
|
55
101
|
|
|
56
102
|
### Transmitters (TX)
|
|
57
|
-
Transmitters (TX) are used to create predefined templates to receive and send data in a standardized format
|
|
103
|
+
Transmitters (TX) are used to create predefined templates to receive and send data in a standardized format
|
|
58
104
|
|
|
59
105
|
Create Transmitter (TX):
|
|
60
106
|
```python
|
|
@@ -87,10 +133,9 @@ TX = "id::tx" # select Trans
|
|
|
87
133
|
cell.delete_tx(TX) # delete TX
|
|
88
134
|
```
|
|
89
135
|
|
|
90
|
-
List Transmitter (TX)
|
|
91
|
-
```python
|
|
92
|
-
|
|
93
|
-
txList = cell.list_tx(cellID) # list Transmitters (TX)
|
|
136
|
+
List Transmitter (TX) your Cell can activate:
|
|
137
|
+
```python
|
|
138
|
+
txList = cell.list_tx() # list Transmitters (TX)
|
|
94
139
|
```
|
|
95
140
|
|
|
96
141
|
### Circuits (CTX)
|
|
@@ -177,10 +222,9 @@ CTX = "id::ctx" # select Circu
|
|
|
177
222
|
cell.delete_ctx(CTX) # delete CTX
|
|
178
223
|
```
|
|
179
224
|
|
|
180
|
-
List Circuits (CTX)
|
|
181
|
-
```python
|
|
182
|
-
|
|
183
|
-
ctxList = cell.list_ctx(cellID) # list Circuits (CTX)
|
|
225
|
+
List Circuits (CTX) your Cell can interact with:
|
|
226
|
+
```python
|
|
227
|
+
ctxList = cell.list_ctx() # list Circuits (CTX)
|
|
184
228
|
```
|
|
185
229
|
|
|
186
230
|
### Streams (STX)
|
|
@@ -243,25 +287,56 @@ for operation in stream: # load stream
|
|
|
243
287
|
operator = operation.get("operator")
|
|
244
288
|
```
|
|
245
289
|
|
|
246
|
-
List Streams (STX)
|
|
247
|
-
```python
|
|
248
|
-
|
|
249
|
-
stxList = cell.list_stx(cellID) # list Streams (STX)
|
|
290
|
+
List Streams (STX) your Cell can interact with:
|
|
291
|
+
```python
|
|
292
|
+
stxList = cell.list_stx() # list Streams (STX)
|
|
250
293
|
```
|
|
251
294
|
|
|
252
|
-
###
|
|
253
|
-
|
|
295
|
+
### Contracts/Tokens
|
|
296
|
+
Contracts are predefined token-based rules to automate service exchange and authorization between Cells and Nodes
|
|
254
297
|
|
|
255
|
-
|
|
298
|
+
Create a Contract:
|
|
256
299
|
```python
|
|
257
|
-
descr = "
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
300
|
+
descr = "Test Contract" # short description (max 25 characters)
|
|
301
|
+
details = { # define token details
|
|
302
|
+
"price_in_eur": False, # token price in EUR (int, float or False)
|
|
303
|
+
"max_usage": False, # max number of uses (int or False)
|
|
304
|
+
"validity_in_min": False # token expiration time in min (int, float or False)
|
|
305
|
+
}
|
|
306
|
+
partners = ["id::cell", "id::cell"]
|
|
307
|
+
contractID = cell.create_contract(descr, details, partners)
|
|
261
308
|
```
|
|
262
309
|
|
|
263
|
-
|
|
264
|
-
```python
|
|
265
|
-
|
|
266
|
-
cell.
|
|
310
|
+
Sign a Contract:
|
|
311
|
+
```python
|
|
312
|
+
contractID = "id::contract" # select contract
|
|
313
|
+
token = cell.sign_contract(contractID)
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Request a Token from another Cell to authorize a service:
|
|
317
|
+
```python
|
|
318
|
+
cp = "id::cell" # select counterparty cell
|
|
319
|
+
contractID = "id::contract" # select contract
|
|
320
|
+
cell.request_token(cp, contractID)
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
Present a Token to another Cell to authorize a service:
|
|
324
|
+
```python
|
|
325
|
+
token = "token" # select token
|
|
326
|
+
cp = "id::cell" # select counterparty cell
|
|
327
|
+
contractID = "id::contract" # select the contract
|
|
328
|
+
cell.present_token(token, cp, contractID)
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Validate a Token to authorize a service:
|
|
332
|
+
```python
|
|
333
|
+
token = "token" # select token
|
|
334
|
+
cp = "id::cell" # select counterparty cell
|
|
335
|
+
contractID = "id::contract" # select contract
|
|
336
|
+
cell.validate_token(token, cp, contractID)
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
List Contracts your Cell can interact with:
|
|
340
|
+
```python
|
|
341
|
+
contractList = cell.list_contracts()
|
|
267
342
|
```
|
|
@@ -1,43 +1,86 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
[](https://neuronum.net)
|
|
4
|
-
[](https://github.com/neuronumcybernetics/neuronum)
|
|
5
|
-
[](https://www.youtube.com/@neuronumnet)
|
|
3
|
+
[](https://neuronum.net) [](https://github.com/neuronumcybernetics/neuronum)
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Build, deploy and automate IoT connectivity with `Neuronum`
|
|
8
6
|
|
|
9
7
|
## Features
|
|
10
|
-
- **Cell**:
|
|
8
|
+
- **Cells/Cell-CLI**: Create and manage Neuronum Cells from the command line
|
|
9
|
+
- **Nodes/Node-CLI**: Setup and manage Neuronum Nodes from the command line
|
|
11
10
|
- **Transmitters (TX)**: Automate economic data transfer
|
|
12
11
|
- **Circuits (CTX)**: Store data in Key-Value-Label databases
|
|
13
12
|
- **Streams (STX)**: Stream, synchronize and control data in real time
|
|
14
|
-
- **
|
|
13
|
+
- **Contracts/Tokens**: Automate services exchange and authorization between Cells and Nodes
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
### Installation
|
|
16
|
+
Install the Neuronum library using pip:
|
|
17
|
+
```sh
|
|
18
|
+
$ pip install neuronum
|
|
19
|
+
```
|
|
18
20
|
|
|
21
|
+
### Cells/Cell-CLI
|
|
22
|
+
To interact with the Neuronum Network, you must first create a Neuronum Cell
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
pip install neuronum
|
|
24
|
+
Create Cell:
|
|
25
|
+
```sh
|
|
26
|
+
$ neuronum create-cell
|
|
24
27
|
```
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
+
Connect Cell:
|
|
30
|
+
```sh
|
|
31
|
+
$ neuronum connect-cell
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
View connected Cell:
|
|
35
|
+
```sh
|
|
36
|
+
$ neuronum view-cell
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Disconnect Cell:
|
|
40
|
+
```sh
|
|
41
|
+
$ neuronum disconnect-cell
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Delete Cell:
|
|
45
|
+
```sh
|
|
46
|
+
$ neuronum delete-cell
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Nodes/Node-CLI
|
|
50
|
+
Neuronum Nodes are soft- and hardware components that power the Neuronum Network, enabling seamless communication between Nodes and Cells
|
|
51
|
+
|
|
52
|
+
Initialize a Node:
|
|
53
|
+
```sh
|
|
54
|
+
$ neuronum init-node # neuronum init-node --sync id::stx (optional)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Start a Node:
|
|
58
|
+
```sh
|
|
59
|
+
$ neuronum start-node
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Stop a Node:
|
|
63
|
+
```sh
|
|
64
|
+
$ neuronum stop-node
|
|
65
|
+
```
|
|
29
66
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
67
|
+
Register a Node on the Neuronum Network:
|
|
68
|
+
```sh
|
|
69
|
+
$ neuronum register-node
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Update a Node:
|
|
73
|
+
```sh
|
|
74
|
+
$ neuronum update-node
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Delete a Node:
|
|
78
|
+
```sh
|
|
79
|
+
$ neuronum delete-node
|
|
37
80
|
```
|
|
38
81
|
|
|
39
82
|
### Transmitters (TX)
|
|
40
|
-
Transmitters (TX) are used to create predefined templates to receive and send data in a standardized format
|
|
83
|
+
Transmitters (TX) are used to create predefined templates to receive and send data in a standardized format
|
|
41
84
|
|
|
42
85
|
Create Transmitter (TX):
|
|
43
86
|
```python
|
|
@@ -70,10 +113,9 @@ TX = "id::tx" # select Trans
|
|
|
70
113
|
cell.delete_tx(TX) # delete TX
|
|
71
114
|
```
|
|
72
115
|
|
|
73
|
-
List Transmitter (TX)
|
|
74
|
-
```python
|
|
75
|
-
|
|
76
|
-
txList = cell.list_tx(cellID) # list Transmitters (TX)
|
|
116
|
+
List Transmitter (TX) your Cell can activate:
|
|
117
|
+
```python
|
|
118
|
+
txList = cell.list_tx() # list Transmitters (TX)
|
|
77
119
|
```
|
|
78
120
|
|
|
79
121
|
### Circuits (CTX)
|
|
@@ -160,10 +202,9 @@ CTX = "id::ctx" # select Circu
|
|
|
160
202
|
cell.delete_ctx(CTX) # delete CTX
|
|
161
203
|
```
|
|
162
204
|
|
|
163
|
-
List Circuits (CTX)
|
|
164
|
-
```python
|
|
165
|
-
|
|
166
|
-
ctxList = cell.list_ctx(cellID) # list Circuits (CTX)
|
|
205
|
+
List Circuits (CTX) your Cell can interact with:
|
|
206
|
+
```python
|
|
207
|
+
ctxList = cell.list_ctx() # list Circuits (CTX)
|
|
167
208
|
```
|
|
168
209
|
|
|
169
210
|
### Streams (STX)
|
|
@@ -226,25 +267,56 @@ for operation in stream: # load stream
|
|
|
226
267
|
operator = operation.get("operator")
|
|
227
268
|
```
|
|
228
269
|
|
|
229
|
-
List Streams (STX)
|
|
230
|
-
```python
|
|
231
|
-
|
|
232
|
-
stxList = cell.list_stx(cellID) # list Streams (STX)
|
|
270
|
+
List Streams (STX) your Cell can interact with:
|
|
271
|
+
```python
|
|
272
|
+
stxList = cell.list_stx() # list Streams (STX)
|
|
233
273
|
```
|
|
234
274
|
|
|
235
|
-
###
|
|
236
|
-
|
|
275
|
+
### Contracts/Tokens
|
|
276
|
+
Contracts are predefined token-based rules to automate service exchange and authorization between Cells and Nodes
|
|
237
277
|
|
|
238
|
-
|
|
278
|
+
Create a Contract:
|
|
239
279
|
```python
|
|
240
|
-
descr = "
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
280
|
+
descr = "Test Contract" # short description (max 25 characters)
|
|
281
|
+
details = { # define token details
|
|
282
|
+
"price_in_eur": False, # token price in EUR (int, float or False)
|
|
283
|
+
"max_usage": False, # max number of uses (int or False)
|
|
284
|
+
"validity_in_min": False # token expiration time in min (int, float or False)
|
|
285
|
+
}
|
|
286
|
+
partners = ["id::cell", "id::cell"]
|
|
287
|
+
contractID = cell.create_contract(descr, details, partners)
|
|
244
288
|
```
|
|
245
289
|
|
|
246
|
-
|
|
247
|
-
```python
|
|
248
|
-
|
|
249
|
-
cell.
|
|
290
|
+
Sign a Contract:
|
|
291
|
+
```python
|
|
292
|
+
contractID = "id::contract" # select contract
|
|
293
|
+
token = cell.sign_contract(contractID)
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Request a Token from another Cell to authorize a service:
|
|
297
|
+
```python
|
|
298
|
+
cp = "id::cell" # select counterparty cell
|
|
299
|
+
contractID = "id::contract" # select contract
|
|
300
|
+
cell.request_token(cp, contractID)
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Present a Token to another Cell to authorize a service:
|
|
304
|
+
```python
|
|
305
|
+
token = "token" # select token
|
|
306
|
+
cp = "id::cell" # select counterparty cell
|
|
307
|
+
contractID = "id::contract" # select the contract
|
|
308
|
+
cell.present_token(token, cp, contractID)
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Validate a Token to authorize a service:
|
|
312
|
+
```python
|
|
313
|
+
token = "token" # select token
|
|
314
|
+
cp = "id::cell" # select counterparty cell
|
|
315
|
+
contractID = "id::contract" # select contract
|
|
316
|
+
cell.validate_token(token, cp, contractID)
|
|
250
317
|
```
|
|
318
|
+
|
|
319
|
+
List Contracts your Cell can interact with:
|
|
320
|
+
```python
|
|
321
|
+
contractList = cell.list_contracts()
|
|
322
|
+
```
|
|
File without changes
|