snowflake-cli 3.12.0__py3-none-any.whl → 3.13.1__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.
- snowflake/cli/__about__.py +1 -1
- snowflake/cli/_app/cli_app.py +43 -0
- snowflake/cli/_app/commands_registration/builtin_plugins.py +1 -1
- snowflake/cli/_app/commands_registration/command_plugins_loader.py +14 -1
- snowflake/cli/_app/telemetry.py +25 -10
- snowflake/cli/_plugins/auth/__init__.py +0 -2
- snowflake/cli/_plugins/connection/commands.py +1 -78
- snowflake/cli/_plugins/dbt/commands.py +15 -19
- snowflake/cli/_plugins/dbt/constants.py +1 -1
- snowflake/cli/_plugins/dbt/manager.py +163 -68
- snowflake/cli/_plugins/nativeapp/entities/application_package.py +4 -1
- snowflake/cli/_plugins/object/manager.py +1 -0
- snowflake/cli/_plugins/spcs/services/commands.py +19 -1
- snowflake/cli/_plugins/spcs/services/manager.py +12 -0
- snowflake/cli/_plugins/spcs/services/service_entity_model.py +5 -0
- snowflake/cli/_plugins/streamlit/streamlit_entity.py +28 -2
- snowflake/cli/_plugins/streamlit/streamlit_entity_model.py +24 -4
- snowflake/cli/api/commands/decorators.py +7 -0
- snowflake/cli/api/commands/flags.py +24 -1
- snowflake/cli/api/feature_flags.py +3 -3
- {snowflake_cli-3.12.0.dist-info → snowflake_cli-3.13.1.dist-info}/METADATA +4 -4
- {snowflake_cli-3.12.0.dist-info → snowflake_cli-3.13.1.dist-info}/RECORD +26 -29
- snowflake/cli/_plugins/auth/keypair/__init__.py +0 -0
- snowflake/cli/_plugins/auth/keypair/commands.py +0 -153
- snowflake/cli/_plugins/auth/keypair/manager.py +0 -331
- /snowflake/cli/_plugins/auth/{keypair/plugin_spec.py → plugin_spec.py} +0 -0
- {snowflake_cli-3.12.0.dist-info → snowflake_cli-3.13.1.dist-info}/WHEEL +0 -0
- {snowflake_cli-3.12.0.dist-info → snowflake_cli-3.13.1.dist-info}/entry_points.txt +0 -0
- {snowflake_cli-3.12.0.dist-info → snowflake_cli-3.13.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
|
+
from decimal import getcontext
|
|
17
18
|
from pathlib import Path
|
|
18
19
|
from typing import Any, Callable, Optional
|
|
19
20
|
|
|
@@ -27,7 +28,7 @@ from snowflake.cli.api.cli_global_context import (
|
|
|
27
28
|
from snowflake.cli.api.commands.common import OnErrorType
|
|
28
29
|
from snowflake.cli.api.commands.overrideable_parameter import OverrideableOption
|
|
29
30
|
from snowflake.cli.api.commands.utils import parse_key_value_variables
|
|
30
|
-
from snowflake.cli.api.config import get_all_connections
|
|
31
|
+
from snowflake.cli.api.config import get_all_connections, get_config_value
|
|
31
32
|
from snowflake.cli.api.connections import ConnectionContext
|
|
32
33
|
from snowflake.cli.api.console import cli_console
|
|
33
34
|
from snowflake.cli.api.identifiers import FQN
|
|
@@ -513,6 +514,28 @@ EnhancedExitCodesOption = typer.Option(
|
|
|
513
514
|
envvar="SNOWFLAKE_ENHANCED_EXIT_CODES",
|
|
514
515
|
)
|
|
515
516
|
|
|
517
|
+
|
|
518
|
+
def _decimal_precision_callback(value: int | None):
|
|
519
|
+
"""Callback to set decimal precision globally when provided."""
|
|
520
|
+
if value is None:
|
|
521
|
+
try:
|
|
522
|
+
value = get_config_value(key="decimal_precision", default=None)
|
|
523
|
+
except Exception:
|
|
524
|
+
pass
|
|
525
|
+
|
|
526
|
+
if value is not None:
|
|
527
|
+
getcontext().prec = value
|
|
528
|
+
return value
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
DecimalPrecisionOption = typer.Option(
|
|
532
|
+
None,
|
|
533
|
+
"--decimal-precision",
|
|
534
|
+
help="Number of decimal places to display for decimal values. Uses Python's default precision if not specified. [env var: SNOWFLAKE_DECIMAL_PRECISION]",
|
|
535
|
+
callback=_decimal_precision_callback,
|
|
536
|
+
rich_help_panel=_CLI_BEHAVIOUR,
|
|
537
|
+
)
|
|
538
|
+
|
|
516
539
|
# If IfExistsOption, IfNotExistsOption, or ReplaceOption are used with names other than those in CREATE_MODE_OPTION_NAMES,
|
|
517
540
|
# you must also override mutually_exclusive if you want to retain the validation that at most one of these flags is
|
|
518
541
|
# passed.
|
|
@@ -64,9 +64,6 @@ class FeatureFlag(FeatureFlagMixin):
|
|
|
64
64
|
)
|
|
65
65
|
ENABLE_SNOWPARK_GLOB_SUPPORT = BooleanFlag("ENABLE_SNOWPARK_GLOB_SUPPORT", False)
|
|
66
66
|
ENABLE_SPCS_SERVICE_EVENTS = BooleanFlag("ENABLE_SPCS_SERVICE_EVENTS", False)
|
|
67
|
-
ENABLE_DBT = BooleanFlag("ENABLE_DBT", False)
|
|
68
|
-
ENABLE_DBT_GA_FEATURES = BooleanFlag("ENABLE_DBT_GA_FEATURES", False)
|
|
69
|
-
ENABLE_AUTH_KEYPAIR = BooleanFlag("ENABLE_AUTH_KEYPAIR", False)
|
|
70
67
|
ENABLE_NATIVE_APP_PYTHON_SETUP = BooleanFlag(
|
|
71
68
|
"ENABLE_NATIVE_APP_PYTHON_SETUP", False
|
|
72
69
|
)
|
|
@@ -74,3 +71,6 @@ class FeatureFlag(FeatureFlagMixin):
|
|
|
74
71
|
# TODO 4.0: remove ENABLE_RELEASE_CHANNELS
|
|
75
72
|
ENABLE_RELEASE_CHANNELS = BooleanFlag("ENABLE_RELEASE_CHANNELS", None)
|
|
76
73
|
ENABLE_SNOWFLAKE_PROJECTS = BooleanFlag("ENABLE_SNOWFLAKE_PROJECTS", False)
|
|
74
|
+
ENABLE_STREAMLIT_SPCS_RUNTIME_V2 = BooleanFlag(
|
|
75
|
+
"ENABLE_STREAMLIT_SPCS_RUNTIME_V2", False
|
|
76
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: snowflake-cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.13.1
|
|
4
4
|
Summary: Snowflake CLI
|
|
5
5
|
Project-URL: Source code, https://github.com/snowflakedb/snowflake-cli
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/snowflakedb/snowflake-cli/issues
|
|
@@ -221,8 +221,8 @@ Requires-Dist: click==8.1.8
|
|
|
221
221
|
Requires-Dist: gitpython==3.1.44
|
|
222
222
|
Requires-Dist: id==1.5.0
|
|
223
223
|
Requires-Dist: jinja2==3.1.6
|
|
224
|
-
Requires-Dist: packaging
|
|
225
|
-
Requires-Dist: pip
|
|
224
|
+
Requires-Dist: packaging==25.0
|
|
225
|
+
Requires-Dist: pip==25.2
|
|
226
226
|
Requires-Dist: pluggy==1.6.0
|
|
227
227
|
Requires-Dist: prompt-toolkit==3.0.51
|
|
228
228
|
Requires-Dist: pydantic==2.11.7
|
|
@@ -231,7 +231,7 @@ Requires-Dist: requests==2.32.4
|
|
|
231
231
|
Requires-Dist: requirements-parser==0.13.0
|
|
232
232
|
Requires-Dist: rich==14.0.0
|
|
233
233
|
Requires-Dist: setuptools==80.8.0
|
|
234
|
-
Requires-Dist: snowflake-connector-python[secure-local-storage]==3.
|
|
234
|
+
Requires-Dist: snowflake-connector-python[secure-local-storage]==3.18.0
|
|
235
235
|
Requires-Dist: snowflake-core==1.7.0
|
|
236
236
|
Requires-Dist: snowflake-snowpark-python==1.33.0; python_version < '3.12'
|
|
237
237
|
Requires-Dist: tomlkit==0.13.3
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
snowflake/cli/__about__.py,sha256=
|
|
1
|
+
snowflake/cli/__about__.py,sha256=Wb59F5xcu4tgknVnZ32eKPd910k2-KVM4xv8b6rvocg,853
|
|
2
2
|
snowflake/cli/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
3
3
|
snowflake/cli/_app/__init__.py,sha256=CR_uTgoqHnU1XdyRhm5iQsS86yWXGVx5Ht7aGSDNFmc,765
|
|
4
4
|
snowflake/cli/_app/__main__.py,sha256=ZmcFdFqAtk2mFMz-cqCFdGd0iYzc7UsLH1oT1U40S0k,858
|
|
5
|
-
snowflake/cli/_app/cli_app.py,sha256=
|
|
5
|
+
snowflake/cli/_app/cli_app.py,sha256=M-VUPk72U9Fo8KISse6RYql_qKPspgHVmYoG-EvSZQ4,11743
|
|
6
6
|
snowflake/cli/_app/constants.py,sha256=jsdljrWgkN7djzYLA4U5YIP-bQI7dxiJ01sVgjjpVMk,1293
|
|
7
7
|
snowflake/cli/_app/loggers.py,sha256=etu9xvhNRQwAn5L1r-x5uaCZ_TSL7Y3RMRjLQxx9nyY,6648
|
|
8
8
|
snowflake/cli/_app/main_typer.py,sha256=v2n7moen3CkP-SfsGrTh-MzFgqG6Ak8bJa8E2dGKzFw,2111
|
|
9
9
|
snowflake/cli/_app/printing.py,sha256=hMtq81huaX44y2H9hgCoDzIbW10RnpJYtT4nf2ZCrj4,11851
|
|
10
10
|
snowflake/cli/_app/snow_connector.py,sha256=UEXWCWSyKgUx1WGy6r0QS6gB1WaKUklie3bl06qHECw,13447
|
|
11
|
-
snowflake/cli/_app/telemetry.py,sha256=
|
|
11
|
+
snowflake/cli/_app/telemetry.py,sha256=2SHBtQxCu-q1UsfZPv9XxLqK_c-VTRYfr8heZddaOQU,10426
|
|
12
12
|
snowflake/cli/_app/version_check.py,sha256=tM3j8FmqcONz3nfiv9WZIU01wy4ZWbKgiWH_8GYzCfM,5585
|
|
13
13
|
snowflake/cli/_app/auth/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
14
14
|
snowflake/cli/_app/auth/errors.py,sha256=BVxUWUMm5ukhBoDRnu45G_pIJowB_bxy10TBkb8cHWI,665
|
|
15
15
|
snowflake/cli/_app/auth/oidc_providers.py,sha256=mlVlagiWunQuyP2idBF44qLrxNu0hH4avPsZ2grd_Ho,12097
|
|
16
16
|
snowflake/cli/_app/commands_registration/__init__.py,sha256=HhP1c8GDRqUtZMeYVNuYwc1_524q9jH18bxJJk1JKWU,918
|
|
17
|
-
snowflake/cli/_app/commands_registration/builtin_plugins.py,sha256=
|
|
18
|
-
snowflake/cli/_app/commands_registration/command_plugins_loader.py,sha256=
|
|
17
|
+
snowflake/cli/_app/commands_registration/builtin_plugins.py,sha256=Eg2L8-aibVP8XMJ9WaCJlJWjjM4qDJHIB8KNy_sQ2v4,2872
|
|
18
|
+
snowflake/cli/_app/commands_registration/command_plugins_loader.py,sha256=72NyZSTCURhCYzqharM1RWKAxcBLLFIAlh1wbk1uuTM,6748
|
|
19
19
|
snowflake/cli/_app/commands_registration/commands_registration_with_callbacks.py,sha256=VvGFd_q0-xe8HU_BP5l1OkVld4PYfNJ45YAWjuIydPE,3038
|
|
20
20
|
snowflake/cli/_app/commands_registration/exception_logging.py,sha256=4B_OuXo6BJXhchs1c4zlmhnN3fN-LV6jdv6LZ227Lr8,985
|
|
21
21
|
snowflake/cli/_app/commands_registration/threadsafe.py,sha256=tIVav38b7F_ctOz-MiZr8TPQyWgu-Al5448-0HTlozw,1420
|
|
@@ -33,17 +33,14 @@ snowflake/cli/_app/dev/docs/templates/definition_description.rst.jinja2,sha256=h
|
|
|
33
33
|
snowflake/cli/_app/dev/docs/templates/overview.rst.jinja2,sha256=qsv0ZphFs9ZbDQhGGBlTc_D2jHhf84mBsxoev54KCuU,430
|
|
34
34
|
snowflake/cli/_app/dev/docs/templates/usage.rst.jinja2,sha256=-ZyfvCUwjkorhPcFA_a7Dy2WbRhcMdZ13ZAQsPMvynE,2444
|
|
35
35
|
snowflake/cli/_plugins/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
36
|
-
snowflake/cli/_plugins/auth/__init__.py,sha256=
|
|
37
|
-
snowflake/cli/_plugins/auth/
|
|
38
|
-
snowflake/cli/_plugins/auth/keypair/commands.py,sha256=9TqfzAzbE5Tku7qs5OOJWPO1_-LwnbxdoYPhD6YCMCA,4174
|
|
39
|
-
snowflake/cli/_plugins/auth/keypair/manager.py,sha256=dcM3zhVr8i6roSagqw8sK1yvawL9XrVva9rrkPrRgy4,11835
|
|
40
|
-
snowflake/cli/_plugins/auth/keypair/plugin_spec.py,sha256=6TwDEeIavB4x8B5WXQfeUhsrAAupdTmAVhmsv3I26u8,979
|
|
36
|
+
snowflake/cli/_plugins/auth/__init__.py,sha256=SiLXWzNGZKVyxZYIZMtkC-FlkwJrzAZstEm265dvRZQ,259
|
|
37
|
+
snowflake/cli/_plugins/auth/plugin_spec.py,sha256=6TwDEeIavB4x8B5WXQfeUhsrAAupdTmAVhmsv3I26u8,979
|
|
41
38
|
snowflake/cli/_plugins/auth/oidc/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
42
39
|
snowflake/cli/_plugins/auth/oidc/commands.py,sha256=kIUOkcAiGucYJAmp5D2eyrMIYa5sbQZp5X1_J_4RYBU,1476
|
|
43
40
|
snowflake/cli/_plugins/auth/oidc/manager.py,sha256=3HHBrqm-HxXq33Fi6T6bAs445AJ4dmbSbxVgqCZBPL4,2075
|
|
44
41
|
snowflake/cli/_plugins/auth/oidc/plugin_spec.py,sha256=6TwDEeIavB4x8B5WXQfeUhsrAAupdTmAVhmsv3I26u8,979
|
|
45
42
|
snowflake/cli/_plugins/connection/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
46
|
-
snowflake/cli/_plugins/connection/commands.py,sha256=
|
|
43
|
+
snowflake/cli/_plugins/connection/commands.py,sha256=o9TSyGz__3IXcowsSEzN_lMZVmact2NbrR4R328-h5o,13690
|
|
47
44
|
snowflake/cli/_plugins/connection/plugin_spec.py,sha256=A50dPnOAjPLwgp4CDXL6EkrEKSivGZ324GPFeG023sw,999
|
|
48
45
|
snowflake/cli/_plugins/connection/util.py,sha256=OjpezcayWVVUhNLzcs8UB6nJ0PIiokMQeX0meaW_6f8,7777
|
|
49
46
|
snowflake/cli/_plugins/cortex/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
@@ -53,9 +50,9 @@ snowflake/cli/_plugins/cortex/manager.py,sha256=6ZppMLGxh3u8NZMpAoHpnwus47lcUEzu
|
|
|
53
50
|
snowflake/cli/_plugins/cortex/plugin_spec.py,sha256=wbOkXoUTVdXCj8m_-bJRi7IiKxS03q0XEgxrT7aB3yU,995
|
|
54
51
|
snowflake/cli/_plugins/cortex/types.py,sha256=9KQPlQRkoR67ty8VoqsifJfaoeLJPXZzCJ6dehYWYLE,827
|
|
55
52
|
snowflake/cli/_plugins/dbt/__init__.py,sha256=JhO1yb1LCYqYx-Ya-MlhubtiqD82CuvWF09dDMafxRM,578
|
|
56
|
-
snowflake/cli/_plugins/dbt/commands.py,sha256=
|
|
57
|
-
snowflake/cli/_plugins/dbt/constants.py,sha256=
|
|
58
|
-
snowflake/cli/_plugins/dbt/manager.py,sha256=
|
|
53
|
+
snowflake/cli/_plugins/dbt/commands.py,sha256=0CsTMMBz9cA5E9lz1CO-Vvl27liS1S7rMSGEWvZXxZc,7892
|
|
54
|
+
snowflake/cli/_plugins/dbt/constants.py,sha256=KKyi4Zwe3iuygiHVq3bNk1VYqavE9UVQdRQgrGb5R2U,962
|
|
55
|
+
snowflake/cli/_plugins/dbt/manager.py,sha256=i4T3yxyaaNZoyvmgJ-0EGgtUk6b8F1jvOJb1tOrLFio,15974
|
|
59
56
|
snowflake/cli/_plugins/dbt/plugin_spec.py,sha256=7yEc3tLgvw3iUhALpmaVpS-iePdSMjFdFSZVybf5KTc,992
|
|
60
57
|
snowflake/cli/_plugins/dcm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
58
|
snowflake/cli/_plugins/dcm/commands.py,sha256=6MMSgu54J2XwTDBCJ9b3ZbewntOasEzzCGj_IIs5JYs,7888
|
|
@@ -105,7 +102,7 @@ snowflake/cli/_plugins/nativeapp/codegen/snowpark/python_processor.py,sha256=clL
|
|
|
105
102
|
snowflake/cli/_plugins/nativeapp/codegen/templates/templates_processor.py,sha256=ycaMiMfJuyW8QntKlfXOrKOxfGsk4zngGbTFuwZDfVU,4704
|
|
106
103
|
snowflake/cli/_plugins/nativeapp/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
107
104
|
snowflake/cli/_plugins/nativeapp/entities/application.py,sha256=p5DrEKoO5ojvBSm0LB13ubFLMCM4MV1rbX5wZqbTO-s,40473
|
|
108
|
-
snowflake/cli/_plugins/nativeapp/entities/application_package.py,sha256=
|
|
105
|
+
snowflake/cli/_plugins/nativeapp/entities/application_package.py,sha256=IAr5loYGrd-2CgMQPvxO1Y3w_ss5IFTdcz3fZQoatys,70611
|
|
109
106
|
snowflake/cli/_plugins/nativeapp/entities/application_package_child_interface.py,sha256=tN5UmU6wD_P14k7_MtOFNJwNUi6LfwFAUdnyZ4_O9hk,1527
|
|
110
107
|
snowflake/cli/_plugins/nativeapp/entities/models/event_sharing_telemetry.py,sha256=ASfuzBheevYrKzP8_mvbq1SR1gSaui1xlZVg4dD0hpg,2364
|
|
111
108
|
snowflake/cli/_plugins/nativeapp/release_channel/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
@@ -128,7 +125,7 @@ snowflake/cli/_plugins/object/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBS
|
|
|
128
125
|
snowflake/cli/_plugins/object/command_aliases.py,sha256=14Lalakh85VRgLOvOtp0S6zYhWsSeqtakLyDBEDA_3o,3954
|
|
129
126
|
snowflake/cli/_plugins/object/commands.py,sha256=miQPZR04uKAF7GEqzaq5z4YzsjGrFLW62DFG9hg5Hpo,6702
|
|
130
127
|
snowflake/cli/_plugins/object/common.py,sha256=x1V8fiVnh7ohHHq0_NaGFtUvTz0soVRSGm-oCIuhJHs,2608
|
|
131
|
-
snowflake/cli/_plugins/object/manager.py,sha256=
|
|
128
|
+
snowflake/cli/_plugins/object/manager.py,sha256=5Kaw2pe1yFp5U-PB-UI2BaGBTQsXGHmWB3lExkx9VMA,5367
|
|
132
129
|
snowflake/cli/_plugins/object/plugin_spec.py,sha256=O8k6hSD48w4Uhkho0KpcTDkZ2iNjiU5jCPvEVitDzeo,995
|
|
133
130
|
snowflake/cli/_plugins/plugin/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
134
131
|
snowflake/cli/_plugins/plugin/commands.py,sha256=JoDeE-ggxYE6FKulNGJQrfl7nao7lg8FCsEw2s-WdF8,2433
|
|
@@ -167,10 +164,10 @@ snowflake/cli/_plugins/spcs/image_repository/image_repository_entity.py,sha256=G
|
|
|
167
164
|
snowflake/cli/_plugins/spcs/image_repository/image_repository_entity_model.py,sha256=6fU6RulsI8yTpU0uFdNKiC-CGcRehD-mHaZADpZya8I,315
|
|
168
165
|
snowflake/cli/_plugins/spcs/image_repository/manager.py,sha256=FRvp92iq2bhFvhcuErEC1o9snTJzW59ykzUZGY8syZw,3336
|
|
169
166
|
snowflake/cli/_plugins/spcs/services/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
170
|
-
snowflake/cli/_plugins/spcs/services/commands.py,sha256=
|
|
171
|
-
snowflake/cli/_plugins/spcs/services/manager.py,sha256=
|
|
167
|
+
snowflake/cli/_plugins/spcs/services/commands.py,sha256=DGur42AhJ6RGtzoolZee4w6xGfT2nTTLkcSU7HMGLlo,20104
|
|
168
|
+
snowflake/cli/_plugins/spcs/services/manager.py,sha256=ozHDasUvOs17hmHltZu4Br_Eek3i6M3xy4oqsSN4hz8,22350
|
|
172
169
|
snowflake/cli/_plugins/spcs/services/service_entity.py,sha256=wEPGgW99uWaSvyvR42e2yLaoH0VuGK3JQio1Nv0a4xs,210
|
|
173
|
-
snowflake/cli/_plugins/spcs/services/service_entity_model.py,sha256=
|
|
170
|
+
snowflake/cli/_plugins/spcs/services/service_entity_model.py,sha256=5HtNjxJum1B6ntq4GAwdI5bFK8hXSyc3LRIjs6Zkz6k,2045
|
|
174
171
|
snowflake/cli/_plugins/spcs/services/service_project_paths.py,sha256=9frP-BzPTs3I2C2Rt9MsuYBMvUdXomOzI7AW4ciXK9U,389
|
|
175
172
|
snowflake/cli/_plugins/sql/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
176
173
|
snowflake/cli/_plugins/sql/commands.py,sha256=O7uiNX84tjLM4DgkTS1LRii6AEYA8fKAvPxBqMigrUA,6751
|
|
@@ -197,8 +194,8 @@ snowflake/cli/_plugins/streamlit/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBl
|
|
|
197
194
|
snowflake/cli/_plugins/streamlit/commands.py,sha256=O5Og6DE86I-ZPrMXB02nBs01WAgMTmac6LeMywrvaTw,6621
|
|
198
195
|
snowflake/cli/_plugins/streamlit/manager.py,sha256=6Vz9WCW33_Mb8GgLGtQzgBbnLRMvllySG-3HBRIf6io,2110
|
|
199
196
|
snowflake/cli/_plugins/streamlit/plugin_spec.py,sha256=swcszE2JoJWs-DzgN02CxK3myIYexsnWijkFYyYf7Ws,998
|
|
200
|
-
snowflake/cli/_plugins/streamlit/streamlit_entity.py,sha256=
|
|
201
|
-
snowflake/cli/_plugins/streamlit/streamlit_entity_model.py,sha256=
|
|
197
|
+
snowflake/cli/_plugins/streamlit/streamlit_entity.py,sha256=lbGccFdnLBLKyk38JhluEaRDUq-mhFawjFT1Zm-oXrM,10442
|
|
198
|
+
snowflake/cli/_plugins/streamlit/streamlit_entity_model.py,sha256=_PnladsEJRjICjyXZxw6HR4iC_Jl0kNym63_dQkJyS0,3049
|
|
202
199
|
snowflake/cli/_plugins/streamlit/streamlit_project_paths.py,sha256=-q7EobPKqDmXk5x_gMvHsCaPT_l41vrJoxIHaGDHui4,1007
|
|
203
200
|
snowflake/cli/_plugins/workspace/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
204
201
|
snowflake/cli/_plugins/workspace/commands.py,sha256=DZLJF69jvD3J8lb0ZljRmSzhTCaYYqv1GRDVTejTMKw,11220
|
|
@@ -211,7 +208,7 @@ snowflake/cli/api/connections.py,sha256=zItH6oAuLD6H2GL0I2AyGlFZkMKPmqe9RPyhlHOx
|
|
|
211
208
|
snowflake/cli/api/constants.py,sha256=v42SRgCIpYjxm5SiEwoQefOqBVMOhw1_9f8UHrJ-v9A,4032
|
|
212
209
|
snowflake/cli/api/errno.py,sha256=nVQ2kO9nPaA1uGB4yZiKTwtE2LiQmINHTutziA37c6s,3871
|
|
213
210
|
snowflake/cli/api/exceptions.py,sha256=3Esa8gL0D_dsbpjWpBFWt1fQW8u4BgU59kx1B5Vgw9A,9228
|
|
214
|
-
snowflake/cli/api/feature_flags.py,sha256
|
|
211
|
+
snowflake/cli/api/feature_flags.py,sha256=-911SN3mUBr7f3ycTXzoMS9f3mTZCwVyEjVwGoZk8i4,2533
|
|
215
212
|
snowflake/cli/api/identifiers.py,sha256=5h7_lTYJQvQy4_QnyPigduJyHye2_9U-1echPIgTmhk,7445
|
|
216
213
|
snowflake/cli/api/metrics.py,sha256=l-khpKWvRF8OB86OhJ2H61jrcTdMDGZe_QM1_-yqWT8,10694
|
|
217
214
|
snowflake/cli/api/rest_api.py,sha256=RUo4prPAGmi2iQt1o96co3pWfo2t5PLCVBB2m1jlrNA,7404
|
|
@@ -230,10 +227,10 @@ snowflake/cli/api/artifacts/utils.py,sha256=nHQ22Qj4l23-CPiv5Wv-mbXQKM3E5FMZT74X
|
|
|
230
227
|
snowflake/cli/api/commands/__init__.py,sha256=uGA_QRGW3iGwaegpFsLgOhup0zBliBSXh9ou8J439uU,578
|
|
231
228
|
snowflake/cli/api/commands/alias.py,sha256=TF6QgkorFTn9UV5F3tvxIJZ56iK1vIjqZFMxVtrTIzk,795
|
|
232
229
|
snowflake/cli/api/commands/common.py,sha256=6CrJqhQl-Mu0jwFmWyNKvvB7jFQ1EJdnKFW9BNHVask,462
|
|
233
|
-
snowflake/cli/api/commands/decorators.py,sha256=
|
|
230
|
+
snowflake/cli/api/commands/decorators.py,sha256=Nm1CJx8bui7EE1JQZl1LzvDT0ZrLtF0XmN-cibGjBb4,13549
|
|
234
231
|
snowflake/cli/api/commands/execution_metadata.py,sha256=9tz1dbzdVRLFprGi_y8TeTfv36VewFeGdhQX6NfwAXM,1231
|
|
235
232
|
snowflake/cli/api/commands/experimental_behaviour.py,sha256=HFTw0d46B1QJpiCy0MeeJhWXrPF_bnmgUGaEWkWXw98,733
|
|
236
|
-
snowflake/cli/api/commands/flags.py,sha256=
|
|
233
|
+
snowflake/cli/api/commands/flags.py,sha256=gNYv8QI-PrfR9t-9rNFZo9ss7QhhZU7vSDZbzrs85Xs,23732
|
|
237
234
|
snowflake/cli/api/commands/overrideable_parameter.py,sha256=LDiRQudkTeoWu5y_qTCVmtseEvO6U9LuSiuLZt5oFq8,6353
|
|
238
235
|
snowflake/cli/api/commands/snow_typer.py,sha256=Mgz6QbinT53vYoTO6_1LtpLY-MhnYoY5m8pjBaucPZo,10775
|
|
239
236
|
snowflake/cli/api/commands/utils.py,sha256=vZcVtPZsuH312FPf9yw-JooNWE7Tli-zVWh4u-gQk7c,1605
|
|
@@ -296,8 +293,8 @@ snowflake/cli/api/utils/path_utils.py,sha256=OgR7cwbHXqP875RgPJGrAvDC1RRTU-2-Yss
|
|
|
296
293
|
snowflake/cli/api/utils/python_api_utils.py,sha256=wTNxXrma78wPvBz-Jo-ixNtP8ZjDCDh4TvciEnhYIAM,300
|
|
297
294
|
snowflake/cli/api/utils/templating_functions.py,sha256=zu2oK1BEC9yyWtDx17Hr-VAYHvCtagaOdxIrm70JQys,4955
|
|
298
295
|
snowflake/cli/api/utils/types.py,sha256=fVKuls8axKSsBzPqWwrkwkwoXXmedqxNJKqfXrrGyBM,1190
|
|
299
|
-
snowflake_cli-3.
|
|
300
|
-
snowflake_cli-3.
|
|
301
|
-
snowflake_cli-3.
|
|
302
|
-
snowflake_cli-3.
|
|
303
|
-
snowflake_cli-3.
|
|
296
|
+
snowflake_cli-3.13.1.dist-info/METADATA,sha256=WtSGM6D7rRlZ4MKIkvBuYs3yByhEzLM9mXCDUcUG778,18501
|
|
297
|
+
snowflake_cli-3.13.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
298
|
+
snowflake_cli-3.13.1.dist-info/entry_points.txt,sha256=6QmSI0wUX6p7f-dGvrPdswlQyVAVGi1AtOUbE8X6bho,58
|
|
299
|
+
snowflake_cli-3.13.1.dist-info/licenses/LICENSE,sha256=mJMA3Uz2AbjU_kVggo1CAx01XhBsI7BSi2H7ggUg_-c,11344
|
|
300
|
+
snowflake_cli-3.13.1.dist-info/RECORD,,
|
|
File without changes
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
import typer
|
|
4
|
-
from snowflake.cli._plugins.auth.keypair.manager import AuthManager, PublicKeyProperty
|
|
5
|
-
from snowflake.cli.api.commands.flags import SecretTypeParser
|
|
6
|
-
from snowflake.cli.api.commands.snow_typer import SnowTyperFactory
|
|
7
|
-
from snowflake.cli.api.feature_flags import FeatureFlag
|
|
8
|
-
from snowflake.cli.api.output.types import (
|
|
9
|
-
CollectionResult,
|
|
10
|
-
CommandResult,
|
|
11
|
-
MessageResult,
|
|
12
|
-
SingleQueryResult,
|
|
13
|
-
)
|
|
14
|
-
from snowflake.cli.api.secret import SecretType
|
|
15
|
-
from snowflake.cli.api.secure_path import SecurePath
|
|
16
|
-
|
|
17
|
-
app = SnowTyperFactory(
|
|
18
|
-
name="keypair",
|
|
19
|
-
help="Manages authentication.",
|
|
20
|
-
is_hidden=lambda: FeatureFlag.ENABLE_AUTH_KEYPAIR.is_disabled(),
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
KEY_PAIR_DEFAULT_PATH = "~/.ssh"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def _show_connection_name_prompt(ctx: typer.Context, value: str):
|
|
28
|
-
for param in ctx.command.params:
|
|
29
|
-
if param.name == "connection_name":
|
|
30
|
-
if value:
|
|
31
|
-
param.prompt = "Enter connection name"
|
|
32
|
-
break
|
|
33
|
-
return value
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
_new_connection_option = typer.Option(
|
|
37
|
-
True,
|
|
38
|
-
help="Create a new connection.",
|
|
39
|
-
prompt="Create a new connection?",
|
|
40
|
-
callback=_show_connection_name_prompt,
|
|
41
|
-
show_default=False,
|
|
42
|
-
hidden=True,
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_connection_name_option = typer.Option(
|
|
47
|
-
None,
|
|
48
|
-
help="The new connection name.",
|
|
49
|
-
prompt=False,
|
|
50
|
-
show_default=False,
|
|
51
|
-
hidden=True,
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
_key_length_option = typer.Option(
|
|
56
|
-
2048,
|
|
57
|
-
"--key-length",
|
|
58
|
-
help="The RSA key length.",
|
|
59
|
-
prompt="Enter key length",
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_output_path_option = typer.Option(
|
|
64
|
-
KEY_PAIR_DEFAULT_PATH,
|
|
65
|
-
"--output-path",
|
|
66
|
-
help="The output path for private and public keys",
|
|
67
|
-
prompt="Enter output path",
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
_private_key_passphrase_option = typer.Option(
|
|
72
|
-
"",
|
|
73
|
-
"--private-key-passphrase",
|
|
74
|
-
help="The private key passphrase.",
|
|
75
|
-
click_type=SecretTypeParser(),
|
|
76
|
-
prompt="Enter private key passphrase",
|
|
77
|
-
hide_input=True,
|
|
78
|
-
show_default=False,
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
@app.command("setup", requires_connection=True)
|
|
83
|
-
def setup(
|
|
84
|
-
new_connection: bool = _new_connection_option,
|
|
85
|
-
connection_name: str = _connection_name_option,
|
|
86
|
-
key_length: int = _key_length_option,
|
|
87
|
-
output_path: Path = _output_path_option,
|
|
88
|
-
private_key_passphrase: SecretType = _private_key_passphrase_option,
|
|
89
|
-
**options,
|
|
90
|
-
):
|
|
91
|
-
"""
|
|
92
|
-
Generates the key pair, sets the public key for the user in Snowflake, and creates or updates the connection.
|
|
93
|
-
"""
|
|
94
|
-
AuthManager().setup(
|
|
95
|
-
connection_name=connection_name,
|
|
96
|
-
key_length=key_length,
|
|
97
|
-
output_path=SecurePath(output_path),
|
|
98
|
-
private_key_passphrase=private_key_passphrase,
|
|
99
|
-
)
|
|
100
|
-
return MessageResult(f"Setup completed.")
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
@app.command("rotate", requires_connection=True)
|
|
104
|
-
def rotate(
|
|
105
|
-
key_length: int = _key_length_option,
|
|
106
|
-
output_path: Path = _output_path_option,
|
|
107
|
-
private_key_passphrase: SecretType = _private_key_passphrase_option,
|
|
108
|
-
**options,
|
|
109
|
-
):
|
|
110
|
-
"""
|
|
111
|
-
Rotates the key for the connection. Generates the key pair, sets the public key for the user in Snowflake, and creates or updates the connection.
|
|
112
|
-
"""
|
|
113
|
-
AuthManager().rotate(
|
|
114
|
-
key_length=key_length,
|
|
115
|
-
output_path=SecurePath(output_path),
|
|
116
|
-
private_key_passphrase=private_key_passphrase,
|
|
117
|
-
)
|
|
118
|
-
return MessageResult(f"Rotate completed.")
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
@app.command("list", requires_connection=True)
|
|
122
|
-
def list_keys(**options) -> CommandResult:
|
|
123
|
-
"""
|
|
124
|
-
Lists the public keys set for the user.
|
|
125
|
-
"""
|
|
126
|
-
return CollectionResult(AuthManager().list_keys())
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
@app.command("remove", requires_connection=True)
|
|
130
|
-
def remove(
|
|
131
|
-
public_key_property: PublicKeyProperty = typer.Option(
|
|
132
|
-
...,
|
|
133
|
-
"--key-id",
|
|
134
|
-
help=f"Local path to the template directory or a URL to Git repository with templates.",
|
|
135
|
-
show_default=False,
|
|
136
|
-
),
|
|
137
|
-
**options,
|
|
138
|
-
):
|
|
139
|
-
"""
|
|
140
|
-
Removes the public key for the user.
|
|
141
|
-
"""
|
|
142
|
-
return SingleQueryResult(
|
|
143
|
-
AuthManager().remove_public_key(public_key_property=public_key_property)
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
@app.command("status", requires_connection=True)
|
|
148
|
-
def status(**options):
|
|
149
|
-
"""
|
|
150
|
-
Verifies the key pair configuration and tests the connection.
|
|
151
|
-
"""
|
|
152
|
-
AuthManager().status()
|
|
153
|
-
return MessageResult("Status check completed.")
|