qbraid-cli 0.9.5__py3-none-any.whl → 0.9.6__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 qbraid-cli might be problematic. Click here for more details.

qbraid_cli/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.9.5'
16
- __version_tuple__ = version_tuple = (0, 9, 5)
15
+ __version__ = version = '0.9.6'
16
+ __version_tuple__ = version_tuple = (0, 9, 6)
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2024, qBraid Development Team
1
+ # Copyright (c) 2025, qBraid Development Team
2
2
  # All rights reserved.
3
3
 
4
4
  """
@@ -7,7 +7,9 @@ Module defining commands in the 'qbraid configure' namespace.
7
7
  """
8
8
 
9
9
  import typer
10
+ from rich import box
10
11
  from rich.console import Console
12
+ from rich.table import Table
11
13
 
12
14
  from qbraid_cli.configure.actions import default_action
13
15
 
@@ -36,7 +38,7 @@ def configure(ctx: typer.Context):
36
38
  def configure_set(
37
39
  name: str = typer.Argument(..., help="Config name"),
38
40
  value: str = typer.Argument(..., help="Config value"),
39
- profile: str = typer.Option("default", help="Profile name"),
41
+ profile: str = typer.Option("default", "--profile", "-p", help="Profile name"),
40
42
  ):
41
43
  """Set configuration value in qbraidrc file."""
42
44
  # pylint: disable-next=import-outside-toplevel
