naeural-client 2.5.5__py3-none-any.whl → 2.5.7__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.
- naeural_client/_ver.py +1 -1
- naeural_client/base/generic_session.py +4 -0
- naeural_client/cli/cli.py +23 -1
- naeural_client/cli/nodes.py +7 -3
- naeural_client/utils/config.py +4 -3
- {naeural_client-2.5.5.dist-info → naeural_client-2.5.7.dist-info}/METADATA +1 -1
- {naeural_client-2.5.5.dist-info → naeural_client-2.5.7.dist-info}/RECORD +10 -10
- {naeural_client-2.5.5.dist-info → naeural_client-2.5.7.dist-info}/WHEEL +0 -0
- {naeural_client-2.5.5.dist-info → naeural_client-2.5.7.dist-info}/entry_points.txt +0 -0
- {naeural_client-2.5.5.dist-info → naeural_client-2.5.7.dist-info}/licenses/LICENSE +0 -0
naeural_client/_ver.py
CHANGED
@@ -1853,6 +1853,10 @@ class GenericSession(BaseDecentrAIObject):
|
|
1853
1853
|
"""
|
1854
1854
|
Create a new web app on a list of nodes.
|
1855
1855
|
|
1856
|
+
IMPORTANT:
|
1857
|
+
The web app will be exposed using ngrok from multiple nodes that all will share the
|
1858
|
+
same edge label so the ngrok_edge_label is mandatory.
|
1859
|
+
|
1856
1860
|
Parameters
|
1857
1861
|
----------
|
1858
1862
|
|
naeural_client/cli/cli.py
CHANGED
@@ -6,6 +6,23 @@ from naeural_client.cli.cli_commands import CLI_COMMANDS
|
|
6
6
|
from naeural_client import version
|
7
7
|
import traceback
|
8
8
|
|
9
|
+
|
10
|
+
def create_global_parser():
|
11
|
+
"""
|
12
|
+
Creates a global argument parser with shared options like verbosity.
|
13
|
+
|
14
|
+
Returns
|
15
|
+
-------
|
16
|
+
argparse.ArgumentParser
|
17
|
+
Global argument parser.
|
18
|
+
"""
|
19
|
+
global_parser = argparse.ArgumentParser(add_help=False) # Prevent duplicate help
|
20
|
+
global_parser.add_argument(
|
21
|
+
"-v", "--verbose", action="store_true", help="Enable verbose output"
|
22
|
+
)
|
23
|
+
return global_parser
|
24
|
+
|
25
|
+
|
9
26
|
def build_parser():
|
10
27
|
"""
|
11
28
|
Dynamically builds the argument parser based on CLI_COMMANDS.
|
@@ -15,8 +32,10 @@ def build_parser():
|
|
15
32
|
argparse.ArgumentParser
|
16
33
|
Configured argument parser.
|
17
34
|
"""
|
35
|
+
global_parser = create_global_parser() # Add global parameters
|
36
|
+
|
18
37
|
title = f"nepctl v{version} - CLI for Naeural Edge Protocol SDK package"
|
19
|
-
parser = argparse.ArgumentParser(description=title)
|
38
|
+
parser = argparse.ArgumentParser(description=title, parents=[global_parser])
|
20
39
|
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
21
40
|
|
22
41
|
for command, subcommands in CLI_COMMANDS.items():
|
@@ -44,6 +63,9 @@ def build_parser():
|
|
44
63
|
#end for
|
45
64
|
#end if
|
46
65
|
subcommand_parser.set_defaults(func=subcmd_info["func"])
|
66
|
+
#end for
|
67
|
+
# Fallback help for `-h <subcommand>` like `nepctl -h config`
|
68
|
+
command_parser.set_defaults(func=lambda args: command_parser.print_help())
|
47
69
|
else:
|
48
70
|
# Single-level commands with parameters
|
49
71
|
if "params" in subcommands:
|
naeural_client/cli/nodes.py
CHANGED
@@ -10,8 +10,10 @@ def get_nodes(args):
|
|
10
10
|
3. Wait for the second net mon message via Session and show progress.
|
11
11
|
4. Get the active nodes union via Session and display the nodes marking those peered vs non-peered.
|
12
12
|
"""
|
13
|
+
if args.verbose:
|
14
|
+
log_with_color("Getting nodes...", color='b')
|
13
15
|
from naeural_client import Session
|
14
|
-
sess = Session(silent=
|
16
|
+
sess = Session(silent=not args.verbose)
|
15
17
|
if args.all:
|
16
18
|
df, supervisor = sess.get_network_known_nodes()
|
17
19
|
log_with_color(f"Network historical map as seen by <{supervisor}>:", color='b')
|
@@ -31,8 +33,10 @@ def get_supervisors(args):
|
|
31
33
|
"""
|
32
34
|
This function is used to get the information about the supervisors.
|
33
35
|
"""
|
34
|
-
|
35
|
-
|
36
|
+
if args.verbose:
|
37
|
+
log_with_color("Getting supervisors...", color='b')
|
38
|
+
from naeural_client import Session
|
39
|
+
sess = Session(silent=not args.verbose)
|
36
40
|
df, supervisor = sess.get_network_known_nodes(online_only=True, supervisors_only=True)
|
37
41
|
log_with_color(f"Supervisors reported by <{supervisor}>:\n{df}")
|
38
42
|
return
|
naeural_client/utils/config.py
CHANGED
@@ -55,7 +55,7 @@ def get_user_config_file():
|
|
55
55
|
"""
|
56
56
|
return get_user_folder() / "config"
|
57
57
|
|
58
|
-
def reset_config(
|
58
|
+
def reset_config(args, *larg, **kwargs):
|
59
59
|
"""
|
60
60
|
Resets the configuration by creating a ~/.naeural folder and populating
|
61
61
|
~/.naeural/config with values from a local .env file, if it exists.
|
@@ -88,7 +88,7 @@ def reset_config(*args, **kwargs):
|
|
88
88
|
log_with_color(f"Please UPDATE the configuration in the file {config_file}", color='b')
|
89
89
|
return
|
90
90
|
|
91
|
-
def show_address(
|
91
|
+
def show_address(args):
|
92
92
|
"""
|
93
93
|
Displays the current client address.
|
94
94
|
"""
|
@@ -99,7 +99,8 @@ def show_address(*args):
|
|
99
99
|
log_with_color(f"{sess.get_client_address()}", color='b')
|
100
100
|
return
|
101
101
|
|
102
|
-
|
102
|
+
|
103
|
+
def show_config(args):
|
103
104
|
"""
|
104
105
|
Displays the current configuration from ~/.naeural/config.
|
105
106
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: naeural_client
|
3
|
-
Version: 2.5.
|
3
|
+
Version: 2.5.7
|
4
4
|
Summary: `naeural_client` is the Python SDK required for client app development for the Naeural Edge Protocol Edge Protocol framework
|
5
5
|
Project-URL: Homepage, https://github.com/NaeuralEdgeProtocol/naeural_client
|
6
6
|
Project-URL: Bug Tracker, https://github.com/NaeuralEdgeProtocol/naeural_client/issues
|
@@ -1,10 +1,10 @@
|
|
1
1
|
naeural_client/__init__.py,sha256=GP8WSrn87sjTPO-QRNL2PG8JK5Mixbiea_HrtbG8RAQ,592
|
2
|
-
naeural_client/_ver.py,sha256=
|
2
|
+
naeural_client/_ver.py,sha256=jOQZvRuqptt966hnBzZbnuoTu3k1fouYmsXFZj-qrkE,330
|
3
3
|
naeural_client/base_decentra_object.py,sha256=C4iwZTkhKNBS4VHlJs5DfElRYLo4Q9l1V1DNVSk1fyQ,4412
|
4
4
|
naeural_client/plugins_manager_mixin.py,sha256=X1JdGLDz0gN1rPnTN_5mJXR8JmqoBFQISJXmPR9yvCo,11106
|
5
5
|
naeural_client/base/__init__.py,sha256=hACh83_cIv7-PwYMM3bQm2IBmNqiHw-3PAfDfAEKz9A,259
|
6
6
|
naeural_client/base/distributed_custom_code_presets.py,sha256=cvz5R88P6Z5V61Ce1vHVVh8bOkgXd6gve_vdESDNAsg,2544
|
7
|
-
naeural_client/base/generic_session.py,sha256=
|
7
|
+
naeural_client/base/generic_session.py,sha256=cM6mYBfc-PcTzjg8JQmgb2gPWQ_qN9FFJ2M80J35fJQ,85035
|
8
8
|
naeural_client/base/instance.py,sha256=kcZJmjLBtx8Bjj_ysIOx1JmLA-qSpG7E28j5rq6IYus,20444
|
9
9
|
naeural_client/base/pipeline.py,sha256=b4uNHrEIOlAtw4PGUx20dxwBhDck5__SrVXaHcSi8ZA,58251
|
10
10
|
naeural_client/base/plugin_template.py,sha256=qGaXByd_JZFpjvH9GXNbT7KaitRxIJB6-1IhbKrZjq4,138123
|
@@ -20,9 +20,9 @@ naeural_client/bc/ec.py,sha256=mWjodWCRgC3omVXOA9jtNdtPVNn2kMKV3Dcjt9oFUCQ,22974
|
|
20
20
|
naeural_client/certs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
21
|
naeural_client/certs/r9092118.ala.eu-central-1.emqxsl.com.crt,sha256=y-6io0tseyx9-a4Pmde1z1gPULtJNSYUpG_YFkYaMKU,1337
|
22
22
|
naeural_client/cli/README.md,sha256=WPdI_EjzAbUW1aPyj1sSR8rLydcJKZtoiaEtklQrjHo,74
|
23
|
-
naeural_client/cli/cli.py,sha256=
|
23
|
+
naeural_client/cli/cli.py,sha256=jSOXre7-Kx0ctoYc7iTSv0hKJKmIiCSUppJbjDrbox8,3553
|
24
24
|
naeural_client/cli/cli_commands.py,sha256=_oPGZ4nq24qNmXHknkYO8Hb2-SSCRgsR5L_Ac-7dxsM,1316
|
25
|
-
naeural_client/cli/nodes.py,sha256=
|
25
|
+
naeural_client/cli/nodes.py,sha256=gmc-9ETnSB3eSX_lPv3XkZ1jM1aUFsQzInwqCqUY_bQ,2155
|
26
26
|
naeural_client/code_cheker/__init__.py,sha256=pwkdeZGVL16ZA4Qf2mRahEhoOvKhL7FyuQbMFLr1E5M,33
|
27
27
|
naeural_client/code_cheker/base.py,sha256=lT5DRIFO5rqzsMNCmdMRfkAeevmezozehyfgmhnKpuI,19074
|
28
28
|
naeural_client/code_cheker/checker.py,sha256=QWupeM7ToancVIq1tRUxRNUrI8B5l5eoY0kDU4-O5aE,7365
|
@@ -79,10 +79,10 @@ naeural_client/logging/tzlocal/win32.py,sha256=zBoj0vFVrGhnCm_f7xmYzGym4-fV-4Ij2
|
|
79
79
|
naeural_client/logging/tzlocal/windows_tz.py,sha256=Sv9okktjZJfRGGUOOppsvQuX_eXyXUxkSKCAFmWT9Hw,34203
|
80
80
|
naeural_client/utils/__init__.py,sha256=mAnke3-MeRzz3nhQvhuHqLnpaaCSmDxicd7Ck9uwpmI,77
|
81
81
|
naeural_client/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,1072
|
82
|
-
naeural_client/utils/config.py,sha256=
|
82
|
+
naeural_client/utils/config.py,sha256=Ltagd1qI3EpqwhAVVpTXAWoVlO8ca8hKVk5cmAQBV9k,4563
|
83
83
|
naeural_client/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
|
84
|
-
naeural_client-2.5.
|
85
|
-
naeural_client-2.5.
|
86
|
-
naeural_client-2.5.
|
87
|
-
naeural_client-2.5.
|
88
|
-
naeural_client-2.5.
|
84
|
+
naeural_client-2.5.7.dist-info/METADATA,sha256=H9c1FxCBno3sc89FdawdgEoVH7fsBZKZYYCUioUIbFQ,14493
|
85
|
+
naeural_client-2.5.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
86
|
+
naeural_client-2.5.7.dist-info/entry_points.txt,sha256=PNdyotDaQBAslZREx5luVyj0kqpQnwNACwkFNTPIHU4,55
|
87
|
+
naeural_client-2.5.7.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
|
88
|
+
naeural_client-2.5.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|