snowflake-cli-labs 3.0.0rc4__py3-none-any.whl → 3.0.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.
Files changed (244) hide show
  1. README.md +21 -0
  2. {snowflake_cli_labs-3.0.0rc4.dist-info → snowflake_cli_labs-3.0.1.dist-info}/METADATA +6 -96
  3. snowflake_cli_labs-3.0.1.dist-info/RECORD +5 -0
  4. snowflake/cli/__about__.py +0 -17
  5. snowflake/cli/__init__.py +0 -13
  6. snowflake/cli/_app/__init__.py +0 -22
  7. snowflake/cli/_app/__main__.py +0 -31
  8. snowflake/cli/_app/api_impl/__init__.py +0 -13
  9. snowflake/cli/_app/api_impl/plugin/__init__.py +0 -13
  10. snowflake/cli/_app/api_impl/plugin/plugin_config_provider_impl.py +0 -66
  11. snowflake/cli/_app/cli_app.py +0 -252
  12. snowflake/cli/_app/commands_registration/__init__.py +0 -33
  13. snowflake/cli/_app/commands_registration/builtin_plugins.py +0 -50
  14. snowflake/cli/_app/commands_registration/command_plugins_loader.py +0 -169
  15. snowflake/cli/_app/commands_registration/commands_registration_with_callbacks.py +0 -105
  16. snowflake/cli/_app/commands_registration/exception_logging.py +0 -26
  17. snowflake/cli/_app/commands_registration/threadsafe.py +0 -48
  18. snowflake/cli/_app/commands_registration/typer_registration.py +0 -153
  19. snowflake/cli/_app/constants.py +0 -19
  20. snowflake/cli/_app/dev/__init__.py +0 -13
  21. snowflake/cli/_app/dev/commands_structure.py +0 -48
  22. snowflake/cli/_app/dev/docs/__init__.py +0 -13
  23. snowflake/cli/_app/dev/docs/commands_docs_generator.py +0 -118
  24. snowflake/cli/_app/dev/docs/generator.py +0 -35
  25. snowflake/cli/_app/dev/docs/project_definition_docs_generator.py +0 -58
  26. snowflake/cli/_app/dev/docs/project_definition_generate_json_schema.py +0 -227
  27. snowflake/cli/_app/dev/docs/template_utils.py +0 -23
  28. snowflake/cli/_app/dev/docs/templates/definition_description.rst.jinja2 +0 -38
  29. snowflake/cli/_app/dev/docs/templates/overview.rst.jinja2 +0 -9
  30. snowflake/cli/_app/dev/docs/templates/usage.rst.jinja2 +0 -67
  31. snowflake/cli/_app/dev/pycharm_remote_debug.py +0 -46
  32. snowflake/cli/_app/loggers.py +0 -199
  33. snowflake/cli/_app/main_typer.py +0 -62
  34. snowflake/cli/_app/printing.py +0 -181
  35. snowflake/cli/_app/secret.py +0 -9
  36. snowflake/cli/_app/snow_connector.py +0 -309
  37. snowflake/cli/_app/telemetry.py +0 -220
  38. snowflake/cli/_app/version_check.py +0 -74
  39. snowflake/cli/_plugins/__init__.py +0 -13
  40. snowflake/cli/_plugins/connection/__init__.py +0 -13
  41. snowflake/cli/_plugins/connection/commands.py +0 -353
  42. snowflake/cli/_plugins/connection/plugin_spec.py +0 -30
  43. snowflake/cli/_plugins/connection/util.py +0 -195
  44. snowflake/cli/_plugins/cortex/__init__.py +0 -13
  45. snowflake/cli/_plugins/cortex/commands.py +0 -332
  46. snowflake/cli/_plugins/cortex/constants.py +0 -17
  47. snowflake/cli/_plugins/cortex/manager.py +0 -189
  48. snowflake/cli/_plugins/cortex/plugin_spec.py +0 -30
  49. snowflake/cli/_plugins/cortex/types.py +0 -22
  50. snowflake/cli/_plugins/git/__init__.py +0 -13
  51. snowflake/cli/_plugins/git/commands.py +0 -358
  52. snowflake/cli/_plugins/git/manager.py +0 -151
  53. snowflake/cli/_plugins/git/plugin_spec.py +0 -30
  54. snowflake/cli/_plugins/helpers/__init__.py +0 -13
  55. snowflake/cli/_plugins/helpers/commands.py +0 -61
  56. snowflake/cli/_plugins/helpers/plugin_spec.py +0 -30
  57. snowflake/cli/_plugins/init/__init__.py +0 -13
  58. snowflake/cli/_plugins/init/commands.py +0 -248
  59. snowflake/cli/_plugins/init/plugin_spec.py +0 -30
  60. snowflake/cli/_plugins/nativeapp/__init__.py +0 -13
  61. snowflake/cli/_plugins/nativeapp/artifacts.py +0 -757
  62. snowflake/cli/_plugins/nativeapp/bundle_context.py +0 -31
  63. snowflake/cli/_plugins/nativeapp/codegen/__init__.py +0 -13
  64. snowflake/cli/_plugins/nativeapp/codegen/artifact_processor.py +0 -91
  65. snowflake/cli/_plugins/nativeapp/codegen/compiler.py +0 -149
  66. snowflake/cli/_plugins/nativeapp/codegen/sandbox.py +0 -306
  67. snowflake/cli/_plugins/nativeapp/codegen/setup/native_app_setup_processor.py +0 -249
  68. snowflake/cli/_plugins/nativeapp/codegen/setup/setup_driver.py.source +0 -59
  69. snowflake/cli/_plugins/nativeapp/codegen/snowpark/callback_source.py.jinja +0 -181
  70. snowflake/cli/_plugins/nativeapp/codegen/snowpark/extension_function_utils.py +0 -217
  71. snowflake/cli/_plugins/nativeapp/codegen/snowpark/models.py +0 -61
  72. snowflake/cli/_plugins/nativeapp/codegen/snowpark/python_processor.py +0 -523
  73. snowflake/cli/_plugins/nativeapp/codegen/templates/templates_processor.py +0 -114
  74. snowflake/cli/_plugins/nativeapp/commands.py +0 -559
  75. snowflake/cli/_plugins/nativeapp/common_flags.py +0 -44
  76. snowflake/cli/_plugins/nativeapp/constants.py +0 -27
  77. snowflake/cli/_plugins/nativeapp/entities/__init__.py +0 -0
  78. snowflake/cli/_plugins/nativeapp/entities/application.py +0 -878
  79. snowflake/cli/_plugins/nativeapp/entities/application_package.py +0 -1392
  80. snowflake/cli/_plugins/nativeapp/exceptions.py +0 -113
  81. snowflake/cli/_plugins/nativeapp/feature_flags.py +0 -24
  82. snowflake/cli/_plugins/nativeapp/manager.py +0 -415
  83. snowflake/cli/_plugins/nativeapp/plugin_spec.py +0 -30
  84. snowflake/cli/_plugins/nativeapp/policy.py +0 -53
  85. snowflake/cli/_plugins/nativeapp/project_model.py +0 -211
  86. snowflake/cli/_plugins/nativeapp/run_processor.py +0 -184
  87. snowflake/cli/_plugins/nativeapp/same_account_install_method.py +0 -70
  88. snowflake/cli/_plugins/nativeapp/teardown_processor.py +0 -70
  89. snowflake/cli/_plugins/nativeapp/utils.py +0 -98
  90. snowflake/cli/_plugins/nativeapp/v2_conversions/v2_to_v1_decorator.py +0 -262
  91. snowflake/cli/_plugins/nativeapp/version/__init__.py +0 -13
  92. snowflake/cli/_plugins/nativeapp/version/commands.py +0 -141
  93. snowflake/cli/_plugins/nativeapp/version/version_processor.py +0 -98
  94. snowflake/cli/_plugins/notebook/__init__.py +0 -13
  95. snowflake/cli/_plugins/notebook/commands.py +0 -86
  96. snowflake/cli/_plugins/notebook/exceptions.py +0 -20
  97. snowflake/cli/_plugins/notebook/manager.py +0 -71
  98. snowflake/cli/_plugins/notebook/plugin_spec.py +0 -30
  99. snowflake/cli/_plugins/notebook/types.py +0 -15
  100. snowflake/cli/_plugins/object/__init__.py +0 -13
  101. snowflake/cli/_plugins/object/command_aliases.py +0 -95
  102. snowflake/cli/_plugins/object/commands.py +0 -180
  103. snowflake/cli/_plugins/object/common.py +0 -85
  104. snowflake/cli/_plugins/object/manager.py +0 -118
  105. snowflake/cli/_plugins/object/plugin_spec.py +0 -30
  106. snowflake/cli/_plugins/snowpark/__init__.py +0 -13
  107. snowflake/cli/_plugins/snowpark/commands.py +0 -450
  108. snowflake/cli/_plugins/snowpark/common.py +0 -268
  109. snowflake/cli/_plugins/snowpark/models.py +0 -150
  110. snowflake/cli/_plugins/snowpark/package/__init__.py +0 -13
  111. snowflake/cli/_plugins/snowpark/package/anaconda_packages.py +0 -199
  112. snowflake/cli/_plugins/snowpark/package/commands.py +0 -195
  113. snowflake/cli/_plugins/snowpark/package/manager.py +0 -44
  114. snowflake/cli/_plugins/snowpark/package/utils.py +0 -26
  115. snowflake/cli/_plugins/snowpark/package_utils.py +0 -354
  116. snowflake/cli/_plugins/snowpark/plugin_spec.py +0 -30
  117. snowflake/cli/_plugins/snowpark/snowpark_entity.py +0 -29
  118. snowflake/cli/_plugins/snowpark/snowpark_entity_model.py +0 -173
  119. snowflake/cli/_plugins/snowpark/snowpark_project_paths.py +0 -109
  120. snowflake/cli/_plugins/snowpark/snowpark_shared.py +0 -59
  121. snowflake/cli/_plugins/snowpark/zipper.py +0 -89
  122. snowflake/cli/_plugins/spcs/__init__.py +0 -33
  123. snowflake/cli/_plugins/spcs/common.py +0 -99
  124. snowflake/cli/_plugins/spcs/compute_pool/__init__.py +0 -13
  125. snowflake/cli/_plugins/spcs/compute_pool/commands.py +0 -241
  126. snowflake/cli/_plugins/spcs/compute_pool/manager.py +0 -121
  127. snowflake/cli/_plugins/spcs/image_registry/__init__.py +0 -13
  128. snowflake/cli/_plugins/spcs/image_registry/commands.py +0 -65
  129. snowflake/cli/_plugins/spcs/image_registry/manager.py +0 -105
  130. snowflake/cli/_plugins/spcs/image_repository/__init__.py +0 -13
  131. snowflake/cli/_plugins/spcs/image_repository/commands.py +0 -202
  132. snowflake/cli/_plugins/spcs/image_repository/manager.py +0 -84
  133. snowflake/cli/_plugins/spcs/plugin_spec.py +0 -30
  134. snowflake/cli/_plugins/spcs/services/__init__.py +0 -13
  135. snowflake/cli/_plugins/spcs/services/commands.py +0 -345
  136. snowflake/cli/_plugins/spcs/services/manager.py +0 -208
  137. snowflake/cli/_plugins/sql/__init__.py +0 -13
  138. snowflake/cli/_plugins/sql/commands.py +0 -86
  139. snowflake/cli/_plugins/sql/manager.py +0 -92
  140. snowflake/cli/_plugins/sql/plugin_spec.py +0 -30
  141. snowflake/cli/_plugins/sql/snowsql_templating.py +0 -28
  142. snowflake/cli/_plugins/stage/__init__.py +0 -13
  143. snowflake/cli/_plugins/stage/commands.py +0 -264
  144. snowflake/cli/_plugins/stage/diff.py +0 -280
  145. snowflake/cli/_plugins/stage/manager.py +0 -582
  146. snowflake/cli/_plugins/stage/md5.py +0 -160
  147. snowflake/cli/_plugins/stage/plugin_spec.py +0 -30
  148. snowflake/cli/_plugins/stage/utils.py +0 -54
  149. snowflake/cli/_plugins/streamlit/__init__.py +0 -13
  150. snowflake/cli/_plugins/streamlit/commands.py +0 -195
  151. snowflake/cli/_plugins/streamlit/manager.py +0 -220
  152. snowflake/cli/_plugins/streamlit/plugin_spec.py +0 -30
  153. snowflake/cli/_plugins/streamlit/streamlit_entity.py +0 -12
  154. snowflake/cli/_plugins/streamlit/streamlit_entity_model.py +0 -66
  155. snowflake/cli/_plugins/workspace/__init__.py +0 -13
  156. snowflake/cli/_plugins/workspace/action_context.py +0 -18
  157. snowflake/cli/_plugins/workspace/commands.py +0 -306
  158. snowflake/cli/_plugins/workspace/manager.py +0 -74
  159. snowflake/cli/_plugins/workspace/plugin_spec.py +0 -30
  160. snowflake/cli/api/__init__.py +0 -48
  161. snowflake/cli/api/cli_global_context.py +0 -247
  162. snowflake/cli/api/commands/__init__.py +0 -13
  163. snowflake/cli/api/commands/alias.py +0 -23
  164. snowflake/cli/api/commands/common.py +0 -25
  165. snowflake/cli/api/commands/decorators.py +0 -369
  166. snowflake/cli/api/commands/execution_metadata.py +0 -40
  167. snowflake/cli/api/commands/experimental_behaviour.py +0 -18
  168. snowflake/cli/api/commands/flags.py +0 -561
  169. snowflake/cli/api/commands/overrideable_parameter.py +0 -143
  170. snowflake/cli/api/commands/snow_typer.py +0 -247
  171. snowflake/cli/api/commands/utils.py +0 -18
  172. snowflake/cli/api/config.py +0 -380
  173. snowflake/cli/api/connections.py +0 -216
  174. snowflake/cli/api/console/__init__.py +0 -17
  175. snowflake/cli/api/console/abc.py +0 -94
  176. snowflake/cli/api/console/console.py +0 -134
  177. snowflake/cli/api/console/enum.py +0 -17
  178. snowflake/cli/api/constants.py +0 -90
  179. snowflake/cli/api/entities/common.py +0 -56
  180. snowflake/cli/api/entities/utils.py +0 -370
  181. snowflake/cli/api/errno.py +0 -28
  182. snowflake/cli/api/exceptions.py +0 -190
  183. snowflake/cli/api/feature_flags.py +0 -54
  184. snowflake/cli/api/identifiers.py +0 -190
  185. snowflake/cli/api/metrics.py +0 -92
  186. snowflake/cli/api/output/__init__.py +0 -13
  187. snowflake/cli/api/output/formats.py +0 -20
  188. snowflake/cli/api/output/types.py +0 -118
  189. snowflake/cli/api/plugins/__init__.py +0 -13
  190. snowflake/cli/api/plugins/command/__init__.py +0 -72
  191. snowflake/cli/api/plugins/command/plugin_hook_specs.py +0 -21
  192. snowflake/cli/api/plugins/plugin_config.py +0 -32
  193. snowflake/cli/api/project/__init__.py +0 -13
  194. snowflake/cli/api/project/definition.py +0 -126
  195. snowflake/cli/api/project/definition_conversion.py +0 -395
  196. snowflake/cli/api/project/definition_manager.py +0 -145
  197. snowflake/cli/api/project/errors.py +0 -56
  198. snowflake/cli/api/project/project_verification.py +0 -23
  199. snowflake/cli/api/project/schemas/__init__.py +0 -13
  200. snowflake/cli/api/project/schemas/entities/__init__.py +0 -13
  201. snowflake/cli/api/project/schemas/entities/common.py +0 -153
  202. snowflake/cli/api/project/schemas/entities/entities.py +0 -61
  203. snowflake/cli/api/project/schemas/project_definition.py +0 -330
  204. snowflake/cli/api/project/schemas/template.py +0 -77
  205. snowflake/cli/api/project/schemas/updatable_model.py +0 -202
  206. snowflake/cli/api/project/schemas/v1/__init__.py +0 -0
  207. snowflake/cli/api/project/schemas/v1/identifier_model.py +0 -51
  208. snowflake/cli/api/project/schemas/v1/native_app/__init__.py +0 -0
  209. snowflake/cli/api/project/schemas/v1/native_app/application.py +0 -61
  210. snowflake/cli/api/project/schemas/v1/native_app/native_app.py +0 -93
  211. snowflake/cli/api/project/schemas/v1/native_app/package.py +0 -84
  212. snowflake/cli/api/project/schemas/v1/native_app/path_mapping.py +0 -65
  213. snowflake/cli/api/project/schemas/v1/snowpark/__init__.py +0 -0
  214. snowflake/cli/api/project/schemas/v1/snowpark/argument.py +0 -28
  215. snowflake/cli/api/project/schemas/v1/snowpark/callable.py +0 -69
  216. snowflake/cli/api/project/schemas/v1/snowpark/snowpark.py +0 -36
  217. snowflake/cli/api/project/schemas/v1/streamlit/__init__.py +0 -0
  218. snowflake/cli/api/project/schemas/v1/streamlit/streamlit.py +0 -47
  219. snowflake/cli/api/project/util.py +0 -278
  220. snowflake/cli/api/rendering/__init__.py +0 -13
  221. snowflake/cli/api/rendering/jinja.py +0 -118
  222. snowflake/cli/api/rendering/project_definition_templates.py +0 -43
  223. snowflake/cli/api/rendering/project_templates.py +0 -98
  224. snowflake/cli/api/rendering/sql_templates.py +0 -105
  225. snowflake/cli/api/rest_api.py +0 -178
  226. snowflake/cli/api/sanitizers.py +0 -43
  227. snowflake/cli/api/secure_path.py +0 -360
  228. snowflake/cli/api/secure_utils.py +0 -118
  229. snowflake/cli/api/sql_execution.py +0 -280
  230. snowflake/cli/api/utils/__init__.py +0 -13
  231. snowflake/cli/api/utils/cursor.py +0 -34
  232. snowflake/cli/api/utils/definition_rendering.py +0 -415
  233. snowflake/cli/api/utils/dict_utils.py +0 -73
  234. snowflake/cli/api/utils/error_handling.py +0 -23
  235. snowflake/cli/api/utils/graph.py +0 -97
  236. snowflake/cli/api/utils/models.py +0 -63
  237. snowflake/cli/api/utils/naming_utils.py +0 -13
  238. snowflake/cli/api/utils/path_utils.py +0 -36
  239. snowflake/cli/api/utils/templating_functions.py +0 -144
  240. snowflake/cli/api/utils/types.py +0 -35
  241. snowflake_cli_labs-3.0.0rc4.dist-info/RECORD +0 -242
  242. snowflake_cli_labs-3.0.0rc4.dist-info/entry_points.txt +0 -2
  243. {snowflake_cli_labs-3.0.0rc4.dist-info → snowflake_cli_labs-3.0.1.dist-info}/WHEEL +0 -0
  244. {snowflake_cli_labs-3.0.0rc4.dist-info → snowflake_cli_labs-3.0.1.dist-info}/licenses/LICENSE +0 -0