@@ -53,6 +55,62 @@ def configure_set(
53
55
  typer.echo("Configuration updated successfully.")
54
56
 
55
57
 
58
+ @configure_app.command(name="get")
59
+ def configure_get(
60
+ name: str = typer.Argument(..., help="Config name"),
61
+ profile: str = typer.Option("default", "--profile", "-p", help="Profile name"),
62
+ ):
63
+ """Get configuration value from qbraidrc file."""
64
+ # pylint: disable-next=import-outside-toplevel
65
+ from qbraid_core.config import load_config
66
+
67
+ config = load_config()
68
+
69
+ if profile not in config:
70
+ typer.echo(f"Profile '{profile}' not found in configuration.")
71
+ raise typer.Exit(1)
72
+
73
+ if name not in config[profile]:
74
+ typer.echo(f"Configuration '{name}' not found in profile '{profile}'.")
75
+ raise typer.Exit(1)
76
+
77
+ typer.echo(config[profile][name])
78
+
79
+
80
+ @configure_app.command(name="list")
81
+ def configure_list():
82
+ """List all configuration values in the default profile."""
83
+ # pylint: disable-next=import-outside-toplevel
84
+ from qbraid_core.config import load_config
85
+
86
+ config = load_config()
87
+ console = Console()
88
+ profile = "default"
89
+
90
+ if profile not in config:
91
+ typer.echo("Default profile not found in configuration.")
92
+ raise typer.Exit(1)
93
+
94
+ if not config[profile]:
95
+ typer.echo("No configuration values found in default profile.")
96
+ return
97
+
98
+ table = Table(show_edge=False, box=box.MINIMAL)
99
+ table.add_column("Name", style="cyan")
100
+ table.add_column("Value", style="green")
101
+
102
+ sensitive_keys = {"api-key", "refresh-token"}
103
+
104
+ for name, value in config[profile].items():
105
+ if name in sensitive_keys and value:
106
+ masked_value = f"*****{str(value)[-3:]}"
107
+ else:
108
+ masked_value = str(value)
109
+ table.add_row(name, masked_value)
110
+
111
+ console.print(table)
112
+
113
+
56
114
  @configure_app.command(name="magic")
57
115
  def configure_magic():
58
116
  """Enable qBraid IPython magic commands."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: qbraid-cli
3
- Version: 0.9.5
3
+ Version: 0.9.6
4
4
  Summary: Command Line Interface for interacting with all parts of the qBraid platform.
5
5
  Author-email: qBraid Development Team <contact@qbraid.com>
6
6
  License: Proprietary
@@ -1,5 +1,5 @@
1
1
  qbraid_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- qbraid_cli/_version.py,sha256=mGWHnd7vlgJDPI-PIRFkte_okQf1MI2ryZANxv7K9gY,411
2
+ qbraid_cli/_version.py,sha256=11ciOFzse5i9Y6lr7kosD6U2UdIm5Bsf7hdpK0Hg_2I,411
3
3
  qbraid_cli/exceptions.py,sha256=KjlhYJhSHMVazaNiBjD_Ur06w4sekP8zRsFzBdyIpno,672
4
4
  qbraid_cli/handlers.py,sha256=B9H1Qw6yx8izrqp9OGR2TgSJa_mxA8KLXUkX8LB7Feg,7650
5
5
  qbraid_cli/main.py,sha256=aSOQyoRRvKBJBcx8VtU4zKZ2WHvGKHhw8I-WiRwPxcE,3926
@@ -14,7 +14,7 @@ qbraid_cli/chat/__init__.py,sha256=NO41vndEdfr0vDynNcmHFh-nhzWjnWqGm4M9parikck,2
14
14
  qbraid_cli/chat/app.py,sha256=-YqCLGDh4ezF149xB3dfuUAQotKAklZwYp0BL3HhA90,2256
15
15
  qbraid_cli/configure/__init__.py,sha256=YaJ74Ztz2vl3eYp8_jVBucWkXscxz7EZEIzr70OfuOM,187
16
16
  qbraid_cli/configure/actions.py,sha256=-BduRmnxvf8JMNonb6VWFtdlHlcHPOPz3Bj5g8kfmBU,3197
17
- qbraid_cli/configure/app.py,sha256=1uRe2lkUA4TtYb5b4mbD4LH-cKCbsZGT3Wfk7fpNzX0,2414
17
+ qbraid_cli/configure/app.py,sha256=wNKOXi5GIuvVdp1G00IuOXVGvi-PpB31yaOu1bjinWQ,4175
18
18
  qbraid_cli/devices/__init__.py,sha256=hiScO-px6jCL5cJj5Hbty55EUfNejTO4bmqUZuS3aqc,181
19
19
  qbraid_cli/devices/app.py,sha256=q8AQ8o05JXODsaFR_16_S3UtLWPzwC2qi0bVw2h7RJ8,2543
20
20
  qbraid_cli/devices/validation.py,sha256=YhShyUufgrKnx2XjXOXF-PqFJYklJT9CgeqIwKcNam4,809
@@ -34,9 +34,9 @@ qbraid_cli/kernels/app.py,sha256=n-iyWJHy7_ML6qk4pp-v_rQkGA7WfnZMG8gyiCFGO1c,294
34
34
  qbraid_cli/pip/__init__.py,sha256=tJtU0rxn-ODogNh5Y4pp_BgDQXMN-3JY1QGj0OZHwjQ,169
35
35
  qbraid_cli/pip/app.py,sha256=jkk-djductrDOJIRYfHK_7WDJ12f0zOT3MMkiZp97oM,1365
36
36
  qbraid_cli/pip/hooks.py,sha256=jkIeev3cOd-cmaoJSdSqbmhTYCs6z1we84FMqa3ZoZw,2124
37
- qbraid_cli-0.9.5.dist-info/LICENSE,sha256=P1gi-ofB8lmkRt_mxDoJpcgQq9Ckq9WhRAS1oYk-G1s,2506
38
- qbraid_cli-0.9.5.dist-info/METADATA,sha256=P0tYf3s6ejBqycL7KIXrFuta3HbXGCsop9n0-YYJMVs,6806
39
- qbraid_cli-0.9.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
40
- qbraid_cli-0.9.5.dist-info/entry_points.txt,sha256=c5ZJ7NjbxhDqMpou9q5F03_b_KG34HzFDijIDmEIwgQ,47
41
- qbraid_cli-0.9.5.dist-info/top_level.txt,sha256=LTYJgeYSCHo9Il8vZu0yIPuGdGyNaIw6iRy6BeoZo8o,11
42
- qbraid_cli-0.9.5.dist-info/RECORD,,
37
+ qbraid_cli-0.9.6.dist-info/LICENSE,sha256=P1gi-ofB8lmkRt_mxDoJpcgQq9Ckq9WhRAS1oYk-G1s,2506
38
+ qbraid_cli-0.9.6.dist-info/METADATA,sha256=mlBLxNdmCCn-tU2KGErGI1JRcH5mM1A7Q_ZL8Ru8O20,6806
39
+ qbraid_cli-0.9.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
40
+ qbraid_cli-0.9.6.dist-info/entry_points.txt,sha256=c5ZJ7NjbxhDqMpou9q5F03_b_KG34HzFDijIDmEIwgQ,47
41
+ qbraid_cli-0.9.6.dist-info/top_level.txt,sha256=LTYJgeYSCHo9Il8vZu0yIPuGdGyNaIw6iRy6BeoZo8o,11
42
+ qbraid_cli-0.9.6.dist-info/RECORD,,