neuronum 1.1.1__tar.gz → 1.2.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.1.1 → neuronum-1.2.0}/PKG-INFO +64 -21
- {neuronum-1.1.1 → neuronum-1.2.0}/README.md +61 -20
- neuronum-1.2.0/neuronum/__init__.py +2 -0
- {neuronum-1.1.1 → neuronum-1.2.0}/neuronum/neuronum.py +18 -0
- {neuronum-1.1.1 → neuronum-1.2.0}/neuronum.egg-info/PKG-INFO +64 -21
- {neuronum-1.1.1 → neuronum-1.2.0}/neuronum.egg-info/SOURCES.txt +1 -0
- neuronum-1.2.0/neuronum.egg-info/entry_points.txt +2 -0
- neuronum-1.2.0/neuronum.egg-info/requires.txt +2 -0
- {neuronum-1.1.1 → neuronum-1.2.0}/setup.py +9 -2
- neuronum-1.1.1/neuronum/__init__.py +0 -5
- neuronum-1.1.1/neuronum.egg-info/requires.txt +0 -1
- {neuronum-1.1.1 → neuronum-1.2.0}/LICENSE +0 -0
- {neuronum-1.1.1 → neuronum-1.2.0}/neuronum.egg-info/dependency_links.txt +0 -0
- {neuronum-1.1.1 → neuronum-1.2.0}/neuronum.egg-info/top_level.txt +0 -0
- {neuronum-1.1.1 → neuronum-1.2.0}/setup.cfg +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: neuronum
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Interact with the Neuronum Network to build, connect & automate economic data streams
|
|
5
|
+
Home-page: https://github.com/neuronumcybernetics/neuronum
|
|
5
6
|
Author: Neuronum Cybernetics
|
|
6
7
|
Author-email: welcome@neuronum.net
|
|
7
8
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -11,18 +12,28 @@ Requires-Python: >=3.6
|
|
|
11
12
|
Description-Content-Type: text/markdown
|
|
12
13
|
License-File: LICENSE
|
|
13
14
|
Requires-Dist: requests
|
|
15
|
+
Requires-Dist: websocket-client
|
|
14
16
|
|
|
15
17
|

