qbraid-cli 0.9.9__py3-none-any.whl → 0.9.10__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/files/app.py +22 -1
- {qbraid_cli-0.9.9.dist-info → qbraid_cli-0.9.10.dist-info}/METADATA +1 -1
- {qbraid_cli-0.9.9.dist-info → qbraid_cli-0.9.10.dist-info}/RECORD +8 -8
- {qbraid_cli-0.9.9.dist-info → qbraid_cli-0.9.10.dist-info}/LICENSE +0 -0
- {qbraid_cli-0.9.9.dist-info → qbraid_cli-0.9.10.dist-info}/WHEEL +0 -0
- {qbraid_cli-0.9.9.dist-info → qbraid_cli-0.9.10.dist-info}/entry_points.txt +0 -0
- {qbraid_cli-0.9.9.dist-info → qbraid_cli-0.9.10.dist-info}/top_level.txt +0 -0
qbraid_cli/_version.py
CHANGED
qbraid_cli/files/app.py
CHANGED
|
@@ -12,11 +12,29 @@ from typing import Any
|
|
|
12
12
|
import rich
|
|
13
13
|
import typer
|
|
14
14
|
|
|
15
|
-
from qbraid_cli.handlers import run_progress_task
|
|
15
|
+
from qbraid_cli.handlers import handle_error, run_progress_task
|
|
16
16
|
|
|
17
17
|
files_app = typer.Typer(help="Manage qBraid cloud storage files.", no_args_is_help=True)
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
def is_file_less_than_10mb(file_path: Path) -> bool:
|
|
21
|
+
"""
|
|
22
|
+
Check if the given file is less than 10MB in size.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
file_path (Path): The path to the file to check.
|
|
26
|
+
|
|
27
|
+
Returns:
|
|
28
|
+
bool: True if the file is less than 10MB, False otherwise.
|
|
29
|
+
"""
|
|
30
|
+
TEN_MB = 10 * 1024 * 1024 # 10 * 1024 KB * 1024 bytes
|
|
31
|
+
|
|
32
|
+
try:
|
|
33
|
+
return file_path.stat().st_size < TEN_MB
|
|
34
|
+
except OSError:
|
|
35
|
+
return False
|
|
36
|
+
|
|
37
|
+
|
|
20
38
|
@files_app.command(name="upload")
|
|
21
39
|
def files_upload(
|
|
22
40
|
filepath: Path = typer.Argument(
|
|
@@ -47,6 +65,9 @@ def files_upload(
|
|
|
47
65
|
):
|
|
48
66
|
"""Upload a local file to qBraid storage."""
|
|
49
67
|
|
|
68
|
+
if not is_file_less_than_10mb(filepath):
|
|
69
|
+
handle_error("Error", "File too large. Must be less than 10MB for direct upload.")
|
|
70
|
+
|
|
50
71
|
def upload_file() -> dict[str, Any]:
|
|
51
72
|
from qbraid_core.services.files import FileManagerClient
|
|
52
73
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
qbraid_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
qbraid_cli/_version.py,sha256=
|
|
2
|
+
qbraid_cli/_version.py,sha256=kAkjSYToVabqGkP6bYAKkSoV5aHCv-7NbDEGfABB4V0,413
|
|
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
|
|
@@ -24,7 +24,7 @@ qbraid_cli/envs/app.py,sha256=c3O5fB6PThCXS2hyYMHrj8YvvEJaI-_8NZd_GN_4iZ0,9972
|
|
|
24
24
|
qbraid_cli/envs/create.py,sha256=xudzkLCNegY34zkXN_Vfl_0zVzg_tW83LcVx9quoWfU,988
|
|
25
25
|
qbraid_cli/envs/data_handling.py,sha256=Ibnp2yJoUDpivb_sNqi0suYgJZNat_LmM6Ya0Ovez5s,1288
|
|
26
26
|
qbraid_cli/files/__init__.py,sha256=3_yhgFoNcviEtS6B75uJBrfFFUjsrMcccCNEntJ54xU,175
|
|
27
|
-
qbraid_cli/files/app.py,sha256=
|
|
27
|
+
qbraid_cli/files/app.py,sha256=Z766FqYne2bDJGYW7EWx8ZwemQyhNNU_AtCnAV8x3X8,3767
|
|
28
28
|
qbraid_cli/jobs/__init__.py,sha256=qVLRHYIzP4XHpx_QWP_vCzd3LsCscCORaEx-Vcbx29U,172
|
|
29
29
|
qbraid_cli/jobs/app.py,sha256=LnrxALu7OWSUg1FD6FvlGsILdoH46Y-ra12eiSfiMlE,4938
|
|
30
30
|
qbraid_cli/jobs/toggle_braket.py,sha256=3AEu-Z5q4avduB-fJMyMTVTuyZXuA8m-hnvi325wIv4,7444
|
|
@@ -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.
|
|
38
|
-
qbraid_cli-0.9.
|
|
39
|
-
qbraid_cli-0.9.
|
|
40
|
-
qbraid_cli-0.9.
|
|
41
|
-
qbraid_cli-0.9.
|
|
42
|
-
qbraid_cli-0.9.
|
|
37
|
+
qbraid_cli-0.9.10.dist-info/LICENSE,sha256=P1gi-ofB8lmkRt_mxDoJpcgQq9Ckq9WhRAS1oYk-G1s,2506
|
|
38
|
+
qbraid_cli-0.9.10.dist-info/METADATA,sha256=qQZOR8C-CJff4fjdDoljFmm9GiBMdKWXpRbjON21n7g,7526
|
|
39
|
+
qbraid_cli-0.9.10.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
40
|
+
qbraid_cli-0.9.10.dist-info/entry_points.txt,sha256=c5ZJ7NjbxhDqMpou9q5F03_b_KG34HzFDijIDmEIwgQ,47
|
|
41
|
+
qbraid_cli-0.9.10.dist-info/top_level.txt,sha256=LTYJgeYSCHo9Il8vZu0yIPuGdGyNaIw6iRy6BeoZo8o,11
|
|
42
|
+
qbraid_cli-0.9.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|