README.md ADDED
@@ -0,0 +1,21 @@
1
+ <!--
2
+ Copyright (c) 2024 Snowflake Inc.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ -->
16
+
17
+ # Snowflake Developer CLI
18
+
19
+ This package has been renamed. Use `pip install snowflake-cli` instead.
20
+
21
+ New package: https://pypi.org/project/snowflake-cli/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: snowflake-cli-labs
3
- Version: 3.0.0rc4
3
+ Version: 3.0.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
@@ -207,41 +207,9 @@ License: Apache License
207
207
  See the License for the specific language governing permissions and
208
208
  limitations under the License.
209
209
  License-File: LICENSE
210
- Classifier: Development Status :: 5 - Production/Stable
211
- Classifier: Environment :: Console
212
- Classifier: Intended Audience :: Developers
213
- Classifier: Intended Audience :: Information Technology
214
- Classifier: Intended Audience :: System Administrators
215
- Classifier: License :: OSI Approved :: Apache Software License
216
- Classifier: Programming Language :: Python :: 3 :: Only
217
- Classifier: Programming Language :: SQL
218
- Classifier: Topic :: Database
210
+ Classifier: Development Status :: 7 - Inactive
219
211
  Requires-Python: >=3.10
220
- Requires-Dist: gitpython==3.1.43
221
- Requires-Dist: jinja2==3.1.4
222
- Requires-Dist: packaging
223
- Requires-Dist: pip
224
- Requires-Dist: pluggy==1.5.0
225
- Requires-Dist: pydantic==2.9.2
226
- Requires-Dist: pyyaml==6.0.2
227
- Requires-Dist: requests==2.32.3
228
- Requires-Dist: requirements-parser==0.11.0
229
- Requires-Dist: rich==13.8.1
230
- Requires-Dist: setuptools==75.1.0
231
- Requires-Dist: snowflake-connector-python[secure-local-storage]==3.12.2
232
- Requires-Dist: snowflake-core==0.12.1; python_version < '3.12'
233
- Requires-Dist: snowflake-snowpark-python>=1.15.0; python_version < '3.12'
234
- Requires-Dist: tomlkit==0.13.2
235
- Requires-Dist: typer==0.12.5
236
- Requires-Dist: urllib3<2.3,>=1.24.3
237
- Provides-Extra: development
238
- Requires-Dist: coverage==7.6.1; extra == 'development'
239
- Requires-Dist: pre-commit>=3.5.0; extra == 'development'
240
- Requires-Dist: pytest-randomly==3.15.0; extra == 'development'
241
- Requires-Dist: pytest==8.3.3; extra == 'development'
242
- Requires-Dist: syrupy==4.7.1; extra == 'development'
243
- Provides-Extra: packaging
244
- Requires-Dist: pyinstaller~=6.10; extra == 'packaging'
212
+ Requires-Dist: snowflake-cli==3.0.1
245
213
  Description-Content-Type: text/markdown
