remotivelabs-cli 0.0.38__tar.gz → 0.0.40__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.
Files changed (54) hide show
  1. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/PKG-INFO +1 -1
  2. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/brokers.py +3 -1
  3. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/export.py +2 -1
  4. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/files.py +2 -1
  5. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/licenses.py +3 -1
  6. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/playback.py +2 -1
  7. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/record.py +2 -1
  8. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/scripting.py +2 -1
  9. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/signals.py +6 -4
  10. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/auth/cmd.py +2 -3
  11. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/auth_tokens.py +2 -1
  12. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/brokers.py +3 -1
  13. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/cloud_cli.py +2 -1
  14. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/configs.py +3 -1
  15. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/organisations.py +2 -3
  16. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/projects.py +3 -1
  17. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/recordings.py +2 -1
  18. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/recordings_playback.py +2 -1
  19. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/sample_recordings.py +3 -1
  20. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/service_account_tokens.py +2 -1
  21. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/service_accounts.py +3 -1
  22. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/storage/cmd.py +2 -1
  23. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/connect/connect.py +2 -1
  24. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/remotive.py +2 -1
  25. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/settings/cmd.py +2 -1
  26. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/tools/can/can.py +3 -1
  27. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/tools/tools.py +2 -2
  28. remotivelabs_cli-0.0.40/cli/typer/__init__.py +0 -0
  29. remotivelabs_cli-0.0.40/cli/typer/typer_utils.py +8 -0
  30. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/pyproject.toml +1 -1
  31. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/LICENSE +0 -0
  32. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/README.md +0 -0
  33. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/__init__.py +0 -0
  34. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/lib/__about__.py +0 -0
  35. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/lib/broker.py +0 -0
  36. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/broker/license_flows.py +0 -0
  37. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/__init__.py +0 -0
  38. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/auth/__init__.py +0 -0
  39. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/auth/login.py +0 -0
  40. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/rest_helper.py +0 -0
  41. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/resumable_upload.py +0 -0
  42. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/storage/__init__.py +0 -0
  43. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/storage/copy.py +0 -0
  44. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/storage/uri_or_path.py +0 -0
  45. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/cloud/uri.py +0 -0
  46. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/connect/__init__.py +0 -0
  47. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/connect/protopie/protopie.py +0 -0
  48. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/errors.py +0 -0
  49. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/settings/__init__.py +0 -0
  50. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/settings/core.py +0 -0
  51. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/settings/token_file.py +0 -0
  52. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/tools/__init__.py +0 -0
  53. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/tools/can/RemotiveLabs.can1.log +0 -0
  54. {remotivelabs_cli-0.0.38 → remotivelabs_cli-0.0.40}/cli/tools/can/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: remotivelabs-cli
3
- Version: 0.0.38
3
+ Version: 0.0.40
4
4
  Summary: CLI for operating RemotiveCloud and RemotiveBroker
5
5
  Author: Johan Rask
6
6
  Author-email: johan.rask@remotivelabs.com
@@ -11,9 +11,11 @@ from zeroconf import (
11
11
  Zeroconf,
12
12
  )
13
13
 
14
+ from cli.typer import typer_utils
15
+
14
16
  from . import export, files, licenses, playback, record, scripting, signals
15
17
 
16
- app = typer.Typer(rich_markup_mode="rich")
18
+ app = typer_utils.create_typer(rich_markup_mode="rich")
17
19
 
18
20
 
19
21
  @app.callback()
@@ -9,9 +9,10 @@ import typer
9
9
 
10
10
  from cli.errors import ErrorPrinter
11
11
 
12
+ from ..typer import typer_utils
12
13
  from .lib.broker import Broker, SubscribableSignal
13
14
 
