neuronum 7.0.1__tar.gz → 7.0.2__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: 7.0.1
3
+ Version: 7.0.2
4
4
  Summary: Official client library to interact with the Neuronum Network
5
5
  Home-page: https://neuronum.net
6
6
  Author: Neuronum Cybernetics
@@ -139,12 +139,6 @@ neuronum start-node # start Node
139
139
  ------------------
140
140
 
141
141
  ### **Interact with Neuronum**
142
- #### **Web-based**
143
- 1. [Visit Neuronum](https://neuronum.net)
144
- 2. [Connect your Cell](https://neuronum.net/connect)
145
- 3. [Explore Transmitters](https://neuronum.net/explore)
146
- 4. Activate Transmitters
147
-
148
142
  #### **Code-based**
149
143
  ```python
150
144
  import asyncio
@@ -105,12 +105,6 @@ neuronum start-node # start Node
105
105
  ------------------
106
106
 
107
107
  ### **Interact with Neuronum**
108
- #### **Web-based**
109
- 1. [Visit Neuronum](https://neuronum.net)
110
- 2. [Connect your Cell](https://neuronum.net/connect)
111
- 3. [Explore Transmitters](https://neuronum.net/explore)
112
- 4. Activate Transmitters
113
-
114
108
  #### **Code-based**
115
109
  ```python
116
110
  import asyncio
@@ -330,11 +330,19 @@ async def async_init_node(descr):
330
330
  import asyncio
331
331
  import neuronum
332
332
  import os
333
+ import json
333
334
  from dotenv import load_dotenv
334
335
  from jinja2 import Environment, FileSystemLoader
335
336
 
336
337
  env = Environment(loader=FileSystemLoader('.'))
337
- template = env.get_template('ping.html')
338
+ template = env.get_template('ping.html')
339
+
340
+ with open('config.json', 'r') as f:
341
+ data = json.load(f)
342
+ terms_url = data['legals']['terms']
343
+ privacy_url = data['legals']['privacy_policy']
344
+ last_update = data['legals']['last_update']
345
+
338
346
 
339
347
  load_dotenv()
340
348
  host = os.getenv("HOST")
@@ -360,10 +368,10 @@ async def main():
360
368
 
361
369
  if txID == "{txID}":
362
370
 
363
- def render_html_template(client, ts, data, operation_id):
364
- return template.render(client=client, ts=ts, data=data, operation_id=operation_id)
371
+ def render_html_template(client, ts, data, operation_id, terms_url, privacy_url, last_update):
372
+ return template.render(client=client, ts=ts, data=data, operation_id=operation_id, terms_url=terms_url, privacy_url=privacy_url, last_update=last_update)
365
373
 
366
- html_content = render_html_template(client, ts, data, operation_id)
374
+ html_content = render_html_template(client, ts, data, operation_id, terms_url, privacy_url, last_update)
367
375
 
368
376
  data = {{
369
377
  "json": f"{{operation_id}} - Reply from {nodeID}: Pinged by {{client}} at {{ts}} with data: {{data}}",
@@ -550,6 +558,25 @@ asyncio.run(main())
550
558
  }});
551
559
  }});
552
560
  </script>
561
+
562
+ <div id="legal-banner" style="border-radius: 10px; margin: 15px; position: fixed; bottom: 0; left: 0; right: 0; background-color: #2a2a2a; color: #e0e0e0; padding: 16px; text-align: center; font-size: 14px; z-index: 9999; box-shadow: 0 -2px 10px rgba(0,0,0,0.5);">
563
+ By continuing, you agree to our
564
+ Terms (<span style="color: #8cafff;">{{{{terms_url}}}}</span>) &
565
+ Privacy Policy (<span style="color: #8cafff;">{{{{privacy_url}}}}</span>)
566
+ <br>
567
+ <button id="accept-legal" style="margin-top: 15px; margin-bottom: 15px; background: #01c07d; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer;">Accept</button>
568
+ <br>
569
+ Last Update: {{{{last_update}}}}
570
+ </div>
571
+
572
+ <script>
573
+ const banner = document.getElementById('legal-banner');
574
+ const acceptBtn = document.getElementById('accept-legal');
575
+ acceptBtn.addEventListener('click', () => {{
576
+ banner.remove();
577
+ }});
578
+ </script>
579
+
553
580
  </body>
554
581
  </html>
555
582
  """
@@ -572,8 +599,9 @@ f"""{{
572
599
  }}
573
600
  ],
574
601
  "legals": {{
575
- "terms_and_conditions": "https://neuronum.net/legals",
576
- "data_privacy": "https://neuronum.net/legals"
602
+ "terms": "https://url_to_your/terms",
603
+ "privacy_policy": "https://url_to_your/privacy_policy",
604
+ "last_update" : "DD/MM/YYYY"
577
605
  }}
578
606
  }}"""
579
607
  )
@@ -593,14 +621,6 @@ To ping this Node via the command-line interface, use the following command:
593
621
 
594
622
  ***
595
623
 
596
- ### 🌐 Via the Web
597
-
598
- You can also interact with this Node by simply visiting this URL in your web browser:
599
-
600
- [https://neuronum.net/tx/{txID}](https://neuronum.net/tx/{txID})
601
-
602
- ***
603
-
604
624
  ### 🐍 With Python
605
625
 
606
626
  For programmatic access, use the following Python code snippet. This script utilizes the `neuronum` library to activate the transaction and receive a response.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neuronum
3
- Version: 7.0.1
3
+ Version: 7.0.2
4
4
  Summary: Official client library to interact with the Neuronum Network
5
5
  Home-page: https://neuronum.net
6
6
  Author: Neuronum Cybernetics
@@ -139,12 +139,6 @@ neuronum start-node # start Node
139
139
  ------------------
140
140
 
141
141
  ### **Interact with Neuronum**
142
- #### **Web-based**
143
- 1. [Visit Neuronum](https://neuronum.net)
144
- 2. [Connect your Cell](https://neuronum.net/connect)
145
- 3. [Explore Transmitters](https://neuronum.net/explore)
146
- 4. Activate Transmitters
147
-
148
142
  #### **Code-based**
149
143
  ```python
150
144
  import asyncio
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='neuronum',
5
- version='7.0.1',
5
+ version='7.0.2',
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