qbraid-cli 0.8.0.dev0__py3-none-any.whl → 0.9.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 +2 -2
- qbraid_cli/account/__init__.py +11 -0
- qbraid_cli/account/app.py +65 -0
- qbraid_cli/admin/__init__.py +11 -0
- qbraid_cli/admin/app.py +59 -0
- qbraid_cli/admin/headers.py +235 -0
- qbraid_cli/admin/validation.py +32 -0
- qbraid_cli/chat/__init__.py +11 -0
- qbraid_cli/chat/app.py +76 -0
- qbraid_cli/configure/__init__.py +6 -1
- qbraid_cli/configure/actions.py +111 -0
- qbraid_cli/configure/app.py +34 -109
- qbraid_cli/devices/__init__.py +6 -1
- qbraid_cli/devices/app.py +43 -35
- qbraid_cli/devices/validation.py +26 -0
- qbraid_cli/envs/__init__.py +6 -1
- qbraid_cli/envs/activate.py +8 -5
- qbraid_cli/envs/app.py +215 -131
- qbraid_cli/envs/create.py +14 -120
- qbraid_cli/envs/data_handling.py +46 -0
- qbraid_cli/exceptions.py +3 -0
- qbraid_cli/files/__init__.py +11 -0
- qbraid_cli/files/app.py +118 -0
- qbraid_cli/handlers.py +47 -13
- qbraid_cli/jobs/__init__.py +6 -1
- qbraid_cli/jobs/app.py +84 -97
- qbraid_cli/jobs/toggle_braket.py +68 -74
- qbraid_cli/jobs/validation.py +94 -0
- qbraid_cli/kernels/__init__.py +6 -1
- qbraid_cli/kernels/app.py +81 -11
- qbraid_cli/main.py +66 -14
- qbraid_cli/pip/__init__.py +11 -0
- qbraid_cli/pip/app.py +50 -0
- qbraid_cli/pip/hooks.py +74 -0
- qbraid_cli/py.typed +0 -0
- qbraid_cli-0.9.5.dist-info/LICENSE +41 -0
- qbraid_cli-0.9.5.dist-info/METADATA +179 -0
- qbraid_cli-0.9.5.dist-info/RECORD +42 -0
- {qbraid_cli-0.8.0.dev0.dist-info → qbraid_cli-0.9.5.dist-info}/WHEEL +1 -1
- qbraid_cli/credits/__init__.py +0 -6
- qbraid_cli/credits/app.py +0 -30
- qbraid_cli-0.8.0.dev0.dist-info/METADATA +0 -124
- qbraid_cli-0.8.0.dev0.dist-info/RECORD +0 -25
- {qbraid_cli-0.8.0.dev0.dist-info → qbraid_cli-0.9.5.dist-info}/entry_points.txt +0 -0
- {qbraid_cli-0.8.0.dev0.dist-info → qbraid_cli-0.9.5.dist-info}/top_level.txt +0 -0
qbraid_cli/pip/hooks.py
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Copyright (c) 2024, qBraid Development Team
|
|
2
|
+
# All rights reserved.
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
Module defining pre- and post-command hooks for the 'qbraid pip' namespace.
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import sys
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from typing import Optional, Union
|
|
12
|
+
|
|
13
|
+
from qbraid_core.services.environments import get_default_envs_paths
|
|
14
|
+
from qbraid_core.system.executables import python_paths_equivalent
|
|
15
|
+
from qbraid_core.system.packages import (
|
|
16
|
+
extract_include_sys_site_pkgs_value,
|
|
17
|
+
set_include_sys_site_pkgs_value,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def safe_set_include_sys_packages(value: bool, file_path: Optional[Union[str, Path]]) -> None:
|
|
22
|
+
"""Set include-system-site-packages value safely"""
|
|
23
|
+
if not file_path:
|
|
24
|
+
return None
|
|
25
|
+
|
|
26
|
+
try:
|
|
27
|
+
set_include_sys_site_pkgs_value(value, file_path)
|
|
28
|
+
except Exception: # pylint: disable=broad-exception-caught
|
|
29
|
+
pass
|
|
30
|
+
|
|
31
|
+
return None
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def find_matching_prefix(python_executable: Path, path_list: list[Path]) -> Optional[Path]:
|
|
35
|
+
"""
|
|
36
|
+
Finds and returns the first path in the list that is a prefix of the Python executable path.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
python_executable (Path): The path to the Python executable.
|
|
40
|
+
path_list (list[Path]): A list of paths to check against the Python executable path.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
Optional[Path]: The first matching path that is a prefix of the Python executable path,
|
|
44
|
+
or None if no match is found.
|
|
45
|
+
"""
|
|
46
|
+
python_executable_str = str(python_executable.resolve())
|
|
47
|
+
for path in path_list:
|
|
48
|
+
if python_executable_str.startswith(str(path.resolve())):
|
|
49
|
+
return path
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def get_env_cfg_path(python_exe: Path) -> Optional[Path]:
|
|
54
|
+
"""Get the path to the pyvenv.cfg file."""
|
|
55
|
+
is_sys_python = python_paths_equivalent(python_exe, sys.executable)
|
|
56
|
+
|
|
57
|
+
if is_sys_python:
|
|
58
|
+
return None
|
|
59
|
+
|
|
60
|
+
all_envs_paths = get_default_envs_paths()
|
|
61
|
+
|
|
62
|
+
env_path = find_matching_prefix(python_exe, all_envs_paths)
|
|
63
|
+
|
|
64
|
+
if not env_path:
|
|
65
|
+
return None
|
|
66
|
+
|
|
67
|
+
cfg_path = env_path / "pyvenv.cfg"
|
|
68
|
+
|
|
69
|
+
should_flip = extract_include_sys_site_pkgs_value(cfg_path)
|
|
70
|
+
|
|
71
|
+
if should_flip:
|
|
72
|
+
return cfg_path
|
|
73
|
+
|
|
74
|
+
return None
|
qbraid_cli/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
qBraid Closed-Source Software License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, qBraid Development Team
|
|
4
|
+
|
|
5
|
+
All rights reserved.
|
|
6
|
+
|
|
7
|
+
This license agreement ("License") is between the qBraid Development Team ("Author") and you, the Licensee. By using or distributing the qBraid ("Software"), you agree to the following terms:
|
|
8
|
+
|
|
9
|
+
1. Grant of License.
|
|
10
|
+
|
|
11
|
+
Subject to the terms of this License, the Author grants you a non-exclusive, non-transferable license to use the Software for personal, academic, and educational purposes. Use of the Software for commercial purposes is strictly prohibited unless express permission is granted by the Author.
|
|
12
|
+
|
|
13
|
+
2. Distribution.
|
|
14
|
+
|
|
15
|
+
You may distribute the Software to others, provided that any such distribution is made under the same terms of this License. Modifications to the Software may not be distributed.
|
|
16
|
+
|
|
17
|
+
3. Modification.
|
|
18
|
+
|
|
19
|
+
You are permitted to modify the Software for personal use. You may contribute improvements or bug fixes back to the Author or the community, but you may not distribute the modifications.
|
|
20
|
+
|
|
21
|
+
4. Commercial Use.
|
|
22
|
+
|
|
23
|
+
The Software may not be used for commercial purposes without explicit, prior written permission from the Author. Permissions for commercial use will be considered on a case-by-case basis.
|
|
24
|
+
|
|
25
|
+
5. Attribution
|
|
26
|
+
|
|
27
|
+
If the Software is used in a non-private setting, including but not limited to academic work, commercial settings, or published literature, attribution must be given to the "qBraid Jupyter Environment Manager authored by the qBraid Development Team."
|
|
28
|
+
|
|
29
|
+
6. Disclaimer of Warranty.
|
|
30
|
+
|
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
32
|
+
|
|
33
|
+
7. Limitation of Liability.
|
|
34
|
+
|
|
35
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
36
|
+
|
|
37
|
+
8. Termination.
|
|
38
|
+
|
|
39
|
+
This License is effective until terminated. Your rights under this License will terminate automatically without notice from the Author if you fail to comply with any term(s) of this License.
|
|
40
|
+
|
|
41
|
+
By using the Software, you agree to be bound by the terms of this License. Redistribution of the Software or use of the Software other than as specifically authorized under this License is prohibited and may result in severe civil and criminal penalties.
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: qbraid-cli
|
|
3
|
+
Version: 0.9.5
|
|
4
|
+
Summary: Command Line Interface for interacting with all parts of the qBraid platform.
|
|
5
|
+
Author-email: qBraid Development Team <contact@qbraid.com>
|
|
6
|
+
License: Proprietary
|
|
7
|
+
Project-URL: Homepage, https://docs.qbraid.com/cli/user-guide/overview
|
|
8
|
+
Project-URL: Documentation, https://docs.qbraid.com/cli/api-reference/qbraid
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/qBraid/community/issues
|
|
10
|
+
Project-URL: Discord, https://discord.gg/KugF6Cnncm
|
|
11
|
+
Keywords: qbraid,cli,quantum,cloud
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Natural Language :: English
|
|
15
|
+
Classifier: License :: Other/Proprietary License
|
|
16
|
+
Classifier: Intended Audience :: System Administrators
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
19
|
+
Classifier: Programming Language :: Python
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
27
|
+
Requires-Python: >=3.9
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: typer>=0.12.1
|
|
31
|
+
Requires-Dist: rich>=10.11.0
|
|
32
|
+
Requires-Dist: click
|
|
33
|
+
Requires-Dist: qbraid-core>=0.1.33
|
|
34
|
+
Provides-Extra: jobs
|
|
35
|
+
Requires-Dist: amazon-braket-sdk>=1.48.1; extra == "jobs"
|
|
36
|
+
Provides-Extra: envs
|
|
37
|
+
Requires-Dist: qbraid-core[environments]; extra == "envs"
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: isort; extra == "dev"
|
|
40
|
+
Requires-Dist: black; extra == "dev"
|
|
41
|
+
Requires-Dist: pytest; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
43
|
+
|
|
44
|
+
<img width="full" alt="qbraid_cli" src="https://qbraid-static.s3.amazonaws.com/logos/qbraid-cli-banner.png">
|
|
45
|
+
|
|
46
|
+
[](https://docs.qbraid.com/cli/user-guide/overview)
|
|
47
|
+
[](https://pypi.org/project/qbraid-cli/)
|
|
48
|
+
[](https://pypi.org/project/qbraid-cli/)
|
|
49
|
+
[](https://pepy.tech/project/qbraid-cli)
|
|
50
|
+
[](https://github.com/qBraid/community/issues)
|
|
51
|
+
[](https://stackoverflow.com/questions/tagged/qbraid)
|
|
52
|
+
|
|
53
|
+
Command Line Interface for interacting with all parts of the qBraid platform.
|
|
54
|
+
|
|
55
|
+
The **qBraid CLI** is a versatile command-line interface tool designed for seamless interaction with qBraid cloud services and quantum software management tools. Initially exclusive to the [qBraid Lab](https://docs.qbraid.com/lab/user-guide/overview) platform, the CLI now supports local installations as well. This enhancement broadens access to features like [qBraid Quantum Jobs](https://docs.qbraid.com/cli/user-guide/quantum-jobs), enabling direct acess to QPU devices from leading providers like IonQ, Oxford Quantum Circuits, QuEra, Rigetti, and IQM, as well as on-demand simulators from qBraid and AWS, all using qBraid [credits](https://docs.qbraid.com/home/pricing), with no additional access keys required.
|
|
56
|
+
|
|
57
|
+
## Getting Started
|
|
58
|
+
|
|
59
|
+
The qBraid-CLI comes pre-installed and pre-configured in qBraid Lab:
|
|
60
|
+
|
|
61
|
+
- [Launch qBraid Lab →](https://lab.qbraid.com/)
|
|
62
|
+
- [Make an account →](https://account.qbraid.com/)
|
|
63
|
+
|
|
64
|
+
For help, see qBraid Lab User Guide: [Getting Started](https://docs.qbraid.com/lab/user-guide/getting-started).
|
|
65
|
+
|
|
66
|
+
You can also install the qBraid-CLI from PyPI with:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install qbraid-cli
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Local configuration
|
|
73
|
+
|
|
74
|
+
After installation, you must configure your account credentials to use the CLI locally:
|
|
75
|
+
|
|
76
|
+
1. Create a qBraid account or log in to your existing account by visiting
|
|
77
|
+
[account.qbraid.com](https://account.qbraid.com/)
|
|
78
|
+
2. Copy your API Key token from the left side of
|
|
79
|
+
your [account page](https://account.qbraid.com/):
|
|
80
|
+
3. Save your API key from step 2 in local configuration file `~/.qbraid/qbraidrc` using:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
$ qbraid configure
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Basic Commands
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
$ qbraid
|
|
90
|
+
----------------------------------
|
|
91
|
+
* Welcome to the qBraid CLI! *
|
|
92
|
+
----------------------------------
|
|
93
|
+
|
|
94
|
+
____ _ _
|
|
95
|
+
__ _| __ ) _ __ __ _(_) __| |
|
|
96
|
+
/ _` | _ \| '__/ _` | |/ _` |
|
|
97
|
+
| (_| | |_) | | | (_| | | (_| |
|
|
98
|
+
\__,_|____/|_| \__,_|_|\__,_|
|
|
99
|
+
|_|
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
- Use 'qbraid --help' to see available commands.
|
|
103
|
+
|
|
104
|
+
- Use 'qbraid --version' to see the current version.
|
|
105
|
+
|
|
106
|
+
Reference Docs: https://docs.qbraid.com/cli/api-reference/qbraid
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
A qBraid CLI command has the following structure:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
$ qbraid <command> <subcommand> [options and parameters]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
For example, to list installed environments, the command would be:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
$ qbraid envs list
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
To view help documentation, use one of the following:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
$ qbraid --help
|
|
125
|
+
$ qbraid <command> --help
|
|
126
|
+
$ qbraid <command> <subcommand> --help
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
For example:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
$ qbraid --help
|
|
133
|
+
|
|
134
|
+
Usage: qbraid [OPTIONS] COMMAND [ARGS]...
|
|
135
|
+
|
|
136
|
+
The qBraid CLI.
|
|
137
|
+
|
|
138
|
+
Options
|
|
139
|
+
--version Show the version and exit.
|
|
140
|
+
--install-completion Install completion for the current shell.
|
|
141
|
+
--show-completion Show completion for the current shell, to copy it or customize the installation.
|
|
142
|
+
--help Show this message and exit.
|
|
143
|
+
|
|
144
|
+
Commands
|
|
145
|
+
configure Configure qBraid CLI options.
|
|
146
|
+
account Manage qBraid account.
|
|
147
|
+
devices Manage qBraid quantum devices.
|
|
148
|
+
envs Manage qBraid environments.
|
|
149
|
+
jobs Manage qBraid quantum jobs.
|
|
150
|
+
kernels Manage qBraid kernels.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
To get the version of the qBraid CLI:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
$ qbraid --version
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Magic Commands
|
|
160
|
+
|
|
161
|
+
You can also access the CLI directly from within [Notebooks](https://docs.qbraid.com/lab/user-guide/notebooks) using IPython [magic commands](https://ipython.readthedocs.io/en/stable/interactive/magics.html). First, configure the qBraid magic commands extension using:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
$ qbraid configure magic
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The above command can also be executed from within a Jupyter notebook using the ``!`` operator. Then, from within a notebook cell, load the qBraid magic IPython extension using:
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
In [1]: %load_ext qbraid_magic
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Now you can continue to use the qBraid-CLI as normal from within your Jupyter notebook using the magic ``%`` operator, e.g.
|
|
174
|
+
|
|
175
|
+
```python
|
|
176
|
+
In [2]: %qbraid jobs state
|
|
177
|
+
|
|
178
|
+
In [3]: %qbraid jobs enable braket -y
|
|
179
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
qbraid_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
qbraid_cli/_version.py,sha256=mGWHnd7vlgJDPI-PIRFkte_okQf1MI2ryZANxv7K9gY,411
|
|
3
|
+
qbraid_cli/exceptions.py,sha256=KjlhYJhSHMVazaNiBjD_Ur06w4sekP8zRsFzBdyIpno,672
|
|
4
|
+
qbraid_cli/handlers.py,sha256=B9H1Qw6yx8izrqp9OGR2TgSJa_mxA8KLXUkX8LB7Feg,7650
|
|
5
|
+
qbraid_cli/main.py,sha256=aSOQyoRRvKBJBcx8VtU4zKZ2WHvGKHhw8I-WiRwPxcE,3926
|
|
6
|
+
qbraid_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
qbraid_cli/account/__init__.py,sha256=smlpUcVkM3QEbJG0norGM7i71XBJlUGQYByswTfPnmg,181
|
|
8
|
+
qbraid_cli/account/app.py,sha256=1UogauwgX0Hnr7H6cBV2Qv-lT6aRpRLAimCyLi0afGI,1843
|
|
9
|
+
qbraid_cli/admin/__init__.py,sha256=qcWD5mQEUCtr49mrUpZmk7eGDe0L_Gtc8RwZmzIXSwo,175
|
|
10
|
+
qbraid_cli/admin/app.py,sha256=V2mgts3x3Vgsx_nbRwVrKF9PgZ9SuA10b8O9cjiphYE,1607
|
|
11
|
+
qbraid_cli/admin/headers.py,sha256=OCZ690_rjJy8ppH4ogHjiQwHWJTcPnJT0KyIT0h6hkE,7732
|
|
12
|
+
qbraid_cli/admin/validation.py,sha256=U_8RFWBwRUNPe6LdjNpl-Yz8Br57PLWMoPbpR-jBS-M,979
|
|
13
|
+
qbraid_cli/chat/__init__.py,sha256=NO41vndEdfr0vDynNcmHFh-nhzWjnWqGm4M9parikck,258
|
|
14
|
+
qbraid_cli/chat/app.py,sha256=-YqCLGDh4ezF149xB3dfuUAQotKAklZwYp0BL3HhA90,2256
|
|
15
|
+
qbraid_cli/configure/__init__.py,sha256=YaJ74Ztz2vl3eYp8_jVBucWkXscxz7EZEIzr70OfuOM,187
|
|
16
|
+
qbraid_cli/configure/actions.py,sha256=-BduRmnxvf8JMNonb6VWFtdlHlcHPOPz3Bj5g8kfmBU,3197
|
|
17
|
+
qbraid_cli/configure/app.py,sha256=1uRe2lkUA4TtYb5b4mbD4LH-cKCbsZGT3Wfk7fpNzX0,2414
|
|
18
|
+
qbraid_cli/devices/__init__.py,sha256=hiScO-px6jCL5cJj5Hbty55EUfNejTO4bmqUZuS3aqc,181
|
|
19
|
+
qbraid_cli/devices/app.py,sha256=q8AQ8o05JXODsaFR_16_S3UtLWPzwC2qi0bVw2h7RJ8,2543
|
|
20
|
+
qbraid_cli/devices/validation.py,sha256=YhShyUufgrKnx2XjXOXF-PqFJYklJT9CgeqIwKcNam4,809
|
|
21
|
+
qbraid_cli/envs/__init__.py,sha256=1-cMvrATsddYxcetPJWxq6bEOqJWMktGdhoZ4qm8euA,172
|
|
22
|
+
qbraid_cli/envs/activate.py,sha256=VpvVYSfQDlcmlNWJOgkLIQ2p8YXPPLG8Jbl5t8GHUDw,2140
|
|
23
|
+
qbraid_cli/envs/app.py,sha256=c3O5fB6PThCXS2hyYMHrj8YvvEJaI-_8NZd_GN_4iZ0,9972
|
|
24
|
+
qbraid_cli/envs/create.py,sha256=xudzkLCNegY34zkXN_Vfl_0zVzg_tW83LcVx9quoWfU,988
|
|
25
|
+
qbraid_cli/envs/data_handling.py,sha256=Ibnp2yJoUDpivb_sNqi0suYgJZNat_LmM6Ya0Ovez5s,1288
|
|
26
|
+
qbraid_cli/files/__init__.py,sha256=3_yhgFoNcviEtS6B75uJBrfFFUjsrMcccCNEntJ54xU,175
|
|
27
|
+
qbraid_cli/files/app.py,sha256=PoJAyfd1Y2OJm9wKNjbnzbouVOmOnrYeLWforOSFwgA,3182
|
|
28
|
+
qbraid_cli/jobs/__init__.py,sha256=qVLRHYIzP4XHpx_QWP_vCzd3LsCscCORaEx-Vcbx29U,172
|
|
29
|
+
qbraid_cli/jobs/app.py,sha256=LnrxALu7OWSUg1FD6FvlGsILdoH46Y-ra12eiSfiMlE,4938
|
|
30
|
+
qbraid_cli/jobs/toggle_braket.py,sha256=3AEu-Z5q4avduB-fJMyMTVTuyZXuA8m-hnvi325wIv4,7444
|
|
31
|
+
qbraid_cli/jobs/validation.py,sha256=KlkqVH1-vlNCHSayEpxzyXU86_TMN5prGfMFEoyBsFs,2971
|
|
32
|
+
qbraid_cli/kernels/__init__.py,sha256=jORS9vV17s5laQyq8gSVB18EPBImgEIbMZ1wKC094DA,181
|
|
33
|
+
qbraid_cli/kernels/app.py,sha256=n-iyWJHy7_ML6qk4pp-v_rQkGA7WfnZMG8gyiCFGO1c,2948
|
|
34
|
+
qbraid_cli/pip/__init__.py,sha256=tJtU0rxn-ODogNh5Y4pp_BgDQXMN-3JY1QGj0OZHwjQ,169
|
|
35
|
+
qbraid_cli/pip/app.py,sha256=jkk-djductrDOJIRYfHK_7WDJ12f0zOT3MMkiZp97oM,1365
|
|
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,,
|
qbraid_cli/credits/__init__.py
DELETED
qbraid_cli/credits/app.py
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Module defining commands in the 'qbraid credits' namespace.
|
|
3
|
-
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
import typer
|
|
7
|
-
|
|
8
|
-
from qbraid_cli.handlers import run_progress_task
|
|
9
|
-
|
|
10
|
-
app = typer.Typer(help="Manage qBraid credits.")
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@app.command(name="value")
|
|
14
|
-
def credits_value():
|
|
15
|
-
"""Get number of qBraid credits remaining."""
|
|
16
|
-
|
|
17
|
-
def get_credits() -> int:
|
|
18
|
-
from qbraid.api import QbraidSession
|
|
19
|
-
|
|
20
|
-
session = QbraidSession()
|
|
21
|
-
res = session.get("/billing/credits/get-user-credits").json()
|
|
22
|
-
return res["qbraidCredits"]
|
|
23
|
-
|
|
24
|
-
qbraid_credits: int = run_progress_task(get_credits)
|
|
25
|
-
credits_text = typer.style(str(qbraid_credits), fg=typer.colors.GREEN, bold=True)
|
|
26
|
-
typer.secho(f"\nqBraid credits: {credits_text}")
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if __name__ == "__main__":
|
|
30
|
-
app()
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: qbraid-cli
|
|
3
|
-
Version: 0.8.0.dev0
|
|
4
|
-
Summary: Command Line Interface for interacting with all parts of the qBraid platform.
|
|
5
|
-
Author-email: qBraid Development Team <contact@qbraid.com>
|
|
6
|
-
License: Proprietary
|
|
7
|
-
Project-URL: Homepage, https://www.qbraid.com/
|
|
8
|
-
Project-URL: Documentation, https://docs.qbraid.com/projects/cli/en/latest/cli/qbraid.html
|
|
9
|
-
Project-URL: Bug Tracker, https://github.com/qBraid/qBraid-Lab/issues
|
|
10
|
-
Project-URL: Discord, https://discord.gg/KugF6Cnncm
|
|
11
|
-
Project-URL: Launch on Lab, https://account.qbraid.com/?gitHubUrl=https://github.com/qBraid/qBraid-Lab.git
|
|
12
|
-
Keywords: qbraid,cli,quantum,cloud
|
|
13
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: Intended Audience :: System Administrators
|
|
16
|
-
Classifier: Natural Language :: English
|
|
17
|
-
Classifier: Operating System :: POSIX
|
|
18
|
-
Classifier: Programming Language :: Python
|
|
19
|
-
Classifier: Programming Language :: Python :: 3
|
|
20
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
-
Requires-Python: >=3.9
|
|
26
|
-
Description-Content-Type: text/markdown
|
|
27
|
-
Requires-Dist: typer[all]
|
|
28
|
-
Requires-Dist: rich
|
|
29
|
-
Requires-Dist: requests
|
|
30
|
-
Requires-Dist: jupyter-client
|
|
31
|
-
Requires-Dist: qbraid ==0.5.1
|
|
32
|
-
Provides-Extra: dev
|
|
33
|
-
Requires-Dist: black ; extra == 'dev'
|
|
34
|
-
Requires-Dist: isort ; extra == 'dev'
|
|
35
|
-
Requires-Dist: pylint ; extra == 'dev'
|
|
36
|
-
Provides-Extra: docs
|
|
37
|
-
Requires-Dist: sphinx ~=5.3.0 ; extra == 'docs'
|
|
38
|
-
Requires-Dist: sphinx-rtd-theme ~=1.3.0 ; extra == 'docs'
|
|
39
|
-
Requires-Dist: docutils ~=0.18.1 ; extra == 'docs'
|
|
40
|
-
Provides-Extra: jobs
|
|
41
|
-
Requires-Dist: amazon-braket-sdk >=1.48.1 ; extra == 'jobs'
|
|
42
|
-
|
|
43
|
-
<img width="full" alt="qbraid_cli" src="https://qbraid-static.s3.amazonaws.com/logos/qbraid-cli-banner.png">
|
|
44
|
-
|
|
45
|
-
[](https://docs.qbraid.com/projects/cli/en/latest/cli/qbraid.html)
|
|
46
|
-
[](https://pypi.org/project/qbraid-cli/)
|
|
47
|
-
[](https://github.com/qBraid/qBraid-Lab/issues)
|
|
48
|
-
[](https://discord.gg/TPBU2sa8Et)
|
|
49
|
-
|
|
50
|
-
Command Line Interface for interacting with all parts of the qBraid platform.
|
|
51
|
-
|
|
52
|
-
The **qBraid CLI** is a specialized command-line interface tool designed *exclusively* for use within the [qBraid Lab](https://docs.qbraid.com/projects/lab/en/latest/lab/overview.html) platform. It is not intended for local installations or use outside the qBraid Lab environment. This tool ensures seamless integration and optimized performance specifically tailored for qBraid Lab's unique cloud-based quantum computing ecosystem.
|
|
53
|
-
|
|
54
|
-
## Getting Started
|
|
55
|
-
|
|
56
|
-
To use the qBraid CLI, login to qBraid (or create an account), launch Lab, and then open Terminal. You can also access the CLI directly from within [Notebooks](https://docs.qbraid.com/projects/lab/en/latest/lab/notebooks.html) using the ``!`` operator. See [quantum jobs example](https://github.com/qBraid/qbraid-lab-demo/blob/045c7a8fbdcae66a7e64533dd9fe0e981dc02cf4/qbraid_lab/quantum_jobs/aws_quantum_jobs.ipynb).
|
|
57
|
-
|
|
58
|
-
- [Launch qBraid Lab →](https://lab.qbraid.com/)
|
|
59
|
-
- [Make an account →](https://account.qbraid.com/)
|
|
60
|
-
|
|
61
|
-
For help, see qBraid Lab User Guide: [Getting Started](https://docs.qbraid.com/projects/lab/en/latest/lab/getting_started.html).
|
|
62
|
-
|
|
63
|
-
## Basic Commands
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
$ qbraid
|
|
67
|
-
-------------------------------
|
|
68
|
-
* Welcome to the qBraid CLI! *
|
|
69
|
-
-------------------------------
|
|
70
|
-
|
|
71
|
-
- Use `qbraid -h` to see available commands.
|
|
72
|
-
|
|
73
|
-
- Use `qbraid --version` to display the current version.
|
|
74
|
-
|
|
75
|
-
Reference Docs: https://docs.qbraid.com/projects/cli/en/latest/cli/qbraid.html
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
A qBraid CLI command has the following structure:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
$ qbraid <command> <subcommand> [options and parameters]
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
For example, to list installed environments, the command would be:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
$ qbraid envs list
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
To view help documentation, use one of the following:
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
$ qbraid help
|
|
94
|
-
$ qbraid <command> help
|
|
95
|
-
$ qbraid <command> <subcommand> help
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
For example:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
$ qbraid help
|
|
102
|
-
|
|
103
|
-
Group
|
|
104
|
-
qbraid
|
|
105
|
-
|
|
106
|
-
Subgroups
|
|
107
|
-
envs : Manage qBraid environments.
|
|
108
|
-
kernels : Manage qBraid kernels.
|
|
109
|
-
jobs : Manage qBraid Quantum Jobs.
|
|
110
|
-
|
|
111
|
-
Arguments
|
|
112
|
-
-V, --version : Show version and exit
|
|
113
|
-
|
|
114
|
-
Global Arguments
|
|
115
|
-
-h, --help : Show this help message and exit.
|
|
116
|
-
|
|
117
|
-
Reference Docs: https://docs.qbraid.com/en/latest/cli/qbraid.html
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
To get the version of the qBraid CLI:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
$ qbraid --version
|
|
124
|
-
```
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
qbraid_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
qbraid_cli/_version.py,sha256=T2k5pV0A7nP-1Gk3UNOvSV7kyW5LPzvLPoMH541MgG4,424
|
|
3
|
-
qbraid_cli/exceptions.py,sha256=DBYxsO5rywFdjy-S_46gJ9B91H3hw4SLpR6kXr2wG58,602
|
|
4
|
-
qbraid_cli/handlers.py,sha256=KM06TrgsQ2iIS3CEewh23lw1AS_QjHTqhGDgKjFepDU,6234
|
|
5
|
-
qbraid_cli/main.py,sha256=njcwwgOAT3-hmb2M8XiyodHG1GlIjbzEbrRC7PdF_rE,2234
|
|
6
|
-
qbraid_cli/configure/__init__.py,sha256=YhkIlsmZl0j1cIV8BMOarfMvZ99iwlTEG08UQoXz3P8,78
|
|
7
|
-
qbraid_cli/configure/app.py,sha256=EQgbZ2mHfQmqAQpDss-Xx-Npy_Uri5En4gAPMkAeoxk,4925
|
|
8
|
-
qbraid_cli/credits/__init__.py,sha256=0aN2OWG8cobDlLqa_LoM1I6ateOHLJHmFLVqiGNv19c,76
|
|
9
|
-
qbraid_cli/credits/app.py,sha256=i6FGzq9KHqykfi5rtHOsDs3Sbx5FzKcEit0gR9ggldQ,737
|
|
10
|
-
qbraid_cli/devices/__init__.py,sha256=w7DYe_FQij4bOU01VNV6vH_p-yjtrlfvbP5ctdSLvkE,76
|
|
11
|
-
qbraid_cli/devices/app.py,sha256=jhasrMr750G3PnINmqa7jwCwgRSg1-yLvF6b07i_V6w,2125
|
|
12
|
-
qbraid_cli/envs/__init__.py,sha256=_w-W4bV-rEmiA0qgYYGeGMupd7lDVwvkjebubk7dmsw,73
|
|
13
|
-
qbraid_cli/envs/activate.py,sha256=50w_RLS8H2-RXv9mzv-bRU6CfwsKOuGlXBZsLwbTOV4,1929
|
|
14
|
-
qbraid_cli/envs/app.py,sha256=_0_MSSw2-34kULhfYLf6h0tQTDr05vfb5ZoAKLqLzno,7199
|
|
15
|
-
qbraid_cli/envs/create.py,sha256=XgeyA6LxJ1iRlixW0l9b4X3nru-ffIvAVa55y-z-CME,4590
|
|
16
|
-
qbraid_cli/jobs/__init__.py,sha256=W7_dgrI8pLsku1H7KumlHaVURO-ZHnDA7bRuaKV0Qus,73
|
|
17
|
-
qbraid_cli/jobs/app.py,sha256=UA26t_okZ_XvqeOgNM2Kdb9wM78n6fgEXOpoleB_J48,4860
|
|
18
|
-
qbraid_cli/jobs/toggle_braket.py,sha256=2QyWMw0cG15itIWK5G6GBU7GTSfIviBDGe5-5Pc1cyw,7593
|
|
19
|
-
qbraid_cli/kernels/__init__.py,sha256=enVNsFCjbXqVppUU6aPmEe3YjfGhWXk4HmXwJbqDYpQ,76
|
|
20
|
-
qbraid_cli/kernels/app.py,sha256=_zHoB94QxkWqDnaMVfSuhEQQMcVQycmWoVXdJxvDde8,582
|
|
21
|
-
qbraid_cli-0.8.0.dev0.dist-info/METADATA,sha256=inPMOoP1iQrjzV-qfzxAR2mJUMlTFu5r-lBHgwcpTzc,4758
|
|
22
|
-
qbraid_cli-0.8.0.dev0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
23
|
-
qbraid_cli-0.8.0.dev0.dist-info/entry_points.txt,sha256=c5ZJ7NjbxhDqMpou9q5F03_b_KG34HzFDijIDmEIwgQ,47
|
|
24
|
-
qbraid_cli-0.8.0.dev0.dist-info/top_level.txt,sha256=LTYJgeYSCHo9Il8vZu0yIPuGdGyNaIw6iRy6BeoZo8o,11
|
|
25
|
-
qbraid_cli-0.8.0.dev0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|