246
214
 
247
215
  <!--
@@ -260,66 +228,8 @@ Description-Content-Type: text/markdown
260
228
  limitations under the License.
261
229
  -->
262
230
 
263
- [![Code quality checks](https://github.com/snowflakedb/snowflake-cli/actions/workflows/lint.yaml/badge.svg)](https://github.com/snowflakedb/snowflake-cli/actions/workflows/lint.yaml)
264
- [![Integration testing](https://github.com/snowflakedb/snowflake-cli/actions/workflows/integration_test.yaml/badge.svg)](https://github.com/snowflakedb/snowflake-cli/actions/workflows/integration_test.yaml)
265
- [![CLI Action testing](https://github.com/snowflakedb/snowflake-cli/actions/workflows/test_cli_action.yaml/badge.svg?branch=main)](https://github.com/snowflakedb/snowflake-cli/actions/workflows/test_cli_action.yaml)
231
+ # Snowflake Developer CLI
266
232
 
267
- [//]: # ([![Python 3.11]&#40;https://img.shields.io/badge/python-3.11-blue.svg&#41;]&#40;https://www.python.org/downloads/release/python-311/&#41;)
233
+ This package has been renamed. Use `pip install snowflake-cli` instead.
268
234
 
269
- # Snowflake CLI
270
-
271
- Snowflake CLI is an open-source command-line tool explicitly designed for developer-centric workloads in addition to SQL operations. It is a flexible and extensible tool that can accommodate modern development practices and technologies.
272
-
273
- With Snowflake CLI, developers can create, manage, update, and view apps running on Snowflake across workloads such as Streamlit in Snowflake, the Snowflake Native App Framework, Snowpark Container Services, and Snowpark. It supports a range of Snowflake features, including user-defined functions, stored procedures, Streamlit in Snowflake, and SQL execution.
274
-
275
-
276
- **Note**: Snowflake CLI is in Public Preview (PuPr).
277
-
278
- Docs: https://docs.snowflake.com/en/developer-guide/snowflake-cli-v2/index.
279
-
280
- Quick start: https://quickstarts.snowflake.com/guide/getting-started-with-snowflake-cli
281
-
282
- Cheatsheet: https://github.com/Snowflake-Labs/sf-cheatsheets/blob/main/snowflake-cli.md
283
-
284
-
285
- ## Install Snowflake CLI
286
-
287
- ### Install with pipx (PyPi)
288
-
289
- We recommend installing Snowflake CLI in isolated environment using [pipx](https://pipx.pypa.io/stable/). Requires Python >= 3.10
290
-
291
- ```bash
292
- pipx install snowflake-cli-labs
293
- snow --help
294
- ```
295
-
296
- ### Install with Homebrew (Mac only)
297
-
298
- Requires [Homebrew](https://brew.sh/).
299
-
300
- ```bash
301
- brew tap snowflakedb/snowflake-cli
302
- brew install snowflake-cli
303
- snow --help
304
- ```
305
-
306
- ### Install from source
307
-
308
- Requires Python >= 3.10 and git
309
-
310
- ```bash
311
- git clone https://github.com/snowflakedb/snowflake-cli
312
- cd snowflake-cli
313
- # you can also do the below in an active virtual environment:
314
- # python -m venv .venv
315
- # source .venv/bin/activate
316
- hatch build && pip install .
317
- snow --version
318
- ```
319
-
320
- You should now be able to run `snow` and get the CLI message.
321
-
322
- ## Get involved
323
-
324
- Have a feature idea? Running into a bug? Want to contribute? We'd love to hear from you!
325
- Please open or review issues, open pull requests, or reach out to us on developers@snowflake.com
235
+ New package: https://pypi.org/project/snowflake-cli/
@@ -0,0 +1,5 @@
1
+ README.md,sha256=A_KrrRF2DbYSf8rBfTbKNnk3ICcl5P2H_60qQzEkq2E,729
2
+ snowflake_cli_labs-3.0.1.dist-info/METADATA,sha256=CkVCuOsXZgulPQCMsR6fbDLBCDEnexR1N3IeLTTa1TQ,14109
3
+ snowflake_cli_labs-3.0.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
4
+ snowflake_cli_labs-3.0.1.dist-info/licenses/LICENSE,sha256=mJMA3Uz2AbjU_kVggo1CAx01XhBsI7BSi2H7ggUg_-c,11344
5
+ snowflake_cli_labs-3.0.1.dist-info/RECORD,,
@@ -1,17 +0,0 @@
1
- # Copyright (c) 2024 Snowflake Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from __future__ import annotations
16
-
17
- VERSION = "3.0.0rc4"
snowflake/cli/__init__.py DELETED
@@ -1,13 +0,0 @@
1
- # Copyright (c) 2024 Snowflake Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
@@ -1,22 +0,0 @@
1
- # Copyright (c) 2024 Snowflake Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- import logging
16
- import os
17
-
18
- # Suppress logging from Snowflake connector
19
- logging.getLogger("snowflake").setLevel(logging.ERROR)
20
-
21
- # Restrict permissions of all created files
22
- os.umask(0o077)
@@ -1,31 +0,0 @@
1
- # Copyright (c) 2024 Snowflake Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from __future__ import annotations
16
-
17
- import sys
18
-
19
- from snowflake.cli._app.cli_app import app_factory
20
-
21
-
22
- def main(*args):
23
- app = app_factory()
24
- app(*args)
25
-
26
-
27
- if __name__ == "__main__":
28
- main()
29
-
30
- if getattr(sys, "frozen", False):
31
- main(sys.argv[1:])
@@ -1,13 +0,0 @@
1
- # Copyright (c) 2024 Snowflake Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
@@ -1,13 +0,0 @@
1
- # Copyright (c) 2024 Snowflake Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
@@ -1,66 +0,0 @@
1
- # Copyright (c) 2024 Snowflake Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from __future__ import annotations
16
-
17
- from typing import List
18
-
19
- from snowflake.cli.api import PluginConfigProvider
20
- from snowflake.cli.api.config import (
21
- PLUGINS_SECTION_PATH,
22
- config_section_exists,
23
- get_config_section,
24
- get_config_value,
25
- get_plugins_config,
26
- )
27
- from snowflake.cli.api.exceptions import InvalidPluginConfiguration
28
- from snowflake.cli.api.plugins.plugin_config import PluginConfig
29
-
30
-
31
- def _assert_value_is_bool(value, *, value_name: str, plugin_name: str) -> None:
32
- if type(value) is not bool:
33
- raise InvalidPluginConfiguration(
34
- f'[{plugin_name}]: "{value_name}" must be a boolean'
35
- )
36
-
37
-
38
- _ENABLED_KEY = "enabled"
39
-
40
-
41
- class PluginConfigProviderImpl(PluginConfigProvider):
42
- def get_enabled_plugin_names(self) -> List[str]:
43
- enabled_plugins = []
44
- for plugin_name, plugin_config_section in get_plugins_config().items():
45
- enabled = plugin_config_section.get(_ENABLED_KEY, False)
46
- _assert_value_is_bool(
47
- enabled, value_name=_ENABLED_KEY, plugin_name=plugin_name
48
- )
49
- if enabled:
50
- enabled_plugins.append(plugin_name)
51
- return enabled_plugins
52
-
53
- def get_config(self, plugin_name: str) -> PluginConfig:
54
- config_path = PLUGINS_SECTION_PATH + [plugin_name]
55
- plugin_config = PluginConfig(is_plugin_enabled=False, internal_config={})
56
- plugin_config.is_plugin_enabled = get_config_value(
57
- *config_path, key=_ENABLED_KEY, default=False
58
- )
59
- _assert_value_is_bool(
60
- plugin_config.is_plugin_enabled,
61
- value_name=_ENABLED_KEY,
62
- plugin_name=plugin_name,
63
- )
64
- if config_section_exists(*config_path, "config"):
65
- plugin_config.internal_config = get_config_section(*config_path, "config")
66
- return plugin_config
@@ -1,252 +0,0 @@
1
- # Copyright (c) 2024 Snowflake Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from __future__ import annotations
16
-
17
- import logging
18
- import platform
19
- import sys
20
- from dataclasses import dataclass
21
- from pathlib import Path
22
- from typing import Optional
23
-
24
- import click
25
- import typer
26
- from click import Context
27
- from snowflake.cli import __about__
28
- from snowflake.cli._app.api_impl.plugin.plugin_config_provider_impl import (
29
- PluginConfigProviderImpl,
30
- )
31
- from snowflake.cli._app.commands_registration.commands_registration_with_callbacks import (
32
- CommandsRegistrationWithCallbacks,
33
- )
34
- from snowflake.cli._app.dev.commands_structure import generate_commands_structure
35
- from snowflake.cli._app.dev.docs.generator import generate_docs
36
- from snowflake.cli._app.dev.pycharm_remote_debug import (
37
- setup_pycharm_remote_debugger_if_provided,
38
- )
39
- from snowflake.cli._app.main_typer import SnowCliMainTyper
40
- from snowflake.cli._app.printing import MessageResult, print_result
41
- from snowflake.cli._app.version_check import (
42
- get_new_version_msg,
43
- show_new_version_banner_callback,
44
- )
45
- from snowflake.cli.api import Api, api_provider
46
- from snowflake.cli.api.config import config_init
47
- from snowflake.cli.api.output.formats import OutputFormat
48
- from snowflake.cli.api.output.types import CollectionResult
49
- from snowflake.cli.api.secure_path import SecurePath
50
- from snowflake.connector.config_manager import CONFIG_MANAGER
51
-
52
- log = logging.getLogger(__name__)
53
-
54
- _api = Api(plugin_config_provider=PluginConfigProviderImpl())
55
- api_provider.register_api(_api)
56
-
57
- _commands_registration = CommandsRegistrationWithCallbacks(_api.plugin_config_provider)
58
-
59
-
60
- @dataclass
61
- class AppContextHolder:
62
- # needed to access the context from tests
63
- app_context: Optional[Context] = None
64
-
65
-
66
- app_context_holder = AppContextHolder()
67
-
68
-
69
- def _exit_with_cleanup():
70
- _commands_registration.reset_running_instance_registration_state()
71
- raise typer.Exit()
72
-
73
-
74
- def _do_not_execute_on_completion(callback):
75
- def enriched_callback(value):
76
- if click.get_current_context().resilient_parsing:
77
- return
78
- callback(value)
79
-
80
- return enriched_callback
81
-
82
-
83
- def _commands_registration_callback(value: bool):
84
- if value:
85
- _commands_registration.register_commands_if_ready_and_not_registered_yet()
86
- # required to make the tests working
87
- # because a single test can execute multiple commands using always the same "app" instance
88
- _commands_registration.reset_running_instance_registration_state()
89
- app_context_holder.app_context = click.get_current_context()
90
-
91
-
92
- @_commands_registration.before
93
- def _config_init_callback(configuration_file: Optional[Path]):
94
- config_init(configuration_file)
95
-
96
-
97
- @_commands_registration.before
98
- def _disable_external_command_plugins_callback(value: bool):
99
- if value:
100
- _commands_registration.disable_external_command_plugins()
101
-
102
-
103
- @_do_not_execute_on_completion
104
- @_commands_registration.after
105
- def _docs_callback(value: bool):
106
- if value:
107
- ctx = click.get_current_context()
108
- generate_docs(SecurePath("gen_docs"), ctx.command)
109
- _exit_with_cleanup()
110
-
111
-
112
- @_do_not_execute_on_completion
113
- @_commands_registration.after
114
- def _commands_structure_callback(value: bool):
115
- if value:
116
- ctx = click.get_current_context()
117
- generate_commands_structure(ctx.command).print_node()
118
- _exit_with_cleanup()
119
-
120
-
121
- @_do_not_execute_on_completion
122
- def _version_callback(value: bool):
123
- if value:
124
- print_result(MessageResult(f"Snowflake CLI version: {__about__.VERSION}"))
125
- _exit_with_cleanup()
126
-
127
-
128
- from snowflake.cli.api.config import get_feature_flags_section
129
-
130
-
131
- @_do_not_execute_on_completion
132
- def _info_callback(value: bool):
133
- if value:
134
- result = CollectionResult(
135
- [
136
- {"key": "version", "value": __about__.VERSION},
137
- {
138
- "key": "default_config_file_path",
139
- "value": str(CONFIG_MANAGER.file_path),
140
- },
141
- {"key": "python_version", "value": sys.version},
142
- {"key": "system_info", "value": platform.platform()},
143
- {"key": "feature_flags", "value": get_feature_flags_section()},
144
- ],
145
- )
146
- print_result(result, output_format=OutputFormat.JSON)
147
- _exit_with_cleanup()
148
-
149
-
150
- def app_factory() -> SnowCliMainTyper:
151
- app = SnowCliMainTyper()
152
- new_version_msg = get_new_version_msg()
153
-
154
- @app.callback(
155
- invoke_without_command=True,
156
- epilog=new_version_msg,
157
- result_callback=show_new_version_banner_callback(new_version_msg),
158
- )
159
- def default(
160
- ctx: typer.Context,
161
- version: bool = typer.Option(
162
- None,
163
- "--version",
164
- help="Shows version of the Snowflake CLI",
165
- callback=_version_callback,
166
- is_eager=True,
167
- ),
168
- docs: bool = typer.Option(
169
- None,
170
- "--docs",
171
- hidden=True,
172
- help="Generates Snowflake CLI documentation",
173
- callback=_docs_callback,
174
- is_eager=True,
175
- ),
176
- structure: bool = typer.Option(
177
- None,
178
- "--structure",
179
- hidden=True,
180
- help="Prints Snowflake CLI structure of commands",
181
- callback=_commands_structure_callback,
182
- is_eager=True,
183
- ),
184
- info: bool = typer.Option(
185
- None,
186
- "--info",
187
- help="Shows information about the Snowflake CLI",
188
- callback=_info_callback,
189
- ),
190
- configuration_file: Path = typer.Option(
191
- None,
192
- "--config-file",
193
- help="Specifies Snowflake CLI configuration file that should be used",
194
- exists=True,
195
- dir_okay=False,
196
- is_eager=True,
197
- callback=_config_init_callback,
198
- ),
199
- pycharm_debug_library_path: str = typer.Option(
200
- None,
201
- "--pycharm-debug-library-path",
202
- hidden=True,
203
- ),
204
- pycharm_debug_server_host: str = typer.Option(
205
- "localhost",
206
- "--pycharm-debug-server-host",
207
- hidden=True,
208
- ),
209
- pycharm_debug_server_port: int = typer.Option(
210
- 12345,
211
- "--pycharm-debug-server-port",
212
- hidden=True,
213
- ),
214
- disable_external_command_plugins: bool = typer.Option(
215
- None,
216
- "--disable-external-command-plugins",
217
- help="Disable external command plugins",
218
- callback=_disable_external_command_plugins_callback,
219
- is_eager=True,
220
- hidden=True,
221
- ),
222
- # THIS OPTION SHOULD BE THE LAST OPTION IN THE LIST!
223
- # ---
224
- # This is a hidden artificial option used only to guarantee execution of commands registration
225
- # and make this guaranty not dependent on other callbacks.
226
- # Commands registration is invoked as soon as all callbacks
227
- # decorated with "_commands_registration.before" are executed
228
- # but if there are no such callbacks (at the result of possible future changes)
229
- # then we need to invoke commands registration manually.
230
- #
231
- # This option is also responsible for resetting registration state for test purposes.
232
- commands_registration: bool = typer.Option(
233
- True,
234
- "--commands-registration",
235
- help="Commands registration",
236
- hidden=True,
237
- is_eager=True,
238
- callback=_commands_registration_callback,
239
- ),
240
- ) -> None:
241
- """
242
- Snowflake CLI tool for developers.
243
- """
244
- if not ctx.invoked_subcommand:
245
- typer.echo(ctx.get_help())
246
- setup_pycharm_remote_debugger_if_provided(
247
- pycharm_debug_library_path=pycharm_debug_library_path,
248
- pycharm_debug_server_host=pycharm_debug_server_host,
249
- pycharm_debug_server_port=pycharm_debug_server_port,
250
- )
251
-
252
- return app
@@ -1,33 +0,0 @@
1
- # Copyright (c) 2024 Snowflake Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from dataclasses import dataclass
16
-
17
- from snowflake.cli.api.plugins.command import CommandSpec
18
-
19
-
20
- @dataclass
21
- class LoadedCommandPlugin:
22
- plugin_name: str
23
- command_spec: CommandSpec
24
-
25
-
26
- @dataclass
27
- class LoadedBuiltInCommandPlugin(LoadedCommandPlugin):
28
- pass
29
-
30
-
31
- @dataclass
32
- class LoadedExternalCommandPlugin(LoadedCommandPlugin):
33
- pass
@@ -1,50 +0,0 @@
1
- # Copyright (c) 2024 Snowflake Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from snowflake.cli._plugins.connection import plugin_spec as connection_plugin_spec
16
- from snowflake.cli._plugins.cortex import plugin_spec as cortex_plugin_spec
17
- from snowflake.cli._plugins.git import plugin_spec as git_plugin_spec
18
- from snowflake.cli._plugins.helpers import plugin_spec as migrate_plugin_spec
19
- from snowflake.cli._plugins.init import plugin_spec as init_plugin_spec
20
- from snowflake.cli._plugins.nativeapp import plugin_spec as nativeapp_plugin_spec
21
- from snowflake.cli._plugins.notebook import plugin_spec as notebook_plugin_spec
22
- from snowflake.cli._plugins.object import plugin_spec as object_plugin_spec
23
- from snowflake.cli._plugins.snowpark import plugin_spec as snowpark_plugin_spec
24
- from snowflake.cli._plugins.spcs import plugin_spec as spcs_plugin_spec
25
- from snowflake.cli._plugins.sql import plugin_spec as sql_plugin_spec
26
- from snowflake.cli._plugins.stage import plugin_spec as stage_plugin_spec
27
- from snowflake.cli._plugins.streamlit import plugin_spec as streamlit_plugin_spec
28
- from snowflake.cli._plugins.workspace import plugin_spec as workspace_plugin_spec
29
-
30
-
31
- # plugin name to plugin spec
32
- def get_builtin_plugin_name_to_plugin_spec():
33
- plugin_specs = {
34
- "connection": connection_plugin_spec,
35
- "helpers": migrate_plugin_spec,
36
- "spcs": spcs_plugin_spec,
37
- "nativeapp": nativeapp_plugin_spec,
38
- "object": object_plugin_spec,
39
- "snowpark": snowpark_plugin_spec,
40
- "stage": stage_plugin_spec,
41
- "sql": sql_plugin_spec,
42
- "streamlit": streamlit_plugin_spec,
43
- "git": git_plugin_spec,
44
- "notebook": notebook_plugin_spec,
45
- "cortex": cortex_plugin_spec,
46
- "init": init_plugin_spec,
47
- "workspace": workspace_plugin_spec,
48
- }
49
-
50
- return plugin_specs