neuronum 5.6.0__tar.gz → 5.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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neuronum
3
- Version: 5.6.0
3
+ Version: 5.7.0
4
4
  Summary: Official client library to interact with the Neuronum Network
5
5
  Home-page: https://neuronum.net
6
6
  Author: Neuronum Cybernetics
@@ -51,12 +51,19 @@ Dynamic: summary
51
51
  </a>
52
52
  </p>
53
53
 
54
- ---
54
+ ------------------
55
+
56
+ ### **A Getting Started into the Neuronum Network**
57
+ - Learn about Neuronum
58
+ - Connect to the Network
59
+ - Build a Neuronum Node
60
+ - Interact with your Node
61
+
62
+ ------------------
55
63
 
56
64
  ### **About Neuronum**
57
65
  Neuronum empowers developers to build & connect apps, services, and devices into serverless networks able to exchange data in real time
58
66
 
59
-
60
67
  ### **Features**
61
68
  **Cell & Nodes**
62
69
  - Cell: Account to connect and interact with Neuronum. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/cell)
@@ -19,12 +19,19 @@
19
19
  </a>
20
20
  </p>
21
21
 
22
- ---
22
+ ------------------
23
+
24
+ ### **A Getting Started into the Neuronum Network**
25
+ - Learn about Neuronum
26
+ - Connect to the Network
27
+ - Build a Neuronum Node
28
+ - Interact with your Node
29
+
30
+ ------------------
23
31
 
24
32
  ### **About Neuronum**
25
33
  Neuronum empowers developers to build & connect apps, services, and devices into serverless networks able to exchange data in real time
26
34
 
27
-
28
35
  ### **Features**
29
36
  **Cell & Nodes**
30
37
  - Cell: Account to connect and interact with Neuronum. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/cell)
@@ -955,11 +955,54 @@ async def async_load(ctx, label):
955
955
  synapse=env_data.get("SYNAPSE", "")
956
956
  )
957
957
 
958
- print(label, ctx)
959
958
  data = await cell.load(label, ctx)
960
959
  click.echo(data)
961
960
 
962
961
 
962
+ @click.command()
963
+ @click.option('--stx', default=None, help="Stream ID (optional)")
964
+ def sync(stx):
965
+ asyncio.run(async_sync(stx))
966
+
967
+
968
+ async def async_sync(stx):
969
+ credentials_folder_path = Path.home() / ".neuronum"
970
+ env_path = credentials_folder_path / ".env"
971
+ env_data = {}
972
+
973
+ try:
974
+ with open(env_path, "r") as f:
975
+ for line in f:
976
+ key, value = line.strip().split("=")
977
+ env_data[key] = value
978
+ except FileNotFoundError:
979
+ click.echo("No cell connected. Try: neuronum connect-cell")
980
+ return
981
+ except Exception as e:
982
+ click.echo(f"Error reading .env: {e}")
983
+ return
984
+
985
+ cell = neuronum.Cell(
986
+ host=env_data.get("HOST", ""),
987
+ password=env_data.get("PASSWORD", ""),
988
+ network=env_data.get("NETWORK", ""),
989
+ synapse=env_data.get("SYNAPSE", "")
990
+ )
991
+
992
+ if stx:
993
+ print(f"Listening to Stream '{stx}'! Close connection with CTRL+C")
994
+ else:
995
+ print(f"Listening to '{cell.host}' private Stream! Close connection with CTRL+C")
996
+ async for operation in cell.sync() if stx is None else cell.sync(stx):
997
+ label = operation.get("label")
998
+ data = operation.get("data")
999
+ ts = operation.get("time")
1000
+ stxID = operation.get("stxID")
1001
+ operator = operation.get("operator")
1002
+ txID = operation.get("txID")
1003
+ print(label, data, ts, operator, txID, stxID)
1004
+
1005
+
963
1006
  cli.add_command(create_cell)
964
1007
  cli.add_command(connect_cell)
965
1008
  cli.add_command(view_cell)
@@ -974,6 +1017,7 @@ cli.add_command(disconnect_node)
974
1017
  cli.add_command(delete_node)
975
1018
  cli.add_command(activate)
976
1019
  cli.add_command(load)
1020
+ cli.add_command(sync)
977
1021
 
978
1022
 
979
1023
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neuronum
3
- Version: 5.6.0
3
+ Version: 5.7.0
4
4
  Summary: Official client library to interact with the Neuronum Network
5
5
  Home-page: https://neuronum.net
6
6
  Author: Neuronum Cybernetics
@@ -51,12 +51,19 @@ Dynamic: summary
51
51
  </a>
52
52
  </p>
53
53
 
54
- ---
54
+ ------------------
55
+
56
+ ### **A Getting Started into the Neuronum Network**
57
+ - Learn about Neuronum
58
+ - Connect to the Network
59
+ - Build a Neuronum Node
60
+ - Interact with your Node
61
+
62
+ ------------------
55
63
 
56
64
  ### **About Neuronum**
57
65
  Neuronum empowers developers to build & connect apps, services, and devices into serverless networks able to exchange data in real time
58
66
 
59
-
60
67
  ### **Features**
61
68
  **Cell & Nodes**
62
69
  - Cell: Account to connect and interact with Neuronum. [Learn More](https://github.com/neuronumcybernetics/neuronum/tree/main/features/cell)
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='neuronum',
5
- version='5.6.0',
5
+ version='5.7.0',
6
6
  author='Neuronum Cybernetics',
7
7
  author_email='welcome@neuronum.net',
8
8
  description='Official client library to interact with the Neuronum Network',
File without changes
File without changes
File without changes
File without changes
File without changes