neuronum 1.7.2__py3-none-any.whl → 2.0.1__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.

cellai/__init__.py ADDED
File without changes
cellai/cellai.py ADDED
@@ -0,0 +1,7 @@
1
+ def main():
2
+ print("Hello, it's your task assistant Cellai")
3
+ print("I'm still in development, but my creators are happy to share updates.")
4
+ print("Feel free to reach out to them at <welcome@neuronum.net> for more details.")
5
+
6
+ if __name__ == "__main__":
7
+ main()
cli/main.py CHANGED
@@ -6,6 +6,8 @@ import subprocess
6
6
  import os
7
7
  import neuronum
8
8
  import json
9
+ import sys
10
+ import cellai
9
11
 
10
12
  @click.group()
11
13
  def cli():
@@ -285,6 +287,7 @@ def init_node(sync):
285
287
  synapse=synapse
286
288
  )
287
289
 
290
+ cells = cell.list_cells()
288
291
  tx = cell.list_tx()
289
292
  ctx = cell.list_ctx()
290
293
  stx = cell.list_stx()
@@ -313,6 +316,9 @@ def init_node(sync):
313
316
  gitignore_path = project_path / ".gitignore"
314
317
  gitignore_path.write_text(f".env\n")
315
318
 
319
+ cells_path = Path("cells.json")
320
+ cells_path.write_text(json.dumps(cells, indent=4))
321
+
316
322
  tx_path = project_path / "transmitters.json"
317
323
  tx_path.write_text(json.dumps(tx, indent=4))
318
324
 
@@ -514,18 +520,21 @@ def update_node():
514
520
  synapse=synapse
515
521
  )
516
522
 
523
+ cells = cell.list_cells()
517
524
  tx = cell.list_tx()
518
525
  ctx = cell.list_ctx()
519
526
  stx = cell.list_stx()
520
527
  contracts = cell.list_contracts()
521
528
  nodes = cell.list_nodes()
522
529
 
530
+ cells_path = Path("cells.json")
523
531
  tx_path = Path("transmitters.json")
524
532
  ctx_path = Path("circuits.json")
525
533
  stx_path = Path("streams.json")
526
534
  contracts_path = Path("contracts.json")
527
535
  nodes_path = Path("nodes.json")
528
536
 
537
+ cells_path.write_text(json.dumps(cells, indent=4))
529
538
  tx_path.write_text(json.dumps(tx, indent=4))
530
539
  ctx_path.write_text(json.dumps(ctx, indent=4))
531
540
  stx_path.write_text(json.dumps(stx, indent=4))
@@ -577,6 +586,14 @@ def delete_node():
577
586
  click.echo(f"Neuronum Node '{nodeID}' deleted!")
578
587
 
579
588
 
589
+ @click.command()
590
+ def call_cellai():
591
+ try:
592
+ from cellai import cellai
593
+ cellai.main()
594
+ except ImportError:
595
+ click.echo("Cellai not found. Please check the necessary dependencies.")
596
+
580
597
  cli.add_command(create_cell)
581
598
  cli.add_command(connect_cell)
582
599
  cli.add_command(view_cell)
@@ -588,6 +605,7 @@ cli.add_command(stop_node)
588
605
  cli.add_command(register_node)
589
606
  cli.add_command(update_node)
590
607
  cli.add_command(delete_node)
608
+ cli.add_command(call_cellai)
591
609
 
592
610
 
593
611
  if __name__ == "__main__":
neuronum/neuronum.py CHANGED
@@ -206,6 +206,23 @@ class Cell:
206
206
  print(f"Unexpected error: {e}")
207
207
 
208
208
 
209
+ def list_cells(self):
210
+ full_url = f"https://{self.network}/api/list_cells"
211
+
212
+ list_cells = {
213
+ "cell": self.to_dict()
214
+ }
215
+
216
+ try:
217
+ response = requests.get(full_url, json=list_cells)
218
+ response.raise_for_status()
219
+ return response.json()["Cells"]
220
+ except requests.exceptions.RequestException as e:
221
+ print(f"Error sending request: {e}")
222
+ except Exception as e:
223
+ print(f"Unexpected error: {e}")
224
+
225
+
209
226
  def list_tx(self):
210
227
  full_url = f"https://{self.network}/api/list_tx"
211
228
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: neuronum
3
- Version: 1.7.2
3
+ Version: 2.0.1
4
4
  Summary: Official client library to interact with the Neuronum Network
5
5
  Home-page: https://neuronum.net
6
6
  Author: Neuronum Cybernetics
@@ -17,20 +17,35 @@ Requires-Dist: websocket-client
17
17
  Requires-Dist: click
18
18
  Requires-Dist: questionary
19
19
  Requires-Dist: python-dotenv
20
+ Dynamic: author
21
+ Dynamic: author-email
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: license-file
27
+ Dynamic: project-url
28
+ Dynamic: requires-dist
29
+ Dynamic: requires-python
30
+ Dynamic: summary
20
31
 
