qbraid-cli 0.8.4b0__py3-none-any.whl → 0.8.5__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.8.4b0'
16
- __version_tuple__ = version_tuple = (0, 8, 4)
15
+ __version__ = version = '0.8.5'
16
+ __version_tuple__ = version_tuple = (0, 8, 5)
qbraid_cli/admin/app.py CHANGED
@@ -3,25 +3,21 @@
3
3
 
4
4
  """
5
5
  Module defining commands in the 'qbraid admin' namespace.
6
- """
7
-
8
- from typing import List
9
6
 
7
+ """
10
8
  import typer
11
9
 
12
- from qbraid_cli.admin.buildlogs import buildlogs_app
13
10
  from qbraid_cli.admin.headers import check_and_fix_headers
14
11
  from qbraid_cli.admin.validation import validate_header_type, validate_paths_exist
15
12
 
16
13
  admin_app = typer.Typer(
17
14
  help="CI/CD commands for qBraid maintainers.", pretty_exceptions_show_locals=False
18
15
  )
19
- admin_app.add_typer(buildlogs_app, name="buildlogs")
20
16
 
21
17
 
22
18
  @admin_app.command(name="headers")
23
19
  def admin_headers(
24
- src_paths: List[str] = typer.Argument(
20
+ src_paths: list[str] = typer.Argument(
25
21
  ..., help="Source file or directory paths to verify.", callback=validate_paths_exist
26
22
  ),
27
23
  header_type: str = typer.Option(
@@ -31,7 +27,7 @@ def admin_headers(
31
27
  help="Type of header to use ('default' or 'gpl').",
32
28
  callback=validate_header_type,
33
29
  ),
34
- skip_files: List[str] = typer.Option(
30
+ skip_files: list[str] = typer.Option(
35
31
  [], "--skip", "-s", help="Files to skip during verification.", callback=validate_paths_exist
36
32
  ),
37
33
  fix: bool = typer.Option(
@@ -6,7 +6,7 @@ Script to verify qBraid copyright file headers
6
6
 
7
7
  """
8
8
  import os
9
- from typing import List, Optional
9
+ from typing import Optional
10
10
 
11
11
  import typer
12
12
  from rich.console import Console
