neuronum 1.3.4__py3-none-any.whl → 1.4.0__py3-none-any.whl
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/neuronum.py +26 -0
- {neuronum-1.3.4.dist-info → neuronum-1.4.0.dist-info}/METADATA +10 -1
- neuronum-1.4.0.dist-info/RECORD +7 -0
- neuronum-1.3.4.dist-info/RECORD +0 -7
- {neuronum-1.3.4.dist-info → neuronum-1.4.0.dist-info}/LICENSE +0 -0
- {neuronum-1.3.4.dist-info → neuronum-1.4.0.dist-info}/WHEEL +0 -0
- {neuronum-1.3.4.dist-info → neuronum-1.4.0.dist-info}/top_level.txt +0 -0
neuronum/neuronum.py
CHANGED
|
@@ -59,6 +59,32 @@ class Cell:
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
+
def register(self, node: str, stx: str):
|
|
63
|
+
url = f"https://{self.network}/register/node"
|
|
64
|
+
|
|
65
|
+
node = {
|
|
66
|
+
"description": node,
|
|
67
|
+
"stream": stx,
|
|
68
|
+
"cell": self.to_dict()
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
try:
|
|
72
|
+
response = requests.post(
|
|
73
|
+
url,
|
|
74
|
+
json=node,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
response.raise_for_status()
|
|
78
|
+
|
|
79
|
+
print(f"Response from Neuronum: {response.json()}")
|
|
80
|
+
|
|
81
|
+
except requests.exceptions.RequestException as e:
|
|
82
|
+
print(f"Error sending request: {e}")
|
|
83
|
+
except Exception as e:
|
|
84
|
+
print(f"Unexpected error: {e}")
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
62
88
|
def test_connection(self):
|
|
63
89
|
url = f"https://{self.network}/testConnection"
|
|
64
90
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: neuronum
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: Interact with the Neuronum Network to build, connect & automate economic data streams
|
|
5
5
|
Home-page: https://neuronum.net
|
|
6
6
|
Author: Neuronum Cybernetics
|
|
@@ -27,6 +27,7 @@ Interact with the `Neuronum Network` to build, connect & automate economic data
|
|
|
27
27
|
- **Transmitters (TX)**: Automate economic data transfer + Circuits Integration
|
|
28
28
|
- **Circuits (CTX)**: A simple Key-Value-Label database to store economic data
|
|
29
29
|
- **Streams (STX)**: Stream, synchronize and control data in real time
|
|
30
|
+
- **Nodes**: Register Nodes actively running the Neuronum library
|
|
30
31
|
|
|
31
32
|
## Getting Started
|
|
32
33
|
Create your Neuronum Cell: [Create Cell](https://neuronum.net/createcell)
|
|
@@ -175,3 +176,11 @@ for operation in stream:
|
|
|
175
176
|
operator = operation.get("operator")
|
|
176
177
|
```
|
|
177
178
|
|
|
179
|
+
### Nodes
|
|
180
|
+
Register a Neuronum Node with its associated Stream:
|
|
181
|
+
```bash
|
|
182
|
+
node = "name_your_node"
|
|
183
|
+
STX = "id::stx"
|
|
184
|
+
cell.register(node, STX)
|
|
185
|
+
```
|
|
186
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
neuronum/__init__.py,sha256=Drsm263_w3_VWgl1YsKLUr8WwVodqV3TSjqpxLjyq_M,46
|
|
2
|
+
neuronum/neuronum.py,sha256=wjFvv8j5aF8vpMy0fEWIJLFWIYo1hzBa8Ml4ANRunSs,8614
|
|
3
|
+
neuronum-1.4.0.dist-info/LICENSE,sha256=UiZjNHiCyRP6WoZfbYQh9cv4JW96wIofKXmzBJrYSUk,1125
|
|
4
|
+
neuronum-1.4.0.dist-info/METADATA,sha256=eJw381gFqsLBCl4Nzsj6uY7W16phRGrc_FU23--Sl9Y,4338
|
|
5
|
+
neuronum-1.4.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
6
|
+
neuronum-1.4.0.dist-info/top_level.txt,sha256=73zXVVO9UTTiwEcSaXytsJ8n0q47OCwAqPlIh-hzWJU,9
|
|
7
|
+
neuronum-1.4.0.dist-info/RECORD,,
|
neuronum-1.3.4.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
neuronum/__init__.py,sha256=Drsm263_w3_VWgl1YsKLUr8WwVodqV3TSjqpxLjyq_M,46
|
|
2
|
-
neuronum/neuronum.py,sha256=PSzSYL3ig0WATo0hzswk3v4Gdk_0eZVho3L9xte0gZ0,7960
|
|
3
|
-
neuronum-1.3.4.dist-info/LICENSE,sha256=UiZjNHiCyRP6WoZfbYQh9cv4JW96wIofKXmzBJrYSUk,1125
|
|
4
|
-
neuronum-1.3.4.dist-info/METADATA,sha256=AqO3cYQcRQlDq5wr8-VC6wzHF-9CZk55N_DCKuar8sk,4122
|
|
5
|
-
neuronum-1.3.4.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
6
|
-
neuronum-1.3.4.dist-info/top_level.txt,sha256=73zXVVO9UTTiwEcSaXytsJ8n0q47OCwAqPlIh-hzWJU,9
|
|
7
|
-
neuronum-1.3.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|