14
- app = typer.Typer(
15
+ app = typer_utils.create_typer(
15
16
  rich_markup_mode="rich",
16
17
  help="""
17
18
  Export subscribed signals to different formats, currently only InfluxDB line protocol
@@ -8,10 +8,11 @@ import typer
8
8
  from rich.progress import Progress, SpinnerColumn, TextColumn
9
9
 
10
10
  from cli.errors import ErrorPrinter
11
+ from cli.typer import typer_utils
11
12
 
12
13
  from .lib.broker import Broker
13
14
 
14
- app = typer.Typer(help=help) # type: ignore
15
+ app = typer_utils.create_typer(help=help)
15
16
 
16
17
 
17
18
  @app.command()
@@ -5,9 +5,11 @@ from enum import Enum
5
5
  import typer
6
6
  from rich import print_json
7
7
 
8
+ from cli.typer import typer_utils
9
+
8
10
  from .license_flows import LicenseFlow
9
11
 
10
- app = typer.Typer()
12
+ app = typer_utils.create_typer()
11
13
 
12
14
  help_text = """
13
15
  More info on our docs page
@@ -6,10 +6,11 @@ import grpc
6
6
  import typer
7
7
 
8
8
  from cli.errors import ErrorPrinter
9
+ from cli.typer import typer_utils
9
10
 
10
11
  from .lib.broker import Broker
11
12
 
12
- app = typer.Typer(help=help) # type: ignore
13
+ app = typer_utils.create_typer(help=help)
13
14
 
14
15
 
15
16
  def recording_and_namespace(recording: str) -> Dict[str, str]:
@@ -6,10 +6,11 @@ import grpc
6
6
  import typer
7
7
 
8
8
  from cli.errors import ErrorPrinter
9
+ from cli.typer import typer_utils
9
10
 
10
11
  from .lib.broker import Broker
11
12
 
12
- app = typer.Typer(help=help) # type: ignore
13
+ app = typer_utils.create_typer(help=help)
13
14
 
14
15
 
15
16
  @app.command()
@@ -7,8 +7,9 @@ import typer
7
7
  from rich import print as rich_print
8
8
 
9
9
  from cli.errors import ErrorPrinter
10
+ from cli.typer import typer_utils
10
11
 
11
- app = typer.Typer(
12
+ app = typer_utils.create_typer(
12
13
  rich_markup_mode="rich",
13
14
  help="""
14
15
  [Experimental] - Generate template lua script for input and output signals
@@ -14,11 +14,13 @@ import typer
14
14
  from rich import print as rich_rprint
15
15
 
16
16
  from cli.errors import ErrorPrinter
17
+ from cli.typer import typer_utils
17
18
 
18
19
  from .lib.broker import Broker, SubscribableSignal
19
20
 
20
- app = typer.Typer(help=help) # type: ignore
21
+ app = typer_utils.create_typer(help=help)
21
22
 
23
+ DEFAULT_GRPC_URL = "http://localhost:50051"
22
24
 
23
25
  # signal_values:list = list()
24
26
 
@@ -33,7 +35,7 @@ signal_values: Dict[Any, Any] = {}
33
35
 
34
36
  @app.command(name="list")
35
37
  def list_signals(
36
- url: str = typer.Option(..., help="Broker URL", envvar="REMOTIVE_BROKER_URL"),
38
+ url: str = typer.Option(DEFAULT_GRPC_URL, help="Broker URL", envvar="REMOTIVE_BROKER_URL"),
37
39
  api_key: str = typer.Option(None, help="Cloud Broker API-KEY or access token", envvar="REMOTIVE_BROKER_API_KEY"),
38
40
  name_starts_with: Union[str, None] = typer.Option(None, help="Signal name prefix to include"),
39
41
  name_ends_with: Union[str, None] = typer.Option(None, help="Signal name suffix to include"),
@@ -63,7 +65,7 @@ def read_scripted_code_file(file_path: Path) -> bytes:
63
65
 
64
66
  @app.command()
65
67
  def subscribe( # noqa: C901
66
- url: str = typer.Option(..., help="Broker URL", envvar="REMOTIVE_BROKER_URL"),
68
+ url: str = typer.Option(DEFAULT_GRPC_URL, help="Broker URL", envvar="REMOTIVE_BROKER_URL"),
67
69
  api_key: str = typer.Option(None, help="Cloud Broker API-KEY or access token", envvar="REMOTIVE_BROKER_API_KEY"),
68
70
  signal: List[str] = typer.Option([], help="Signal names to subscribe to, mandatory when not using script"),
69
71
  script: Path = typer.Option(
@@ -186,7 +188,7 @@ def subscribe( # noqa: C901
186
188
 
187
189
  @app.command(help="List namespaces on broker")
188
190
  def namespaces(
189
- url: str = typer.Option(..., help="Broker URL", envvar="REMOTIVE_BROKER_URL"),
191
+ url: str = typer.Option(DEFAULT_GRPC_URL, help="Broker URL", envvar="REMOTIVE_BROKER_URL"),
190
192
  api_key: str = typer.Option(None, help="Cloud Broker API-KEY or access token", envvar="REMOTIVE_BROKER_API_KEY"),
191
193
  ) -> None:
192
194
  try:
@@ -1,18 +1,17 @@
1
1
  import sys
2
2
 
3
- import typer
4
-
5
3
  from cli.cloud.auth.login import login as do_login
6
4
  from cli.cloud.rest_helper import RestHelper as Rest
7
5
  from cli.errors import ErrorPrinter
8
6
  from cli.settings import TokenNotFoundError, settings
7
+ from cli.typer import typer_utils
9
8
 
10
9
  from .. import auth_tokens
11
10
 
12
11
  HELP = """
13
12
  Manage how you authenticate with our cloud platform
14
13
  """
15
- app = typer.Typer(help=HELP)
14
+ app = typer_utils.create_typer(help=HELP)
16
15
  app.add_typer(auth_tokens.app, name="tokens", help="Manage users personal access tokens")
17
16
 
18
17
 
@@ -1,10 +1,11 @@
1
1
  import typer
2
2
 
3
3
  from cli.settings import settings
4
+ from cli.typer import typer_utils
4
5
 
5
6
  from .rest_helper import RestHelper as Rest
6
7
 
7
- app = typer.Typer()
8
+ app = typer_utils.create_typer()
8
9
 
9
10
 
10
11
  # TODO: add add interactive flag to set target directory # pylint: disable=fixme
@@ -9,9 +9,11 @@ import requests
9
9
  import typer
10
10
  import websocket
11
11
 
12
+ from cli.typer import typer_utils
13
+
12
14
  from .rest_helper import RestHelper as Rest
13
15
 
14
- app = typer.Typer()
16
+ app = typer_utils.create_typer()
15
17
 
16
18
 
17
19
  @app.command("list", help="Lists brokers in project")
@@ -2,8 +2,9 @@ import typer
2
2
 
3
3
  from cli.cloud import auth, brokers, configs, organisations, projects, recordings, sample_recordings, service_accounts, storage
4
4
  from cli.cloud.rest_helper import RestHelper
5
+ from cli.typer import typer_utils
5
6
 
6
- app = typer.Typer()
7
+ app = typer_utils.create_typer()
7
8
 
8
9
 
9
10
  @app.command(help="List licenses for an organisation")
@@ -7,9 +7,11 @@ import requests
7
7
  import typer
8
8
  from rich.progress import Progress, SpinnerColumn, TextColumn
9
9
 
10
+ from cli.typer import typer_utils
11
+
10
12
  from .rest_helper import RestHelper as Rest
11
13
 
12
- app = typer.Typer()
14
+ app = typer_utils.create_typer()
13
15
 
14
16
 
15
17
  @app.command("list")
@@ -1,11 +1,10 @@
1
1
  import json
2
2
  import sys
3
3
 
4
- import typer
5
-
6
4
  from cli.cloud.rest_helper import RestHelper
5
+ from cli.typer import typer_utils
7
6
 
8
- app = typer.Typer()
7
+ app = typer_utils.create_typer()
9
8
 
10
9
 
11
10
  @app.command(name="list", help="List your available organisations")
@@ -2,9 +2,11 @@ import json
2
2
 
3
3
  import typer
4
4
 
5
+ from cli.typer import typer_utils
6
+
5
7
  from .rest_helper import RestHelper as Rest
6
8
 
7
- app = typer.Typer()
9
+ app = typer_utils.create_typer()
8
10
 
9
11
 
10
12
  @app.command(name="list", help="List your projects")
@@ -18,13 +18,14 @@ from typing_extensions import Annotated
18
18
 
19
19
  from cli.cloud.uri import URI
20
20
  from cli.errors import ErrorPrinter
21
+ from cli.typer import typer_utils
21
22
 
22
23
  from ..broker.lib.broker import Broker
23
24
  from .recordings_playback import app as playback_app
24
25
  from .rest_helper import RestHelper as Rest
25
26
  from .rest_helper import err_console
26
27
 
27
- app = typer.Typer()
28
+ app = typer_utils.create_typer()
28
29
  app.add_typer(playback_app, name="playback")
29
30
 
30
31
 
@@ -17,9 +17,10 @@ from rich.progress import Progress, SpinnerColumn, TextColumn
17
17
  from cli.errors import ErrorPrinter
18
18
 
19
19
  from ..broker.lib.broker import Broker, SubscribableSignal
20
+ from ..typer import typer_utils
20
21
  from .rest_helper import RestHelper as Rest
21
22
 
22
- app = typer.Typer(
23
+ app = typer_utils.create_typer(
23
24
  help="""
24
25
  Support for playback of a recording on a cloud broker, make sure to always mount a recording first
25
26
  """
@@ -2,9 +2,11 @@ import json
2
2
 
3
3
  import typer
4
4
 
5
+ from cli.typer import typer_utils
6
+
5
7
  from .rest_helper import RestHelper as Rest
6
8
 
7
- app = typer.Typer()
9
+ app = typer_utils.create_typer()
8
10
 
9
11
 
10
12
  @app.command(name="import", help="Import sample recording into project")
@@ -3,10 +3,11 @@ import json
3
3
  import typer
4
4
 
5
5
  from cli.settings import settings
6
+ from cli.typer import typer_utils
6
7
 
7
8
  from .rest_helper import RestHelper as Rest
8
9
 
9
- app = typer.Typer()
10
+ app = typer_utils.create_typer()
10
11
 
11
12
 
12
13
  # TODO: add add interactive flag to set target directory # pylint: disable=fixme
@@ -5,10 +5,12 @@ from typing import List
5
5
 
6
6
  import typer
7
7
 
8
+ from cli.typer import typer_utils
9
+
8
10
  from . import service_account_tokens
9
11
  from .rest_helper import RestHelper as Rest
10
12
 
11
- app = typer.Typer()
13
+ app = typer_utils.create_typer()
12
14
 
13
15
 
14
16
  @app.command(name="list", help="List service-accounts")
@@ -9,6 +9,7 @@ from cli.cloud.storage.uri_or_path import UriOrPath
9
9
  from cli.cloud.storage.uri_or_path import uri as uri_parser
10
10
  from cli.cloud.uri import URI, InvalidURIError, JoinURIError
11
11
  from cli.errors import ErrorPrinter
12
+ from cli.typer import typer_utils
12
13
 
13
14
  HELP = """
14
15
  Manage files ([yellow]Beta feature not available for all customers[/yellow])
@@ -17,7 +18,7 @@ Copy file from local to remote storage and vice versa, list and delete files.
17
18
 
18
19
  """
19
20
 
20
- app = typer.Typer(rich_markup_mode="rich", help=HELP)
21
+ app = typer_utils.create_typer(rich_markup_mode="rich", help=HELP)
21
22
 
22
23
 
23
24
  @app.command(name="ls")
@@ -9,10 +9,11 @@ from typing_extensions import List
9
9
 
10
10
  from cli.broker.lib.broker import SubscribableSignal
11
11
  from cli.errors import ErrorPrinter
12
+ from cli.typer import typer_utils
12
13
 
13
14
  from .protopie import protopie as ppie
14
15
 
15
- app = typer.Typer()
16
+ app = typer_utils.create_typer()
16
17
 
17
18
 
18
19
  @app.command()
@@ -11,11 +11,12 @@ from .cloud.cloud_cli import app as cloud_app
11
11
  from .connect.connect import app as connect_app
12
12
  from .settings.cmd import app as settings_app
13
13
  from .tools.tools import app as tools_app
14
+ from .typer import typer_utils
14
15
 
15
16
  if os.getenv("GRPC_VERBOSITY") is None:
16
17
  os.environ["GRPC_VERBOSITY"] = "NONE"
17
18
 
18
- app = typer.Typer(
19
+ app = typer_utils.create_typer(
19
20
  rich_markup_mode="rich",
20
21
  help="""
21
22
  Welcome to RemotiveLabs CLI - Simplify and automate tasks for cloud resources and brokers
@@ -2,8 +2,9 @@ import typer
2
2
 
3
3
  from cli.errors import ErrorPrinter
4
4
  from cli.settings.core import TokenNotFoundError, settings
5
+ from cli.typer import typer_utils
5
6
 
6
- app = typer.Typer()
7
+ app = typer_utils.create_typer()
7
8
 
8
9
 
9
10
  @app.command()
@@ -4,6 +4,8 @@ import can
4
4
  import typer
5
5
  from rich.console import Console
6
6
 
7
+ from cli.typer import typer_utils
8
+
7
9
  err_console = Console(stderr=True)
8
10
  console = Console()
9
11
 
@@ -11,7 +13,7 @@ HELP = """
11
13
  CAN related tools
12
14
  """
13
15
 
14
- app = typer.Typer(help=HELP)
16
+ app = typer_utils.create_typer(help=HELP)
15
17
 
16
18
 
17
19
  @app.command("convert")
@@ -1,4 +1,4 @@
1
- import typer
1
+ from cli.typer import typer_utils
2
2
 
3
3
  from .can.can import app as can_app
4
4
 
@@ -6,5 +6,5 @@ HELP_TEXT = """
6
6
  CLI tools unrelated to cloud or broker
7
7
  """
8
8
 
9
- app = typer.Typer(help=HELP_TEXT)
9
+ app = typer_utils.create_typer(help=HELP_TEXT)
10
10
  app.add_typer(can_app, name="can", help="CAN tools")
File without changes
@@ -0,0 +1,8 @@
1
+ from typing import Any
2
+
3
+ import typer
4
+
5
+
6
+ def create_typer(**kwargs: Any) -> typer.Typer:
7
+ """Create a Typer instance with default settings."""
8
+ return typer.Typer(no_args_is_help=True, **kwargs)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "remotivelabs-cli"
3
- version = "0.0.38"
3
+ version = "0.0.40"
4
4
  description = "CLI for operating RemotiveCloud and RemotiveBroker"
5
5
  authors = ["Johan Rask <johan.rask@remotivelabs.com>"]
6
6
  readme = "README.md"