21
32
  ![Neuronum Logo](https://neuronum.net/static/logo_pip.png "Neuronum")
22
33
 
23
34
  [![Website](https://img.shields.io/badge/Website-Neuronum-blue)](https://neuronum.net) [![Documentation](https://img.shields.io/badge/Docs-Read%20now-green)](https://github.com/neuronumcybernetics/neuronum)
24
35
 
25
- Build, deploy and automate serverless IoT connectivity with `Neuronum`
36
+ Build, deploy and automate serverless data infrastructures for an interconnected world with `Neuronum`
26
37
 
27
- ## Features
38
+ ### **What's New in neuronum==2.0.1?**
39
+ - **Cellai**: A local running task assistant in development (version 0.0.1)
40
+
41
+ ### New Feature Set
28
42
  - **Cells/Cell-CLI**: Create and manage Neuronum Cells from the command line
29
43
  - **Nodes/Node-CLI**: Setup and manage Neuronum Nodes from the command line
30
44
  - **Transmitters (TX)**: Automate economic data transfer
31
45
  - **Circuits (CTX)**: Store data in Key-Value-Label databases
32
46
  - **Streams (STX)**: Stream, synchronize and control data in real time
33
47
  - **Contracts/Tokens**: Automate services exchange and authorization between Cells and Nodes
48
+ - **Cellai**: A local running task assistant in development (version 0.0.1)
34
49
 
35
50
  ### Installation
36
51
  Install the Neuronum library using pip:
@@ -66,6 +81,11 @@ Delete Cell:
66
81
  $ neuronum delete-cell
67
82
  ```
68
83
 
84
+ List Cells:
85
+ ```python
86
+ cellsList = cell.list_cells() # list Nodes
87
+ ```
88
+
69
89
  ### Nodes/Node-CLI
70
90
  Neuronum Nodes are soft- and hardware components that power the Neuronum Network, enabling seamless communication between Nodes and Cells
71
91
 
@@ -304,7 +324,6 @@ Create a Contract:
304
324
  ```python
305
325
  descr = "Test Contract" # short description (max 25 characters)
306
326
  details = { # token details
307
- "price_in_eur": False, # token price in EUR (int, float or False)
308
327
  "max_usage": False, # max number of uses (int or False)
309
328
  "validity_in_min": False, # token expiration time in min (int, float or False)
310
329
  "expiration_date": False # expiration date (DD-MM-YYYY or False)
@@ -0,0 +1,12 @@
1
+ cellai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ cellai/cellai.py,sha256=g5oBz-Xx6T4-JWzUs-TJ4y9nHtDmA_IpXh_188OqAZA,281
3
+ cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ cli/main.py,sha256=iIhQ3a-LIuUI29yFm7GvZ6rmXouWpscI1HFVjFpmYlk,18341
5
+ neuronum/__init__.py,sha256=Drsm263_w3_VWgl1YsKLUr8WwVodqV3TSjqpxLjyq_M,46
6
+ neuronum/neuronum.py,sha256=rkc16omTxjWBEgBXP0rCeab1S3lYDKz1zx_i-tdFjlY,17544
7
+ neuronum-2.0.1.dist-info/licenses/LICENSE,sha256=UiZjNHiCyRP6WoZfbYQh9cv4JW96wIofKXmzBJrYSUk,1125
8
+ neuronum-2.0.1.dist-info/METADATA,sha256=HGIdNEEXbfMc4GLXI-l61bbLpZqfxUyw0avZQF6Kn-A,13634
9
+ neuronum-2.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ neuronum-2.0.1.dist-info/entry_points.txt,sha256=XKYBcRNxGeJpZZkDPsa8HA_RaJ7Km_R_JaUq5T9Nk2U,42
11
+ neuronum-2.0.1.dist-info/top_level.txt,sha256=gqN5tyGnBKMPSzvWQONO4rpTf4gQPMi77O3KAKx88LQ,20
12
+ neuronum-2.0.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,2 +1,3 @@
1
+ cellai
1
2
  cli
2
3
  neuronum
@@ -1,10 +0,0 @@
1
- cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- cli/main.py,sha256=R0qdrTLstaYVA1I_mknrl8VpFRAkjCcrY45QXFg5qhs,17819
3
- neuronum/__init__.py,sha256=Drsm263_w3_VWgl1YsKLUr8WwVodqV3TSjqpxLjyq_M,46
4
- neuronum/neuronum.py,sha256=91lOreL7TeD8VWdDCtS2xu7MO34taI4HEYr-Lpv6L9Y,17019
5
- neuronum-1.7.2.dist-info/LICENSE,sha256=UiZjNHiCyRP6WoZfbYQh9cv4JW96wIofKXmzBJrYSUk,1125
6
- neuronum-1.7.2.dist-info/METADATA,sha256=3USLy4kwOja3yGILOUY-MB1RMOZp5t3GTa3xyQKInuc,13101
7
- neuronum-1.7.2.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
8
- neuronum-1.7.2.dist-info/entry_points.txt,sha256=XKYBcRNxGeJpZZkDPsa8HA_RaJ7Km_R_JaUq5T9Nk2U,42
9
- neuronum-1.7.2.dist-info/top_level.txt,sha256=ru8Fr84cHm6oHr_DcJ8-uaq3RTiuCRFIr6AC8V0zPu4,13
10
- neuronum-1.7.2.dist-info/RECORD,,