|
|
16
|
-
|
|
18
|
+
|
|
17
19
|
[](https://neuronum.net)
|
|
18
20
|
[](https://neuronum.net/docs)
|
|
19
21
|
[](https://www.youtube.com/@neuronumnet)
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
Interact with the `Neuronum Network` to build, connect & automate economic data streams.
|
|
24
|
+
|
|
25
|
+
## Business Cell Features
|
|
22
26
|
- **Transmitters (TX)**: Automate economic data transfer + Circuits Integration
|
|
23
27
|
- **Circuits (CTX)**: A simple Key-Value-Label database to store economic data
|
|
24
28
|
- **Streams (STX)**: Stream economic data to synchronize devices & databases in real time (beta)
|
|
25
29
|
|
|
30
|
+
## Community Cell Features
|
|
31
|
+
- **Circuits (CTX)**: A simple Key-Value-Label database (perfect for testing and side projects)
|
|
32
|
+
|
|
33
|
+
## Getting Started
|
|
34
|
+
Create your Neuronum Business/Community Cell: [Create Cell](https://neuronum.net/createcell)
|
|
35
|
+
|
|
36
|
+
|
|
26
37
|
Install the Neuronum library using pip:
|
|
27
38
|
```bash
|
|
28
39
|
pip install neuronum
|
|
@@ -33,10 +44,10 @@ Set & test Cell connection:
|
|
|
33
44
|
import neuronum
|
|
34
45
|
|
|
35
46
|
cell = neuronum.Cell(
|
|
36
|
-
host="
|
|
37
|
-
password="
|
|
47
|
+
host="host::cell",
|
|
48
|
+
password="your_password",
|
|
38
49
|
network="neuronum.net",
|
|
39
|
-
synapse="
|
|
50
|
+
synapse="your_synapse"
|
|
40
51
|
)
|
|
41
52
|
|
|
42
53
|
cell.test_connection()
|
|
@@ -44,34 +55,55 @@ cell.test_connection()
|
|
|
44
55
|
|
|
45
56
|
Activate Transmitter (TX):
|
|
46
57
|
```bash
|
|
47
|
-
TX = "
|
|
58
|
+
TX = "id::tx"
|
|
48
59
|
|
|
49
60
|
data = {
|
|
50
|
-
"key1": "value1",
|
|
51
|
-
"key2": "value2",
|
|
52
|
-
"key3": "value3",
|
|
53
|
-
"key4": "value4"
|
|
61
|
+
"key1": "value1",
|
|
62
|
+
"key2": "value2",
|
|
63
|
+
"key3": "value3",
|
|
64
|
+
"key4": "value4"
|
|
54
65
|
}
|
|
55
66
|
|
|
56
67
|
cell.activate(TX, data)
|
|
57
68
|
```
|
|
58
69
|
|
|
59
|
-
Store data on Circuit (CTX):
|
|
70
|
+
Store data on your private Circuit (CTX):
|
|
60
71
|
```bash
|
|
61
|
-
|
|
72
|
+
label = "your_label"
|
|
73
|
+
data = {
|
|
74
|
+
"key1": "value1",
|
|
75
|
+
"key2": "value2",
|
|
76
|
+
"key3": "value3",
|
|
77
|
+
}
|
|
78
|
+
cell.store(label, data)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Store data on a public Circuit (CTX):
|
|
82
|
+
```bash
|
|
83
|
+
CTX = "id::ctx"
|
|
62
84
|
|
|
63
85
|
label = "your_label"
|
|
64
86
|
data = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
87
|
+
"key1": "value1",
|
|
88
|
+
"key2": "value2",
|
|
89
|
+
"key3": "value3",
|
|
68
90
|
}
|
|
69
91
|
cell.store(label, data, CTX)
|
|
70
92
|
```
|
|
71
93
|
|
|
72
|
-
Load data from Circuit (CTX):
|
|
94
|
+
Load data from your private Circuit (CTX):
|
|
95
|
+
```bash
|
|
96
|
+
label = "your_label"
|
|
97
|
+
|
|
98
|
+
data = cell.load(label)
|
|
99
|
+
key1 = data["key1"]
|
|
100
|
+
key2 = data["key2"]
|
|
101
|
+
key3 = data["key3"]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Load data from a public Circuit (CTX):
|
|
73
105
|
```bash
|
|
74
|
-
CTX = "
|
|
106
|
+
CTX = "id::ctx"
|
|
75
107
|
|
|
76
108
|
label = "your_label"
|
|
77
109
|
|
|
@@ -79,12 +111,17 @@ data = cell.load(label, CTX)
|
|
|
79
111
|
key1 = data["key1"]
|
|
80
112
|
key2 = data["key2"]
|
|
81
113
|
key3 = data["key3"]
|
|
82
|
-
print(key1, key2, key3)
|
|
83
114
|
```
|
|
84
115
|
|
|
85
|
-
Delete data from Circuit (CTX):
|
|
116
|
+
Delete data from your private Circuit (CTX):
|
|
86
117
|
```bash
|
|
87
|
-
|
|
118
|
+
label = "your_label"
|
|
119
|
+
data = cell.delete(label)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Delete data from a public Circuit (CTX):
|
|
123
|
+
```bash
|
|
124
|
+
CTX = "id::ctx"
|
|
88
125
|
|
|
89
126
|
label = "your_label"
|
|
90
127
|
data = cell.delete(label, CTX)
|
|
@@ -95,3 +132,9 @@ Stream data:
|
|
|
95
132
|
data = "your_data"
|
|
96
133
|
cell.stream(data)
|
|
97
134
|
```
|
|
135
|
+
|
|
136
|
+
Sync data:
|
|
137
|
+
```bash
|
|
138
|
+
STX = "stx::id"
|
|
139
|
+
cell.sync(STX)
|
|
140
|
+
```
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|

|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
[](https://neuronum.net)
|
|
4
4
|
[](https://neuronum.net/docs)
|
|
5
5
|
[](https://www.youtube.com/@neuronumnet)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Interact with the `Neuronum Network` to build, connect & automate economic data streams.
|
|
8
|
+
|
|
9
|
+
## Business Cell Features
|
|
8
10
|
- **Transmitters (TX)**: Automate economic data transfer + Circuits Integration
|
|
9
11
|
- **Circuits (CTX)**: A simple Key-Value-Label database to store economic data
|
|
10
12
|
- **Streams (STX)**: Stream economic data to synchronize devices & databases in real time (beta)
|
|
11
13
|
|
|
14
|
+
## Community Cell Features
|
|
15
|
+
- **Circuits (CTX)**: A simple Key-Value-Label database (perfect for testing and side projects)
|
|
16
|
+
|
|
17
|
+
## Getting Started
|
|
18
|
+
Create your Neuronum Business/Community Cell: [Create Cell](https://neuronum.net/createcell)
|
|
19
|
+
|
|
20
|
+
|
|
12
21
|
Install the Neuronum library using pip:
|
|
13
22
|
```bash
|
|
14
23
|
pip install neuronum
|
|
@@ -19,10 +28,10 @@ Set & test Cell connection:
|
|
|
19
28
|
import neuronum
|
|
20
29
|
|
|
21
30
|
cell = neuronum.Cell(
|
|
22
|
-
host="
|
|
23
|
-
password="
|
|
31
|
+
host="host::cell",
|
|
32
|
+
password="your_password",
|
|
24
33
|
network="neuronum.net",
|
|
25
|
-
synapse="
|
|
34
|
+
synapse="your_synapse"
|
|
26
35
|
)
|
|
27
36
|
|
|
28
37
|
cell.test_connection()
|
|
@@ -30,34 +39,55 @@ cell.test_connection()
|
|
|
30
39
|
|
|
31
40
|
Activate Transmitter (TX):
|
|
32
41
|
```bash
|
|
33
|
-
TX = "
|
|
42
|
+
TX = "id::tx"
|
|
34
43
|
|
|
35
44
|
data = {
|
|
36
|
-
"key1": "value1",
|
|
37
|
-
"key2": "value2",
|
|
38
|
-
"key3": "value3",
|
|
39
|
-
"key4": "value4"
|
|
45
|
+
"key1": "value1",
|
|
46
|
+
"key2": "value2",
|
|
47
|
+
"key3": "value3",
|
|
48
|
+
"key4": "value4"
|
|
40
49
|
}
|
|
41
50
|
|
|
42
51
|
cell.activate(TX, data)
|
|
43
52
|
```
|
|
44
53
|
|
|
45
|
-
Store data on Circuit (CTX):
|
|
54
|
+
Store data on your private Circuit (CTX):
|
|
46
55
|
```bash
|
|
47
|
-
|
|
56
|
+
label = "your_label"
|
|
57
|
+
data = {
|
|
58
|
+
"key1": "value1",
|
|
59
|
+
"key2": "value2",
|
|
60
|
+
"key3": "value3",
|
|
61
|
+
}
|
|
62
|
+
cell.store(label, data)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Store data on a public Circuit (CTX):
|
|
66
|
+
```bash
|
|
67
|
+
CTX = "id::ctx"
|
|
48
68
|
|
|
49
69
|
label = "your_label"
|
|
50
70
|
data = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
71
|
+
"key1": "value1",
|
|
72
|
+
"key2": "value2",
|
|
73
|
+
"key3": "value3",
|
|
54
74
|
}
|
|
55
75
|
cell.store(label, data, CTX)
|
|
56
76
|
```
|
|
57
77
|
|
|
58
|
-
Load data from Circuit (CTX):
|
|
78
|
+
Load data from your private Circuit (CTX):
|
|
79
|
+
```bash
|
|
80
|
+
label = "your_label"
|
|
81
|
+
|
|
82
|
+
data = cell.load(label)
|
|
83
|
+
key1 = data["key1"]
|
|
84
|
+
key2 = data["key2"]
|
|
85
|
+
key3 = data["key3"]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Load data from a public Circuit (CTX):
|
|
59
89
|
```bash
|
|
60
|
-
CTX = "
|
|
90
|
+
CTX = "id::ctx"
|
|
61
91
|
|
|
62
92
|
label = "your_label"
|
|
63
93
|
|
|
@@ -65,12 +95,17 @@ data = cell.load(label, CTX)
|
|
|
65
95
|
key1 = data["key1"]
|
|
66
96
|
key2 = data["key2"]
|
|
67
97
|
key3 = data["key3"]
|
|
68
|
-
print(key1, key2, key3)
|
|
69
98
|
```
|
|
70
99
|
|
|
71
|
-
Delete data from Circuit (CTX):
|
|
100
|
+
Delete data from your private Circuit (CTX):
|
|
72
101
|
```bash
|
|
73
|
-
|
|
102
|
+
label = "your_label"
|
|
103
|
+
data = cell.delete(label)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Delete data from a public Circuit (CTX):
|
|
107
|
+
```bash
|
|
108
|
+
CTX = "id::ctx"
|
|
74
109
|
|
|
75
110
|
label = "your_label"
|
|
76
111
|
data = cell.delete(label, CTX)
|
|
@@ -80,4 +115,10 @@ Stream data:
|
|
|
80
115
|
```bash
|
|
81
116
|
data = "your_data"
|
|
82
117
|
cell.stream(data)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Sync data:
|
|
121
|
+
```bash
|
|
122
|
+
STX = "stx::id"
|
|
123
|
+
cell.sync(STX)
|
|
83
124
|
```
|
|
@@ -2,6 +2,7 @@ import requests
|
|
|
2
2
|
import socket
|
|
3
3
|
from typing import Optional
|
|
4
4
|
import ssl
|
|
5
|
+
from websocket import create_connection
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
class Cell:
|
|
@@ -200,5 +201,22 @@ class Cell:
|
|
|
200
201
|
return "Authentication successful" in response
|
|
201
202
|
|
|
202
203
|
|
|
204
|
+
def sync(self, STX: str):
|
|
205
|
+
try:
|
|
206
|
+
ws = create_connection(f"wss://{self.network}/ws/{STX}")
|
|
207
|
+
print(f"Connected to Stream {STX}")
|
|
208
|
+
except Exception as e:
|
|
209
|
+
print(f"Failed to connect: {e}")
|
|
210
|
+
return
|
|
211
|
+
|
|
212
|
+
try:
|
|
213
|
+
while True:
|
|
214
|
+
message = ws.recv()
|
|
215
|
+
print(f"Received Data: {message}")
|
|
216
|
+
except KeyboardInterrupt:
|
|
217
|
+
print("Closing connection...")
|
|
218
|
+
finally:
|
|
219
|
+
ws.close()
|
|
220
|
+
|
|
203
221
|
|
|
204
222
|
__all__ = ['Cell']
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: neuronum
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Interact with the Neuronum Network to build, connect & automate economic data streams
|
|
5
|
+
Home-page: https://github.com/neuronumcybernetics/neuronum
|
|
5
6
|
Author: Neuronum Cybernetics
|
|
6
7
|
Author-email: welcome@neuronum.net
|
|
7
8
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -11,18 +12,28 @@ Requires-Python: >=3.6
|
|
|
11
12
|
Description-Content-Type: text/markdown
|
|
12
13
|
License-File: LICENSE
|
|
13
14
|
Requires-Dist: requests
|
|
15
|
+
Requires-Dist: websocket-client
|
|
14
16
|
|
|
15
17
|

|
|
16
|
-
|
|
18
|
+
|
|
17
19
|
[](https://neuronum.net)
|
|
18
20
|
[](https://neuronum.net/docs)
|
|
19
21
|
[](https://www.youtube.com/@neuronumnet)
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
Interact with the `Neuronum Network` to build, connect & automate economic data streams.
|
|
24
|
+
|
|
25
|
+
## Business Cell Features
|
|
22
26
|
- **Transmitters (TX)**: Automate economic data transfer + Circuits Integration
|
|
23
27
|
- **Circuits (CTX)**: A simple Key-Value-Label database to store economic data
|
|
24
28
|
- **Streams (STX)**: Stream economic data to synchronize devices & databases in real time (beta)
|
|
25
29
|
|
|
30
|
+
## Community Cell Features
|
|
31
|
+
- **Circuits (CTX)**: A simple Key-Value-Label database (perfect for testing and side projects)
|
|
32
|
+
|
|
33
|
+
## Getting Started
|
|
34
|
+
Create your Neuronum Business/Community Cell: [Create Cell](https://neuronum.net/createcell)
|
|
35
|
+
|
|
36
|
+
|
|
26
37
|
Install the Neuronum library using pip:
|
|
27
38
|
```bash
|
|
28
39
|
pip install neuronum
|
|
@@ -33,10 +44,10 @@ Set & test Cell connection:
|
|
|
33
44
|
import neuronum
|
|
34
45
|
|
|
35
46
|
cell = neuronum.Cell(
|
|
36
|
-
host="
|
|
37
|
-
password="
|
|
47
|
+
host="host::cell",
|
|
48
|
+
password="your_password",
|
|
38
49
|
network="neuronum.net",
|
|
39
|
-
synapse="
|
|
50
|
+
synapse="your_synapse"
|
|
40
51
|
)
|
|
41
52
|
|
|
42
53
|
cell.test_connection()
|
|
@@ -44,34 +55,55 @@ cell.test_connection()
|
|
|
44
55
|
|
|
45
56
|
Activate Transmitter (TX):
|
|
46
57
|
```bash
|
|
47
|
-
TX = "
|
|
58
|
+
TX = "id::tx"
|
|
48
59
|
|
|
49
60
|
data = {
|
|
50
|
-
"key1": "value1",
|
|
51
|
-
"key2": "value2",
|
|
52
|
-
"key3": "value3",
|
|
53
|
-
"key4": "value4"
|
|
61
|
+
"key1": "value1",
|
|
62
|
+
"key2": "value2",
|
|
63
|
+
"key3": "value3",
|
|
64
|
+
"key4": "value4"
|
|
54
65
|
}
|
|
55
66
|
|
|
56
67
|
cell.activate(TX, data)
|
|
57
68
|
```
|
|
58
69
|
|
|
59
|
-
Store data on Circuit (CTX):
|
|
70
|
+
Store data on your private Circuit (CTX):
|
|
60
71
|
```bash
|
|
61
|
-
|
|
72
|
+
label = "your_label"
|
|
73
|
+
data = {
|
|
74
|
+
"key1": "value1",
|
|
75
|
+
"key2": "value2",
|
|
76
|
+
"key3": "value3",
|
|
77
|
+
}
|
|
78
|
+
cell.store(label, data)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Store data on a public Circuit (CTX):
|
|
82
|
+
```bash
|
|
83
|
+
CTX = "id::ctx"
|
|
62
84
|
|
|
63
85
|
label = "your_label"
|
|
64
86
|
data = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
87
|
+
"key1": "value1",
|
|
88
|
+
"key2": "value2",
|
|
89
|
+
"key3": "value3",
|
|
68
90
|
}
|
|
69
91
|
cell.store(label, data, CTX)
|
|
70
92
|
```
|
|
71
93
|
|
|
72
|
-
Load data from Circuit (CTX):
|
|
94
|
+
Load data from your private Circuit (CTX):
|
|
95
|
+
```bash
|
|
96
|
+
label = "your_label"
|
|
97
|
+
|
|
98
|
+
data = cell.load(label)
|
|
99
|
+
key1 = data["key1"]
|
|
100
|
+
key2 = data["key2"]
|
|
101
|
+
key3 = data["key3"]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Load data from a public Circuit (CTX):
|
|
73
105
|
```bash
|
|
74
|
-
CTX = "
|
|
106
|
+
CTX = "id::ctx"
|
|
75
107
|
|
|
76
108
|
label = "your_label"
|
|
77
109
|
|
|
@@ -79,12 +111,17 @@ data = cell.load(label, CTX)
|
|
|
79
111
|
key1 = data["key1"]
|
|
80
112
|
key2 = data["key2"]
|
|
81
113
|
key3 = data["key3"]
|
|
82
|
-
print(key1, key2, key3)
|
|
83
114
|
```
|
|
84
115
|
|
|
85
|
-
Delete data from Circuit (CTX):
|
|
116
|
+
Delete data from your private Circuit (CTX):
|
|
86
117
|
```bash
|
|
87
|
-
|
|
118
|
+
label = "your_label"
|
|
119
|
+
data = cell.delete(label)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Delete data from a public Circuit (CTX):
|
|
123
|
+
```bash
|
|
124
|
+
CTX = "id::ctx"
|
|
88
125
|
|
|
89
126
|
label = "your_label"
|
|
90
127
|
data = cell.delete(label, CTX)
|
|
@@ -95,3 +132,9 @@ Stream data:
|
|
|
95
132
|
data = "your_data"
|
|
96
133
|
cell.stream(data)
|
|
97
134
|
```
|
|
135
|
+
|
|
136
|
+
Sync data:
|
|
137
|
+
```bash
|
|
138
|
+
STX = "stx::id"
|
|
139
|
+
cell.sync(STX)
|
|
140
|
+
```
|
|
@@ -2,12 +2,13 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='neuronum',
|
|
5
|
-
version='1.
|
|
5
|
+
version='1.2.0',
|
|
6
6
|
author='Neuronum Cybernetics',
|
|
7
7
|
author_email='welcome@neuronum.net',
|
|
8
8
|
description='Interact with the Neuronum Network to build, connect & automate economic data streams',
|
|
9
9
|
long_description=open("README.md").read(),
|
|
10
10
|
long_description_content_type="text/markdown",
|
|
11
|
+
url="https://github.com/neuronumcybernetics/neuronum",
|
|
11
12
|
packages=find_packages(),
|
|
12
13
|
classifiers=[
|
|
13
14
|
"Programming Language :: Python :: 3",
|
|
@@ -15,7 +16,13 @@ setup(
|
|
|
15
16
|
"Operating System :: OS Independent",
|
|
16
17
|
],
|
|
17
18
|
install_requires=[
|
|
18
|
-
'requests',
|
|
19
|
+
'requests',
|
|
20
|
+
'websocket-client',
|
|
19
21
|
],
|
|
22
|
+
entry_points={
|
|
23
|
+
"console_scripts": [
|
|
24
|
+
"neuronum = neuronum.cli:main",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
20
27
|
python_requires='>=3.6',
|
|
21
28
|
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
requests
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|