@@ -37,9 +37,9 @@ HEADER_TYPES = {
37
37
 
38
38
 
39
39
  def check_and_fix_headers(
40
- src_paths: List[str],
40
+ src_paths: list[str],
41
41
  header_type: str = "default",
42
- skip_files: Optional[List[str]] = None,
42
+ skip_files: Optional[list[str]] = None,
43
43
  fix: bool = False,
44
44
  ) -> None:
45
45
  """Script to add or verify qBraid copyright file headers"""
@@ -7,7 +7,6 @@ Module for validating command arguments for qBraid admin commands.
7
7
  """
8
8
 
9
9
  import os
10
- from typing import List
11
10
 
12
11
  import typer
13
12
 
@@ -21,7 +20,7 @@ def validate_header_type(value: str) -> str:
21
20
  return validate_item(value, header_types, "Header type")
22
21
 
23
22
 
24
- def validate_paths_exist(paths: List[str]) -> List[str]:
23
+ def validate_paths_exist(paths: list[str]) -> list[str]:
25
24
  """Verifies that each path in the provided list exists."""
26
25
  non_existent_paths = [path for path in paths if not os.path.exists(path)]
27
26
  if non_existent_paths:
@@ -9,7 +9,7 @@ Module defining actions invoked by 'qbraid configure' command(s).
9
9
  import configparser
10
10
  import re
11
11
  from copy import deepcopy
12
- from typing import Dict, Optional
12
+ from typing import Optional
13
13
 
14
14
  import typer
15
15
  from qbraid_core.config import (
@@ -53,7 +53,7 @@ def prompt_for_config(
53
53
  config: configparser.ConfigParser,
54
54
  section: str,
55
55
  key: str,
56
- default_values: Optional[Dict[str, str]] = None,
56
+ default_values: Optional[dict[str, str]] = None,
57
57
  ) -> str:
58
58
  """Prompt the user for a configuration setting, showing the current value as default."""
59
59
  default_values = default_values or {}
qbraid_cli/devices/app.py CHANGED
@@ -6,7 +6,7 @@ Module defining commands in the 'qbraid devices' namespace.
6
6
 
7
7
  """
8
8
 
9
- from typing import Any, Callable, Optional, Tuple
9
+ from typing import Any, Callable, Optional
10
10
 
11
11
  import typer
12
12
  from rich.console import Console
@@ -42,14 +42,14 @@ def devices_list( # pylint: disable=too-many-branches
42
42
  if provider:
43
43
  filters["provider"] = provider
44
44
 
45
- def import_devices() -> Tuple[Any, Callable]:
45
+ def import_devices() -> tuple[Any, Callable]:
46
46
  from qbraid_core.services.quantum import QuantumClient, process_device_data
47
47
 
48
48
  client = QuantumClient()
49
49
 
50
50
  return client, process_device_data
51
51
 
52
- result: Tuple[Callable, Callable] = run_progress_task(import_devices)
52
+ result: tuple[Callable, Callable] = run_progress_task(import_devices)
53
53
  client, process_device_data = result
54
54
  raw_data = client.search_devices(filters)
55
55
  device_data, msg = process_device_data(raw_data)
qbraid_cli/envs/app.py CHANGED
@@ -10,7 +10,7 @@ import shutil
10
10
  import subprocess
11
11
  import sys
12
12
  from pathlib import Path
13
- from typing import TYPE_CHECKING, Optional, Tuple
13
+ from typing import TYPE_CHECKING, Optional
14
14
 
15
15
  import typer
16
16
  from rich.console import Console
@@ -41,14 +41,14 @@ def envs_create( # pylint: disable=too-many-statements
41
41
  """Create a new qBraid environment."""
42
42
  env_description = description or ""
43
43
 
44
- def create_environment(*args, **kwargs) -> "Tuple[dict, EMC]":
44
+ def create_environment(*args, **kwargs) -> "tuple[dict, EMC]":
45
45
  """Create a qBraid environment."""
46
46
  from qbraid_core.services.environments.client import EnvironmentManagerClient
47
47
 
48
48
  client = EnvironmentManagerClient()
49
49
  return client.create_environment(*args, **kwargs), client
50
50
 
51
- def gather_local_data() -> Tuple[Path, str]:
51
+ def gather_local_data() -> tuple[Path, str]:
52
52
  """Gather environment data and return the slug."""
53
53
  from qbraid_core.services.environments import get_default_envs_paths
54
54
 
@@ -155,7 +155,7 @@ def envs_remove(
155
155
  emc = EnvironmentManagerClient()
156
156
  emc.delete_environment(slug)
157
157
 
158
- def gather_local_data(env_name: str) -> Tuple[Path, str]:
158
+ def gather_local_data(env_name: str) -> tuple[Path, str]:
159
159
  """Get environment path and slug from name (alias)."""
160
160
  installed, aliases = installed_envs_data()
161
161
  for alias, slug in aliases.items():
qbraid_cli/handlers.py CHANGED
@@ -10,7 +10,7 @@ and executing operations with progress tracking within the qBraid CLI.
10
10
  import os
11
11
  import traceback
12
12
  from pathlib import Path
13
- from typing import Any, Callable, List, Optional, Union
13
+ from typing import Any, Callable, Optional, Union
14
14
 
15
15
  import typer
16
16
  from rich.console import Console
@@ -136,13 +136,13 @@ def run_progress_task(
136
136
  return handle_error(message=custom_message)
137
137
 
138
138
 
139
- def _format_list_items(items: List[str]) -> str:
139
+ def _format_list_items(items: list[str]) -> str:
140
140
  """
141
141
  Formats a list of items as a string with values comma-separated and
142
142
  each item surrounded by single quotes
143
143
 
144
144
  Args:
145
- items (List[str]): The list of items to format.
145
+ items (list[str]): The list of items to format.
146
146
 
147
147
  Returns:
148
148
  str: The formatted string.
@@ -151,14 +151,14 @@ def _format_list_items(items: List[str]) -> str:
151
151
 
152
152
 
153
153
  def validate_item(
154
- value: Optional[str], allowed_items: List[str], item_type: str
154
+ value: Optional[str], allowed_items: list[str], item_type: str
155
155
  ) -> Union[str, None]:
156
156
  """
157
157
  Generic item validation function.
158
158
 
159
159
  Args:
160
160
  value (optional, str): The value to validate.
161
- allowed_items (List[str]): A list of allowed items.
161
+ allowed_items (list[str]): A list of allowed items.
162
162
  item_type (str): A description of the item type (e.g., 'provider', 'status', 'type') for
163
163
  error messages.
164
164
 
qbraid_cli/jobs/app.py CHANGED
@@ -5,7 +5,7 @@
5
5
  Module defining commands in the 'qbraid jobs' namespace.
6
6
 
7
7
  """
8
- from typing import Any, Callable, Dict, Tuple
8
+ from typing import Any, Callable
9
9
 
10
10
  import typer
11
11
  from rich.console import Console
@@ -66,7 +66,7 @@ def jobs_state(
66
66
  )
67
67
  ) -> None:
68
68
  """Display the state of qBraid Quantum Jobs for the current environment."""
69
- result: Tuple[str, Dict[str, Tuple[bool, bool]]] = run_progress_get_state(library)
69
+ result: tuple[str, dict[str, tuple[bool, bool]]] = run_progress_get_state(library)
70
70
  python_exe, state_values = result
71
71
  state_values = dict(sorted(state_values.items()))
72
72
 
@@ -75,16 +75,18 @@ def jobs_state(
75
75
  max_lib_length = max((len(lib) for lib in state_values.keys()), default=len(header_1))
76
76
  padding = max_lib_length + 9
77
77
 
78
- console.print(f"Executable: {python_exe}")
79
- console.print(f"\n{header_1:<{padding}}{header_2}", style="bold")
80
-
78
+ output = ""
81
79
  for lib, (installed, enabled) in state_values.items():
82
80
  state_str = (
83
81
  "[green]enabled"
84
82
  if enabled and installed
85
83
  else "[red]disabled" if installed else "[grey70]unavailable"
86
84
  )
87
- console.print(f"{lib:<{padding-1}}", state_str, end="\n")
85
+ output += f"{lib:<{padding-1}} {state_str}\n"
86
+
87
+ console.print(f"Executable: {python_exe}")
88
+ console.print(f"\n{header_1:<{padding}}{header_2}", style="bold")
89
+ console.print(output)
88
90
 
89
91
 
90
92
  @jobs_app.command(name="list")
@@ -95,14 +97,14 @@ def jobs_list(
95
97
  ) -> None:
96
98
  """List qBraid Quantum Jobs."""
97
99
 
98
- def import_jobs() -> Tuple[Any, Callable]:
100
+ def import_jobs() -> tuple[Any, Callable]:
99
101
  from qbraid_core.services.quantum import QuantumClient, process_job_data
100
102
 
101
103
  client = QuantumClient()
102
104
 
103
105
  return client, process_job_data
104
106
 
105
- result: Tuple[Any, Callable] = run_progress_task(import_jobs)
107
+ result: tuple[Any, Callable] = run_progress_task(import_jobs)
106
108
  client, process_job_data = result
107
109
  # https://github.com/qBraid/api/issues/644
108
110
  # raw_data = client.search_jobs(query={"numResults": limit})
@@ -5,13 +5,14 @@
5
5
  Module supporting 'qbraid jobs enable/disable braket' and commands.
6
6
 
7
7
  """
8
-
9
8
  import logging
10
9
  import os
10
+ import re
11
11
  import subprocess
12
12
  from pathlib import Path
13
- from typing import Optional, Tuple
13
+ from typing import Optional
14
14
 
15
+ import requests
15
16
  import typer
16
17
 
17
18
  from qbraid_cli.exceptions import QbraidException
@@ -21,14 +22,26 @@ logging.basicConfig(level=logging.INFO)
21
22
  logger = logging.getLogger(__name__)
22
23
 
23
24
 
24
- def get_package_data(package: str) -> Tuple[str, str, str, str]:
25
+ def fetch_botocore_version() -> Optional[str]:
26
+ """Fetch the latest version of the botocore package from the qBraid GitHub repository."""
27
+ url = "https://raw.githubusercontent.com/qBraid/botocore/develop/botocore/__init__.py"
28
+ response = requests.get(url, timeout=5)
29
+ if response.status_code == 200:
30
+ content = response.text
31
+ version_match = re.search(r"__version__\s*=\s*['\"]([^'\"]+)['\"]", content)
32
+ if version_match:
33
+ return version_match.group(1)
34
+ return None
35
+
36
+
37
+ def get_package_data(package: str) -> tuple[str, str, str, str]:
25
38
  """Retrieve package version and location data.
26
39
 
27
40
  Args:
28
41
  package (str): The name of the package to retrieve data for.
29
42
 
30
43
  Returns:
31
- Tuple[str, str, str, str]: The installed and latest versions of the package, and the
44
+ tuple[str, str, str, str]: The installed and latest versions of the package, and the
32
45
  local site-packages path where it is / would be installed.
33
46
 
34
47
  Raises:
@@ -45,7 +58,12 @@ def get_package_data(package: str) -> Tuple[str, str, str, str]:
45
58
  python_pathlib = get_active_python_path()
46
59
  site_packages_path = get_active_site_packages_path(python_path=python_pathlib)
47
60
  installed_version = get_local_package_version(package, python_path=python_pathlib)
48
- latest_version = get_latest_package_version(package)
61
+
62
+ latest_version = None
63
+ if package in ["botocore", "boto3"]:
64
+ latest_version = fetch_botocore_version()
65
+ latest_version = latest_version or get_latest_package_version(package)
66
+
49
67
  except QbraidSystemError as err:
50
68
  raise QbraidException("Failed to retrieve required system and/or package metadata") from err
51
69
 
@@ -56,7 +74,7 @@ def confirm_updates(
56
74
  mode: str,
57
75
  site_packages_path: str,
58
76
  installed_version: Optional[str] = None,
59
- latest_version: Optional[str] = None,
77
+ target_version: Optional[str] = None,
60
78
  ) -> None:
61
79
  """
62
80
  Prompts the user to proceed with enabling or disabling qBraid Quantum Jobs.
@@ -66,7 +84,7 @@ def confirm_updates(
66
84
  site_packages_path (str): The location of the site-packages directory where
67
85
  target package(s) will be updated.
68
86
  installed_version (optional, str): The installed version of the target package.
69
- latest_version (optional, str): The latest version of the target package available on PyPI.
87
+ target_version (optional, str): The latest version of the target package available on PyPI.
70
88
 
71
89
  Raises:
72
90
  ValueError: If an invalid mode is provided.
@@ -87,12 +105,12 @@ def confirm_updates(
87
105
  typer.echo(f"\n==> WARNING: {provider}/{core_package} package required <==")
88
106
  if (
89
107
  installed_version is not None
90
- and latest_version is not None
91
- and installed_version != latest_version
108
+ and target_version is not None
109
+ and installed_version != target_version
92
110
  ):
93
- typer.echo(f"==> WARNING: A newer version of {versioned_package} exists. <==")
111
+ typer.echo(f"==> WARNING: A different version of {versioned_package} is required. <==")
94
112
  typer.echo(f" current version: {installed_version}")
95
- typer.echo(f" latest version: {latest_version}")
113
+ typer.echo(f" target version: {target_version}")
96
114
 
97
115
  gerund = mode[:-2].capitalize() + "ing"
98
116
 
@@ -128,18 +146,18 @@ def aws_configure_dummy() -> None:
128
146
 
129
147
  def enable_braket(auto_confirm: bool = False):
130
148
  """Enable qBraid quantum jobs for Amazon Braket."""
131
- installed, latest, path, python_exe = run_progress_task(
149
+ installed, target, path, python_exe = run_progress_task(
132
150
  get_package_data, "boto3", description="Solving environment..."
133
151
  )
134
152
 
135
153
  if not auto_confirm:
136
- confirm_updates("enable", path, installed_version=installed, latest_version=latest)
154
+ confirm_updates("enable", path, installed_version=installed, target_version=target)
137
155
  typer.echo("")
138
156
 
139
157
  aws_configure_dummy() # TODO: possibly add another confirmation for writing aws config files
140
158
 
141
159
  try:
142
- subprocess.check_call([python_exe, "-m", "pip", "install", "--upgrade", "boto3"])
160
+ subprocess.check_call([python_exe, "-m", "pip", "install", f"boto3=={target}"])
143
161
  subprocess.check_call([python_exe, "-m", "pip", "uninstall", "botocore", "-y", "--quiet"])
144
162
  subprocess.check_call(
145
163
  [python_exe, "-m", "pip", "install", "git+https://github.com/qBraid/botocore.git"]
@@ -6,14 +6,14 @@ Module for validating command arguments for qBraid Quantum Jobs.
6
6
 
7
7
  """
8
8
  import sys
9
- from typing import Any, Callable, Dict, Optional, Tuple
9
+ from typing import Any, Callable, Optional
10
10
 
11
11
  import typer
12
12
  from rich.console import Console
13
13
 
14
14
  from qbraid_cli.handlers import handle_error, run_progress_task, validate_item
15
15
 
16
- LEGACY_ARGS: Dict[str, str] = {
16
+ LEGACY_ARGS: dict[str, str] = {
17
17
  "amazon_braket": "braket",
18
18
  "aws_braket": "braket",
19
19
  }
@@ -39,14 +39,14 @@ def validate_library(value: str) -> str:
39
39
  return validate_item(value, qjobs_libs, "Library")
40
40
 
41
41
 
42
- def get_state(library: Optional[str] = None) -> Tuple[str, Dict[str, Tuple[bool, bool]]]:
42
+ def get_state(library: Optional[str] = None) -> tuple[str, dict[str, tuple[bool, bool]]]:
43
43
  """Get the state of qBraid Quantum Jobs for the specified library."""
44
44
  from qbraid_core.services.quantum import QuantumClient
45
45
 
46
46
  jobs_state = QuantumClient.qbraid_jobs_state(device_lib=library)
47
47
 
48
48
  python_exe: str = jobs_state.get("exe", sys.executable)
49
- libs_state: Dict[str, Any] = jobs_state.get("libs", {})
49
+ libs_state: dict[str, Any] = jobs_state.get("libs", {})
50
50
 
51
51
  state_values = {
52
52
  lib: (state["supported"], state["enabled"]) for lib, state in libs_state.items()
@@ -57,7 +57,7 @@ def get_state(library: Optional[str] = None) -> Tuple[str, Dict[str, Tuple[bool,
57
57
 
58
58
  def run_progress_get_state(
59
59
  library: Optional[str] = None,
60
- ) -> Tuple[str, Dict[str, Tuple[bool, bool]]]:
60
+ ) -> tuple[str, dict[str, tuple[bool, bool]]]:
61
61
  """Run get state function with rich progress UI."""
62
62
  return run_progress_task(
63
63
  get_state,
qbraid_cli/pip/hooks.py CHANGED
@@ -36,7 +36,7 @@ def find_matching_prefix(python_executable: Path, path_list: list[Path]) -> Opti
36
36
 
37
37
  Args:
38
38
  python_executable (Path): The path to the Python executable.
39
- path_list (List[Path]): A list of paths to check against the Python executable path.
39
+ path_list (list[Path]): A list of paths to check against the Python executable path.
40
40
 
41
41
  Returns:
42
42
  Optional[Path]: The first matching path that is a prefix of the Python executable path,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qbraid-cli
3
- Version: 0.8.4b0
3
+ Version: 0.8.5
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
@@ -8,7 +8,6 @@ Project-URL: Homepage, https://docs.qbraid.com/cli/user-guide/overview
8
8
  Project-URL: Documentation, https://docs.qbraid.com/cli/api-reference/qbraid
9
9
  Project-URL: Bug Tracker, https://github.com/qBraid/community/issues
10
10
  Project-URL: Discord, https://discord.gg/KugF6Cnncm
11
- Project-URL: Launch on Lab, https://account.qbraid.com/?gitHubUrl=https://github.com/qBraid/.git
12
11
  Keywords: qbraid,cli,quantum,cloud
13
12
  Classifier: Development Status :: 5 - Production/Stable
14
13
  Classifier: Intended Audience :: Developers
@@ -27,17 +26,17 @@ Classifier: Programming Language :: Python :: 3.12
27
26
  Requires-Python: >=3.9
28
27
  Description-Content-Type: text/markdown
29
28
  License-File: LICENSE
30
- Requires-Dist: typer >=0.12.1
31
- Requires-Dist: rich >=10.11.0
32
- Requires-Dist: qbraid-core[environments] >=0.1.17b0
29
+ Requires-Dist: typer>=0.12.1
30
+ Requires-Dist: rich>=10.11.0
31
+ Requires-Dist: qbraid-core[environments]>=0.1.23
33
32
  Provides-Extra: dev
34
- Requires-Dist: ruff ; extra == 'dev'
35
- Requires-Dist: isort ; extra == 'dev'
36
- Requires-Dist: black ; extra == 'dev'
37
- Requires-Dist: pytest ; extra == 'dev'
38
- Requires-Dist: pytest-cov ; extra == 'dev'
33
+ Requires-Dist: ruff; extra == "dev"
34
+ Requires-Dist: isort; extra == "dev"
35
+ Requires-Dist: black; extra == "dev"
36
+ Requires-Dist: pytest; extra == "dev"
37
+ Requires-Dist: pytest-cov; extra == "dev"
39
38
  Provides-Extra: jobs
40
- Requires-Dist: amazon-braket-sdk >=1.48.1 ; extra == 'jobs'
39
+ Requires-Dist: amazon-braket-sdk>=1.48.1; extra == "jobs"
41
40
 
42
41
  <img width="full" alt="qbraid_cli" src="https://qbraid-static.s3.amazonaws.com/logos/qbraid-cli-banner.png">
43
42
 
@@ -1,39 +1,38 @@
1
1
  qbraid_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- qbraid_cli/_version.py,sha256=xxgvY5XfpaWOOXoAtSX7S4dbyMvWcDWbZ4UDV_0Nkto,413
2
+ qbraid_cli/_version.py,sha256=kTFCF-nxarUjJsdBGaHE-KQ5vwD07oUlc-DlqEskLt0,411
3
3
  qbraid_cli/exceptions.py,sha256=KjlhYJhSHMVazaNiBjD_Ur06w4sekP8zRsFzBdyIpno,672
4
- qbraid_cli/handlers.py,sha256=glxTEwxax3zKgYl9qsZ2evZXgrWQrseJS_OGyHTMFeA,7040
4
+ qbraid_cli/handlers.py,sha256=3RTG5FHL5GTyDoBUv81x5sLyqwf8nzkcqBi0k1ayoW8,7034
5
5
  qbraid_cli/main.py,sha256=AR6qp2hU_3OEg1_RxRSfZkO2ZC3H4z-dz3hzaqeAl-I,2620
6
6
  qbraid_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  qbraid_cli/admin/__init__.py,sha256=qcWD5mQEUCtr49mrUpZmk7eGDe0L_Gtc8RwZmzIXSwo,175
8
- qbraid_cli/admin/app.py,sha256=ZyTBkEvlAR-xK3fbC32yntsE3rywzL4WHjJzRTFTlzs,1454
9
- qbraid_cli/admin/buildlogs.py,sha256=1i7CRpkIHIcKgGvHesPr9duCkyV7M-MESaHI5Z3ZdD0,3578
10
- qbraid_cli/admin/headers.py,sha256=E6mE3odZL57VfHHZxYtRUkqMKmrmT4zuUoINzI7eJF8,6435
11
- qbraid_cli/admin/validation.py,sha256=LkAVXlHtM0MhCa34MIWrfX59wGXMVlZmdVB4-AQ8fBk,1003
8
+ qbraid_cli/admin/app.py,sha256=yaIghXQygv0rcS586LCpBsZJ-S2uHUyzi-79lXTgZvU,1323
9
+ qbraid_cli/admin/headers.py,sha256=xsx10Mq1SVpTMeef5HOdnXxxOo3Uj5l_k0yHiCWxQug,6429
10
+ qbraid_cli/admin/validation.py,sha256=U_8RFWBwRUNPe6LdjNpl-Yz8Br57PLWMoPbpR-jBS-M,979
12
11
  qbraid_cli/configure/__init__.py,sha256=YaJ74Ztz2vl3eYp8_jVBucWkXscxz7EZEIzr70OfuOM,187
13
- qbraid_cli/configure/actions.py,sha256=3rrWHaCAsogyx0Ll-lcjbSzldD4kPuz1z6VQiWebSWw,3203
12
+ qbraid_cli/configure/actions.py,sha256=-BduRmnxvf8JMNonb6VWFtdlHlcHPOPz3Bj5g8kfmBU,3197
14
13
  qbraid_cli/configure/app.py,sha256=1uRe2lkUA4TtYb5b4mbD4LH-cKCbsZGT3Wfk7fpNzX0,2414
15
14
  qbraid_cli/credits/__init__.py,sha256=MJhgWgpFT1_886sB-_POlRs1y3SRy23HIrKVBkp0X-Y,181
16
15
  qbraid_cli/credits/app.py,sha256=AY3qtveO50KeQ2XREiEVqUcTrESgRuoqt9pt2Z8t4Y0,866
17
16
  qbraid_cli/devices/__init__.py,sha256=hiScO-px6jCL5cJj5Hbty55EUfNejTO4bmqUZuS3aqc,181
18
- qbraid_cli/devices/app.py,sha256=zxSxrEQn7irkJoME4S_CBnRqWeB8cqPaBsIMfpdYFk0,2530
17
+ qbraid_cli/devices/app.py,sha256=3Ly5PPNVhipzbX2h3FrB3fWawLbUcQFcUqv_cZv5eYk,2523
19
18
  qbraid_cli/devices/validation.py,sha256=YhShyUufgrKnx2XjXOXF-PqFJYklJT9CgeqIwKcNam4,809
20
19
  qbraid_cli/envs/__init__.py,sha256=1-cMvrATsddYxcetPJWxq6bEOqJWMktGdhoZ4qm8euA,172
21
20
  qbraid_cli/envs/activate.py,sha256=VpvVYSfQDlcmlNWJOgkLIQ2p8YXPPLG8Jbl5t8GHUDw,2140
22
- qbraid_cli/envs/app.py,sha256=m1obCHrTqSPD8CF2v-jV7ZoCXdRyky1oZHl7NR2EAG4,8447
21
+ qbraid_cli/envs/app.py,sha256=kbSbZSnl09HI_VqfL5S07ozTvdBrHCOYO8i0msEn7xU,8440
23
22
  qbraid_cli/envs/create.py,sha256=xudzkLCNegY34zkXN_Vfl_0zVzg_tW83LcVx9quoWfU,988
24
23
  qbraid_cli/envs/data_handling.py,sha256=Ibnp2yJoUDpivb_sNqi0suYgJZNat_LmM6Ya0Ovez5s,1288
25
24
  qbraid_cli/jobs/__init__.py,sha256=qVLRHYIzP4XHpx_QWP_vCzd3LsCscCORaEx-Vcbx29U,172
26
- qbraid_cli/jobs/app.py,sha256=kmg9mYla3Nd7EdjQlFu7IOvm7sejLNfPPA6Qeet-IfE,4898
27
- qbraid_cli/jobs/toggle_braket.py,sha256=QVW69MkFyhMZWg_Cl48GgScC084aAG3EgYbyy-PGkqI,6756
28
- qbraid_cli/jobs/validation.py,sha256=xNbjUggMhUs4wzkuRm4PuFPi_wrElYicUgYXLznHz3U,2983
25
+ qbraid_cli/jobs/app.py,sha256=BOd3wPCf9gx3WMraZ0f7oDIjGTYhtwqUUimtjF5cUtk,4915
26
+ qbraid_cli/jobs/toggle_braket.py,sha256=fMw4SOGfNTuoMvMXzxUzVz02nCkYlUddlobv9vMLkhg,7445
27
+ qbraid_cli/jobs/validation.py,sha256=zMuBGsyx06GWTTgnmyousYYK-qx3IxYTwm0MkPkAWrc,2970
29
28
  qbraid_cli/kernels/__init__.py,sha256=jORS9vV17s5laQyq8gSVB18EPBImgEIbMZ1wKC094DA,181
30
29
  qbraid_cli/kernels/app.py,sha256=FedFpQBvK-5Fk7PTGskCHz0l8zIb7E7ex8M6UzobfKA,2923
31
30
  qbraid_cli/pip/__init__.py,sha256=tJtU0rxn-ODogNh5Y4pp_BgDQXMN-3JY1QGj0OZHwjQ,169
32
31
  qbraid_cli/pip/app.py,sha256=Cer_Tteo_k26bTNiLUX2k-XhdSU3wKuj9ZLubbGv7r4,1439
33
- qbraid_cli/pip/hooks.py,sha256=KuDHmntPXVK8tSb4MLk9VANhL-eINswhLd8_g_25WMY,2123
34
- qbraid_cli-0.8.4b0.dist-info/LICENSE,sha256=P1gi-ofB8lmkRt_mxDoJpcgQq9Ckq9WhRAS1oYk-G1s,2506
35
- qbraid_cli-0.8.4b0.dist-info/METADATA,sha256=OmDmDS-Lm0cKnkwjGWFp2AdItNeXsFeSQWdWYKi-dyk,6816
36
- qbraid_cli-0.8.4b0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
37
- qbraid_cli-0.8.4b0.dist-info/entry_points.txt,sha256=c5ZJ7NjbxhDqMpou9q5F03_b_KG34HzFDijIDmEIwgQ,47
38
- qbraid_cli-0.8.4b0.dist-info/top_level.txt,sha256=LTYJgeYSCHo9Il8vZu0yIPuGdGyNaIw6iRy6BeoZo8o,11
39
- qbraid_cli-0.8.4b0.dist-info/RECORD,,
32
+ qbraid_cli/pip/hooks.py,sha256=7LeK-vUbM_car_RPxKxQKx3Jb5mOe7SOGEcJjoGp45s,2123
33
+ qbraid_cli-0.8.5.dist-info/LICENSE,sha256=P1gi-ofB8lmkRt_mxDoJpcgQq9Ckq9WhRAS1oYk-G1s,2506
34
+ qbraid_cli-0.8.5.dist-info/METADATA,sha256=LZ7WYtncI1c0T_ztxhgrWCWPEvvBTVlJ2_E4w45a3Q8,6705
35
+ qbraid_cli-0.8.5.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
36
+ qbraid_cli-0.8.5.dist-info/entry_points.txt,sha256=c5ZJ7NjbxhDqMpou9q5F03_b_KG34HzFDijIDmEIwgQ,47
37
+ qbraid_cli-0.8.5.dist-info/top_level.txt,sha256=LTYJgeYSCHo9Il8vZu0yIPuGdGyNaIw6iRy6BeoZo8o,11
38
+ qbraid_cli-0.8.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.2.0)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,114 +0,0 @@
1
- # Copyright (c) 2024, qBraid Development Team
2
- # All rights reserved.
3
-
4
- """
5
- Module defining commands in the 'qbraid admin buildlogs' namespace.
6
-
7
- This module uses the Typer library to create CLI commands for managing Docker builds and logs
8
- in an administrative context.
9
- """
10
-
11
- import json
12
-
13
- import typer
14
- from qbraid_core.exceptions import RequestsApiError
15
- from qbraid_core.services.admin.client import AdminClient
16
- from rich.console import Console
17
-
18
- from qbraid_cli.handlers import handle_error
19
-
20
- buildlogs_app = typer.Typer(
21
- help="Manage qBraid containerized services logs.", pretty_exceptions_show_locals=False
22
- )
23
- console = Console()
24
-
25
-
26
- @buildlogs_app.command(name="get")
27
- def get_docker_build_logs(
28
- build_id: str = typer.Option(None, "--build_id", "-b", help="Name of the build ID")
29
- ) -> None:
30
- """
31
- Fetches and displays Docker build logs for a specified build ID.
32
-
33
- Args:
34
- build_id (str, optional): The unique identifier for the Docker build.
35
-
36
- This function queries the administrative backend to retrieve and display build logs.
37
- If a build ID is provided, it will retrieve and display logs specific to that build ID.
38
- If build ID not provided, fetches all logs.
39
- """
40
- client = AdminClient()
41
-
42
- build_log = client.get_docker_build_logs(build_id)
43
- if build_id and "buildLogs" in build_log and build_log["buildLogs"]:
44
- log_entry = build_log["buildLogs"][0]
45
- console.print(log_entry)
46
- else:
47
- console.print(build_log)
48
-
49
-
50
- @buildlogs_app.command(name="post")
51
- def post_docker_build_log(
52
- data: str = typer.Option(..., "--data", "-d", help="Data to post to Docker logs")
53
- ) -> None:
54
- """
55
- Posts a new Docker build log entry.
56
-
57
- Args:
58
- data (str): JSON string containing the data to be logged.
59
-
60
- This command converts a JSON string into a dictionary and sends it to the backend service
61
- to create a new Docker build log.
62
- """
63
- client = AdminClient()
64
-
65
- try:
66
- data_dict = json.loads(data)
67
- console.print(client.post_docker_build_logs(data_dict))
68
- except RequestsApiError:
69
- handle_error(message="Couldn't post a build_log.")
70
-
71
-
72
- @buildlogs_app.command(name="put")
73
- def put_docker_build_log(
74
- build_id: str = typer.Option(..., "--build_id", "-b", help="Name of the build ID"),
75
- data: str = typer.Option(..., "--data", "-d", help="Data to post to Docker logs"),
76
- ) -> None:
77
- """
78
- Updates an existing Docker build log entry by a given build ID.
79
-
80
- Args:
81
- build_id (str): The unique identifier of the Docker build to update.
82
- data (str): JSON string containing the updated data for the log.
83
-
84
- This command updates a Docker build log entry, identified by the provided build ID,
85
- with the new data provided in JSON format.
86
- """
87
- client = AdminClient()
88
-
89
- try:
90
- data_dict = json.loads(data)
91
- console.print(client.put_docker_build_logs(build_id, data_dict))
92
- except RequestsApiError:
93
- handle_error(message="Couldn't post a build_log.")
94
-
95
-
96
- @buildlogs_app.command(name="delete")
97
- def delete_docker_build_log(
98
- build_id: str = typer.Option(..., "--build_id", "-b", help="ID of the build log to delete")
99
- ) -> None:
100
- """
101
- Deletes a Docker build log entry by a specified build ID.
102
-
103
- Args:
104
- build_id (str): The unique identifier of the Docker build log to delete.
105
-
106
- This command sends a request to delete a Docker build log identified by the provided build ID.
107
- """
108
- client = AdminClient()
109
-
110
- console.print(client.delete_docker_build_logs(build_id))
111
-
112
-
113
- if __name__ == "__main__":
114
- buildlogs_app()