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

|
|
19
|
+
|
|
16
20
|
[](https://neuronum.net)
|
|
17
21
|
[](https://neuronum.net/docs)
|
|
18
22
|
[](https://www.youtube.com/@neuronumnet)
|
|
@@ -55,10 +59,9 @@ Activate Transmitter (TX):
|
|
|
55
59
|
TX = "id::tx"
|
|
56
60
|
|
|
57
61
|
data = {
|
|
58
|
-
"key1": "value1",
|
|
59
|
-
"key2": "value2",
|
|
60
|
-
"key3": "value3",
|
|
61
|
-
"key4": "value4"
|
|
62
|
+
"key1": "value1",
|
|
63
|
+
"key2": "value2",
|
|
64
|
+
"key3": "value3",
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
cell.activate(TX, data)
|
|
@@ -68,9 +71,9 @@ Store data on your private Circuit (CTX):
|
|
|
68
71
|
```bash
|
|
69
72
|
label = "your_label"
|
|
70
73
|
data = {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
"key1": "value1",
|
|
75
|
+
"key2": "value2",
|
|
76
|
+
"key3": "value3",
|
|
74
77
|
}
|
|
75
78
|
cell.store(label, data)
|
|
76
79
|
```
|
|
@@ -81,9 +84,9 @@ CTX = "id::ctx"
|
|
|
81
84
|
|
|
82
85
|
label = "your_label"
|
|
83
86
|
data = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
"key1": "value1",
|
|
88
|
+
"key2": "value2",
|
|
89
|
+
"key3": "value3",
|
|
87
90
|
}
|
|
88
91
|
cell.store(label, data, CTX)
|
|
89
92
|
```
|
|
@@ -96,7 +99,6 @@ data = cell.load(label)
|
|
|
96
99
|
key1 = data["key1"]
|
|
97
100
|
key2 = data["key2"]
|
|
98
101
|
key3 = data["key3"]
|
|
99
|
-
print(key1, key2, key3)
|
|
100
102
|
```
|
|
101
103
|
|
|
102
104
|
Load data from a public Circuit (CTX):
|
|
@@ -109,7 +111,6 @@ data = cell.load(label, CTX)
|
|
|
109
111
|
key1 = data["key1"]
|
|
110
112
|
key2 = data["key2"]
|
|
111
113
|
key3 = data["key3"]
|
|
112
|
-
print(key1, key2, key3)
|
|
113
114
|
```
|
|
114
115
|
|
|
115
116
|
Delete data from your private Circuit (CTX):
|
|
@@ -131,3 +132,10 @@ Stream data:
|
|
|
131
132
|
data = "your_data"
|
|
132
133
|
cell.stream(data)
|
|
133
134
|
```
|
|
135
|
+
|
|
136
|
+
Sync data:
|
|
137
|
+
```bash
|
|
138
|
+
STX = "stx::id"
|
|
139
|
+
data = cell.sync(STX)
|
|
140
|
+
```
|
|
141
|
+
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|

|
|
2
|
+
|
|
2
3
|
[](https://neuronum.net)
|
|
3
4
|
[](https://neuronum.net/docs)
|
|
4
5
|
[](https://www.youtube.com/@neuronumnet)
|
|
@@ -41,10 +42,9 @@ Activate Transmitter (TX):
|
|
|
41
42
|
TX = "id::tx"
|
|
42
43
|
|
|
43
44
|
data = {
|
|
44
|
-
"key1": "value1",
|
|
45
|
-
"key2": "value2",
|
|
46
|
-
"key3": "value3",
|
|
47
|
-
"key4": "value4"
|
|
45
|
+
"key1": "value1",
|
|
46
|
+
"key2": "value2",
|
|
47
|
+
"key3": "value3",
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
cell.activate(TX, data)
|
|
@@ -54,9 +54,9 @@ Store data on your private Circuit (CTX):
|
|
|
54
54
|
```bash
|
|
55
55
|
label = "your_label"
|
|
56
56
|
data = {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
"key1": "value1",
|
|
58
|
+
"key2": "value2",
|
|
59
|
+
"key3": "value3",
|
|
60
60
|
}
|
|
61
61
|
cell.store(label, data)
|
|
62
62
|
```
|
|
@@ -67,9 +67,9 @@ CTX = "id::ctx"
|
|
|
67
67
|
|
|
68
68
|
label = "your_label"
|
|
69
69
|
data = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
"key1": "value1",
|
|
71
|
+
"key2": "value2",
|
|
72
|
+
"key3": "value3",
|
|
73
73
|
}
|
|
74
74
|
cell.store(label, data, CTX)
|
|
75
75
|
```
|
|
@@ -82,7 +82,6 @@ data = cell.load(label)
|
|
|
82
82
|
key1 = data["key1"]
|
|
83
83
|
key2 = data["key2"]
|
|
84
84
|
key3 = data["key3"]
|
|
85
|
-
print(key1, key2, key3)
|
|
86
85
|
```
|
|
87
86
|
|
|
88
87
|
Load data from a public Circuit (CTX):
|
|
@@ -95,7 +94,6 @@ data = cell.load(label, CTX)
|
|
|
95
94
|
key1 = data["key1"]
|
|
96
95
|
key2 = data["key2"]
|
|
97
96
|
key3 = data["key3"]
|
|
98
|
-
print(key1, key2, key3)
|
|
99
97
|
```
|
|
100
98
|
|
|
101
99
|
Delete data from your private Circuit (CTX):
|
|
@@ -116,4 +114,11 @@ Stream data:
|
|
|
116
114
|
```bash
|
|
117
115
|
data = "your_data"
|
|
118
116
|
cell.stream(data)
|
|
119
|
-
```
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Sync data:
|
|
120
|
+
```bash
|
|
121
|
+
STX = "stx::id"
|
|
122
|
+
data = cell.sync(STX)
|
|
123
|
+
```
|
|
124
|
+
|
|
@@ -2,6 +2,8 @@ import requests
|
|
|
2
2
|
import socket
|
|
3
3
|
from typing import Optional
|
|
4
4
|
import ssl
|
|
5
|
+
from websocket import create_connection
|
|
6
|
+
from typing import List
|
|
5
7
|
|
|
6
8
|
|
|
7
9
|
class Cell:
|
|
@@ -200,5 +202,29 @@ class Cell:
|
|
|
200
202
|
return "Authentication successful" in response
|
|
201
203
|
|
|
202
204
|
|
|
205
|
+
def sync(self, STX: str) -> List[str]:
|
|
206
|
+
data = []
|
|
207
|
+
try:
|
|
208
|
+
ws = create_connection(f"wss://{self.network}/ws/{STX}")
|
|
209
|
+
print(f"Connected to Stream {STX}")
|
|
210
|
+
except Exception as e:
|
|
211
|
+
print(f"Failed to connect: {e}")
|
|
212
|
+
return data
|
|
213
|
+
|
|
214
|
+
try:
|
|
215
|
+
while True:
|
|
216
|
+
message = ws.recv()
|
|
217
|
+
print(f"Received Data: {message}")
|
|
218
|
+
data.append(message)
|
|
219
|
+
except KeyboardInterrupt:
|
|
220
|
+
print("Closing connection...")
|
|
221
|
+
except Exception as e:
|
|
222
|
+
print(f"Error during data collection: {e}")
|
|
223
|
+
finally:
|
|
224
|
+
ws.close()
|
|
225
|
+
print("Connection closed.")
|
|
226
|
+
|
|
227
|
+
return data
|
|
228
|
+
|
|
203
229
|
|
|
204
230
|
__all__ = ['Cell']
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: neuronum
|
|
3
|
-
Version: 1.1
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: Interact with the Neuronum Network to build, connect & automate economic data streams
|
|
5
|
+
Home-page: https://neuronum.net
|
|
5
6
|
Author: Neuronum Cybernetics
|
|
6
7
|
Author-email: welcome@neuronum.net
|
|
8
|
+
Project-URL: GitHub, https://github.com/neuronumcybernetics/neuronum
|
|
7
9
|
Classifier: Programming Language :: Python :: 3
|
|
8
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
11
|
Classifier: Operating System :: OS Independent
|
|
@@ -11,8 +13,10 @@ Requires-Python: >=3.6
|
|
|
11
13
|
Description-Content-Type: text/markdown
|
|
12
14
|
License-File: LICENSE
|
|
13
15
|
Requires-Dist: requests
|
|
16
|
+
Requires-Dist: websocket-client
|
|
14
17
|
|
|
15
18
|

|
|
19
|
+
|
|
16
20
|
[](https://neuronum.net)
|
|
17
21
|
[](https://neuronum.net/docs)
|
|
18
22
|
[](https://www.youtube.com/@neuronumnet)
|
|
@@ -55,10 +59,9 @@ Activate Transmitter (TX):
|
|
|
55
59
|
TX = "id::tx"
|
|
56
60
|
|
|
57
61
|
data = {
|
|
58
|
-
"key1": "value1",
|
|
59
|
-
"key2": "value2",
|
|
60
|
-
"key3": "value3",
|
|
61
|
-
"key4": "value4"
|
|
62
|
+
"key1": "value1",
|
|
63
|
+
"key2": "value2",
|
|
64
|
+
"key3": "value3",
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
cell.activate(TX, data)
|
|
@@ -68,9 +71,9 @@ Store data on your private Circuit (CTX):
|
|
|
68
71
|
```bash
|
|
69
72
|
label = "your_label"
|
|
70
73
|
data = {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
"key1": "value1",
|
|
75
|
+
"key2": "value2",
|
|
76
|
+
"key3": "value3",
|
|
74
77
|
}
|
|
75
78
|
cell.store(label, data)
|
|
76
79
|
```
|
|
@@ -81,9 +84,9 @@ CTX = "id::ctx"
|
|
|
81
84
|
|
|
82
85
|
label = "your_label"
|
|
83
86
|
data = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
"key1": "value1",
|
|
88
|
+
"key2": "value2",
|
|
89
|
+
"key3": "value3",
|
|
87
90
|
}
|
|
88
91
|
cell.store(label, data, CTX)
|
|
89
92
|
```
|
|
@@ -96,7 +99,6 @@ data = cell.load(label)
|
|
|
96
99
|
key1 = data["key1"]
|
|
97
100
|
key2 = data["key2"]
|
|
98
101
|
key3 = data["key3"]
|
|
99
|
-
print(key1, key2, key3)
|
|
100
102
|
```
|
|
101
103
|
|
|
102
104
|
Load data from a public Circuit (CTX):
|
|
@@ -109,7 +111,6 @@ data = cell.load(label, CTX)
|
|
|
109
111
|
key1 = data["key1"]
|
|
110
112
|
key2 = data["key2"]
|
|
111
113
|
key3 = data["key3"]
|
|
112
|
-
print(key1, key2, key3)
|
|
113
114
|
```
|
|
114
115
|
|
|
115
116
|
Delete data from your private Circuit (CTX):
|
|
@@ -131,3 +132,10 @@ Stream data:
|
|
|
131
132
|
data = "your_data"
|
|
132
133
|
cell.stream(data)
|
|
133
134
|
```
|
|
135
|
+
|
|
136
|
+
Sync data:
|
|
137
|
+
```bash
|
|
138
|
+
STX = "stx::id"
|
|
139
|
+
data = cell.sync(STX)
|
|
140
|
+
```
|
|
141
|
+
|
|
@@ -2,12 +2,16 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='neuronum',
|
|
5
|
-
version='1.1
|
|
5
|
+
version='1.2.1',
|
|
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://neuronum.net",
|
|
12
|
+
project_urls={
|
|
13
|
+
"GitHub": "https://github.com/neuronumcybernetics/neuronum",
|
|
14
|
+
},
|
|
11
15
|
packages=find_packages(),
|
|
12
16
|
classifiers=[
|
|
13
17
|
"Programming Language :: Python :: 3",
|
|
@@ -15,7 +19,8 @@ setup(
|
|
|
15
19
|
"Operating System :: OS Independent",
|
|
16
20
|
],
|
|
17
21
|
install_requires=[
|
|
18
|
-
'requests',
|
|
22
|
+
'requests',
|
|
23
|
+
'websocket-client',
|
|
19
24
|
],
|
|
20
25
|
python_requires='>=3.6',
|
|
21
26
|
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
requests
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|